:root {
    --primary-color: #bda75f; /* Gold/Olive from Logo */
    --primary-glow: rgba(189, 167, 95, 0.25);
    --secondary-color: #3c8d8c; /* Teal/Turquoise from Logo */
    --secondary-glow: rgba(60, 141, 140, 0.2);
    --background-color: #ffffff;
    --surface: #f5f5f5;
    --surface-elevated: #ffffff;
    --text-color: #333333;
    --text-muted: #555555;
    --light-gray: #f5f5f5;
    --dark-color: #1a1a1a;
    --white: #ffffff;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --transition-speed: 0.3s;
    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    scroll-behavior: smooth;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Header and Navigation - fixed so it stays visible (sticky breaks with overflow-x on body) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

/* Prevent content from sliding under fixed header */
body {
    padding-top: 90px;
}

.logo img {
    height: 72px;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

nav a:hover {
    color: var(--primary-color);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color var(--transition-speed), background var(--transition-speed);
}

.lang-btn:hover {
    color: var(--primary-color);
}

.lang-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.lang-sep {
    color: var(--text-muted);
    font-size: 0.85rem;
    user-select: none;
}

/* Burger button - hidden on desktop */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: color var(--transition-speed);
}

.burger-btn:hover {
    color: var(--primary-color);
}

.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform var(--transition-speed), opacity var(--transition-speed);
}

.header.nav-open .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header.nav-open .burger-line:nth-child(2) {
    opacity: 0;
}

.header.nav-open .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* RTL (Arabic) */
[dir="rtl"] body,
body.rtl {
    text-align: right;
}

[dir="rtl"] .about-content,
[dir="rtl"] .section h2,
body.rtl .about-content,
body.rtl .section h2 {
    text-align: center;
}

[dir="rtl"] .about-blocks,
body.rtl .about-blocks {
    text-align: right;
}

[dir="rtl"] .solution-card-inner,
[dir="rtl"] .contact-info,
body.rtl .solution-card-inner,
body.rtl .contact-info {
    text-align: right;
}

[dir="rtl"] .values-list li,
body.rtl .values-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .values-list li::before,
body.rtl .values-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .solution-full-list,
body.rtl .solution-full-list {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .about-block,
body.rtl .about-block {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

[dir="rtl"] .lang-switcher,
body.rtl .lang-switcher {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Hero Section (home) – video: assets/media/home-bg.mp4 */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.home-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    object-fit: cover;
}

.hero-overlay,
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(189, 167, 95, 0.7), rgba(60, 141, 140, 0.7));
    z-index: 0;
}

.hero-overlay {
    content: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.85rem 1.75rem;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform var(--transition-speed), background-color var(--transition-speed), box-shadow var(--transition-speed);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    background-color: #d4bc6a;
    box-shadow: 0 8px 24px var(--primary-glow);
}

/* General Section Styling */
.section {
    padding: 5rem 5%;
}

.section:nth-child(even) {
    background-color: var(--light-gray);
}

.solutions-section {
    padding-left: 0;
    padding-right: 0;
}

.solutions-section > h2 {
    padding-left: 5%;
    padding-right: 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section h2 {
    text-align: center;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.section-tagline {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: -1.5rem auto 3rem;
}

/* Legal pages (Terms, Privacy) */
.legal-content {
    max-width: 720px;
    margin: 0 auto;
}

.legal-content h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h3:first-of-type {
    margin-top: 0;
}

.legal-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* About Section – video: assets/media/about-bg.mp4 */
.about-section {
    position: relative;
    overflow: hidden;
}

.about-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
    opacity: 0.12;
}


.about-inner {
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content > p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.about-content > p:last-of-type {
    margin-bottom: 1.5rem;
}

.about-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.about-block {
    background: var(--surface-elevated);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.about-block h3 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.about-block p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.about-content .values-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-content .values-list li {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0.35rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.about-content .values-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Services and Systems Section */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

a.card {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Full-width solution cards (one per row, each with optional background PNG/GIF) */
.solutions-section .section h2 {
    margin-bottom: 2.5rem;
}

.solutions-full-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.solution-full-card {
    position: relative;
    width: 100%;
    min-height: 320px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Background layer: set your PNG or GIF in CSS for .solution-card-bg-hardware and .solution-card-bg-software */
.solution-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0.12;
}

.solution-card-bg-video {
    opacity: 0.7;
}

/* Replace with your image path (PNG or GIF) in assets/images/ */
.solution-card-bg-hardware {
    background-image: url('../images/solutions-bg-hardware.png');
}

.solution-card-bg-software {
    background-image: url('../images/solutions-bg-software.png');
}

/* Video background for Software card (MP4) – opacity set above for better visibility */
.solution-card-bg-video {
    object-fit: cover;
}

.solution-card-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 5%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
}

.solution-full-card-title {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.solution-full-intro {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.65;
}

.solution-full-list {
    color: var(--text-color);
    font-size: 0.98rem;
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    line-height: 1.7;
}

.solution-full-list li {
    margin-bottom: 0.35rem;
}

.solution-full-list-detailed li {
    margin-bottom: 1rem;
}

.solution-full-list-detailed li strong {
    color: var(--secondary-color);
}

.solution-full-list-detailed br {
    display: block;
    content: '';
    margin-top: 0.25rem;
}

.solution-full-outro {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin: 0;
    line-height: 1.65;
}

.badge-coming {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(189, 167, 95, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* Legacy solution group title (used in Projects) */
.solution-group-title {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

/* Projects section */
.projects-groups {
    max-width: 1100px;
    margin: 0 auto;
}

.project-group {
    margin-bottom: 3rem;
}

.project-group:last-child {
    margin-bottom: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4/3;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-speed);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    transition: opacity var(--transition-speed);
}

.project-overlay h4 {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 600;
}

.project-client-note {
    font-size: 0.8em;
    font-weight: 400;
    opacity: 0.9;
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Scroll / page animations */
.animate-el {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-el.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Contact form extras */
.form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-error {
    color: #c00;
    font-size: 0.9rem;
    margin: 0;
    display: none;
}


/* Portfolio Section (legacy / other pages) */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.portfolio-item img {
    width: 100%;
    display: block;
    transition: transform var(--transition-speed);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(189, 167, 95, 0.85);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
    text-align: center;
    padding: 1.5rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

/* Contact Section */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.contact-info .contact-line {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-speed);
}

.contact-info .contact-line:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.contact-info .contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--border-radius-sm);
    background: var(--primary-glow);
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-info .contact-icon svg {
    flex-shrink: 0;
}

[dir="rtl"] .contact-info .contact-line:not(.contact-line-phone),
body.rtl .contact-info .contact-line:not(.contact-line-phone) {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-info .contact-line-phone,
body.rtl .contact-info .contact-line-phone {
    direction: ltr;
    flex-direction: row;
}

/* Services Page Specific */
.services-detailed {
    max-width: 960px;
    margin: 0 auto;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2rem;
    align-items: center;
    background-color: var(--white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition-speed);
}

.service-item:nth-child(even) {
    grid-template-columns: 1.4fr 1fr;
}

.service-item:nth-child(even) .service-gif {
    order: 2;
}

.service-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-gif {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--light-gray);
}

.service-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-item-content h3 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.35rem;
}

.service-item-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.service-item-icon {
    display: none;
}

/* Solutions inline (homepage) and solutions page */
.solutions-inline .service-item,
#solutions-list .service-item {
    grid-template-columns: 280px 1fr;
}

.solutions-inline .service-item:nth-child(even),
#solutions-list .service-item:nth-child(even) {
    grid-template-columns: 1fr 280px;
}

.solutions-inline .service-item:nth-child(even) .service-gif,
#solutions-list .service-item:nth-child(even) .service-gif {
    order: 2;
}

.solutions-inline .service-gif,
#solutions-list .service-gif {
    aspect-ratio: 1;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 2rem 5%;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.75rem 3%;
    }

    .header .logo img {
        height: 56px;
    }

    .burger-btn {
        display: flex;
        margin-inline-start: auto;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 1rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.25s ease;
    }

    .header.nav-open nav {
        max-height: 80vh;
        opacity: 1;
    }

    nav a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    nav a:last-of-type {
        border-bottom: none;
    }

    nav .lang-switcher {
        margin: 0.5rem 0 0;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        justify-content: flex-start;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 4rem 5%;
    }

    .about-blocks {
        grid-template-columns: 1fr;
    }

    .solutions-section > h2 {
        margin-bottom: 1.5rem;
    }

    .solution-card-inner {
        padding: 1.75rem 1.25rem;
    }

    .solution-full-card-title {
        font-size: 1.25rem;
    }

    .solution-full-list-detailed li {
        margin-bottom: 1.25rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .service-item,
    .service-item:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .service-item:nth-child(even) .service-gif {
        order: 0;
    }

    .service-gif {
        aspect-ratio: 16/9;
    }

    .solutions-inline .service-item,
    #solutions-list .service-item {
        grid-template-columns: 1fr;
    }

    .solutions-inline .service-item:nth-child(even) .service-gif,
    #solutions-list .service-item:nth-child(even) .service-gif {
        order: 0;
    }

    .solutions-inline .service-gif,
    #solutions-list .service-gif {
        aspect-ratio: 16/9;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links a {
        margin-left: 0;
    }
}