﻿html[lang="ar"] {
    font-family: 'Tajawal', sans-serif;
}

html[lang="ku"] {
    font-family: 'Noto Sans Arabic', sans-serif;
}

html[lang="en"] {
    font-family: 'Inter', sans-serif;
}

:root {
    --gold: #C9A84C;
    --gold-light: #E8C96A;
    --gold-dim: rgba(201,168,76,0.15);
    --deep: #070D1A;
    --surface: #0E1828;
    --surface2: #162035;
    --border: rgba(201,168,76,0.2);
    --text: #EAE6DB;
    --muted: #7A8BA0;
    --blue-accent: #1A6BCC;
    --river: #0A4A7A;
}

/* ===== LIGHT MODE ===== */
body.light-mode {
    --deep: #F0E8D0;
    --surface: #FDFAF2;
    --surface2: #E4D8B8;
    --border: rgba(120,88,20,0.22);
    --text: #1A1206;
    --muted: #5C4A20;
}

    body.light-mode ::-webkit-scrollbar-track {
        background: #F0E8D0;
    }

    body.light-mode ::-webkit-scrollbar-thumb {
        background: #C9A84C;
    }

    body.light-mode nav {
        background: rgba(240,232,208,0.97);
        border-bottom-color: rgba(120,88,20,0.2);
    }

    body.light-mode .terminal {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.25);
        box-shadow: 0 20px 60px rgba(60,40,8,0.12), 0 0 0 1px rgba(201,168,76,0.12);
    }

    body.light-mode .terminal-body {
        background: #FDFAF2;
    }

    body.light-mode .terminal-header {
        background: #E4D8B8;
        border-bottom-color: rgba(120,88,20,0.18);
    }

    body.light-mode .tc-white {
        color: #1A1206;
    }

    body.light-mode .tc-key {
        color: #8A5C0C;
    }

    body.light-mode .tc-comment {
        color: #8A7848;
    }

    body.light-mode .tc-string {
        color: #2A6E3A;
    }

    body.light-mode .tc-blue {
        color: #1A5FA0;
    }

    body.light-mode .tc-gold {
        color: #7A5C0E;
    }

    body.light-mode #home::before {
        background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(201,168,76,0.08) 0%, transparent 70%), radial-gradient(ellipse 50% 80% at 10% 80%, rgba(201,168,76,0.04) 0%, transparent 60%);
    }

    body.light-mode .river-lines svg {
        opacity: 0.06;
    }

    body.light-mode .hero-badge {
        background: rgba(201,168,76,0.1);
        border-color: rgba(120,88,20,0.25);
    }

    body.light-mode h1 {
        color: #1A1206;
    }

        body.light-mode h1 .highlight {
            color: #7A5C0E;
        }

            body.light-mode h1 .highlight::after {
                background: linear-gradient(90deg, transparent, #7A5C0E, transparent);
            }

    body.light-mode .stat-num {
        color: #7A5C0E;
    }

    body.light-mode #about {
        background: #E4D8B8;
        border-color: rgba(120,88,20,0.16);
    }

    body.light-mode .about-watermark-svg {
        opacity: 0.05;
    }

    body.light-mode .value-card {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.2);
        box-shadow: 0 2px 12px rgba(80,55,8,0.06);
    }

        body.light-mode .value-card:hover {
            border-color: rgba(120,88,20,0.4);
            box-shadow: 0 4px 20px rgba(80,55,8,0.1);
        }

    body.light-mode .value-icon-svg {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    body.light-mode .offer-list {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.22);
        box-shadow: 0 4px 20px rgba(80,55,8,0.07);
    }

    body.light-mode .offer-item {
        border-bottom-color: rgba(120,88,20,0.12);
    }

        body.light-mode .offer-item:hover {
            background: rgba(201,168,76,0.08);
        }

    body.light-mode .offer-icon {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    body.light-mode #services {
        background: #F0E8D0;
    }

    body.light-mode .services-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .service-card {
        background: #FDFAF2;
        box-shadow: none;
    }

        body.light-mode .service-card:hover {
            background: #F5EED8;
        }

    body.light-mode .section-tag {
        color: #7A5C0E;
    }

    body.light-mode .section-title {
        color: #1A1206;
    }

    body.light-mode .section-divider {
        background: linear-gradient(90deg, #7A5C0E, transparent);
    }

    body.light-mode .section-sub {
        color: #5C4A20;
    }

    body.light-mode .tag {
        border-color: rgba(120,88,20,0.25);
        color: #7A5C0E;
    }

    body.light-mode .service-card:hover .tag {
        border-color: rgba(120,88,20,0.45);
        color: #7A5C0E;
    }

    body.light-mode .service-num {
        color: #7A5C0E;
    }

    body.light-mode .service-icon {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    body.light-mode #tech {
        background: #E4D8B8;
        border-color: rgba(120,88,20,0.16);
    }

    body.light-mode .tech-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .tech-small-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .tech-card {
        background: #FDFAF2;
        box-shadow: none;
    }

        body.light-mode .tech-card:hover {
            background: #F5EED8;
        }

    body.light-mode .tech-small {
        background: #FDFAF2;
    }

        body.light-mode .tech-small:hover {
            background: #F5EED8;
            color: #7A5C0E;
        }

    body.light-mode .tech-row-label {
        border-bottom-color: rgba(120,88,20,0.12);
    }

    body.light-mode #team {
        background: #F0E8D0;
    }

    body.light-mode .team-grid {
        background: rgba(120,88,20,0.14);
    }

    body.light-mode .team-card {
        background: #FDFAF2;
    }

        body.light-mode .team-card:hover {
            background: #F5EED8;
        }

    body.light-mode .team-dept {
        background: rgba(201,168,76,0.14);
        color: #7A5C0E;
    }

    body.light-mode .team-count {
        color: rgba(122,92,14,0.18);
    }

    body.light-mode .team-stack {
        color: #7A6838;
    }

    body.light-mode #contact {
        background: #E4D8B8;
    }

    body.light-mode .contact-info-item {
        border-bottom-color: rgba(120,88,20,0.15);
    }

    body.light-mode .contact-icon {
        background: rgba(201,168,76,0.12);
        border-color: rgba(120,88,20,0.2);
    }

    body.light-mode .contact-info-label {
        color: #7A5C0E;
    }

    body.light-mode .social-link {
        border-color: rgba(120,88,20,0.25);
    }

        body.light-mode .social-link:hover {
            border-color: #C9A84C;
            background: rgba(201,168,76,0.12);
        }

        body.light-mode .social-link svg {
            fill: #5C4A20;
        }

        body.light-mode .social-link:hover svg {
            fill: #7A5C0E;
        }

    body.light-mode .contact-form {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.22);
        box-shadow: 0 4px 24px rgba(80,55,8,0.08);
    }

        body.light-mode .contact-form::before {
            background: linear-gradient(90deg, transparent, #C9A84C, transparent);
        }

        body.light-mode .contact-form input,
        body.light-mode .contact-form select,
        body.light-mode .contact-form textarea {
            background: #E4D8B8;
            color: #1A1206;
            border-color: rgba(120,88,20,0.2);
        }

            body.light-mode .contact-form input:focus,
            body.light-mode .contact-form select:focus,
            body.light-mode .contact-form textarea:focus {
                border-color: #C9A84C;
            }

            body.light-mode .contact-form input::placeholder,
            body.light-mode .contact-form textarea::placeholder {
                color: rgba(92,74,32,0.4);
            }

            body.light-mode .contact-form select option {
                background: #E4D8B8;
                color: #1A1206;
            }

    body.light-mode .form-group label {
        color: #7A5C0E;
    }

    body.light-mode footer {
        background: #D8C898;
        border-top-color: rgba(120,88,20,0.22);
    }

    body.light-mode .footer-bottom {
        border-top-color: rgba(120,88,20,0.15);
    }

    body.light-mode .footer-col h4 {
        border-bottom-color: rgba(120,88,20,0.15);
    }

    body.light-mode .footer-copy {
        color: rgba(92,74,32,0.5);
    }

    body.light-mode .footer-made {
        color: rgba(92,74,32,0.5);
    }

    body.light-mode .lang-btn {
        border-color: rgba(120,88,20,0.28);
        color: #5C4A20;
    }

    body.light-mode .lang-menu {
        background: #FDFAF2;
        border-color: rgba(120,88,20,0.22);
    }

    body.light-mode .lang-option:hover {
        background: rgba(201,168,76,0.1);
    }

    body.light-mode .nav-links a {
        color: #5C4A20;
    }

        body.light-mode .nav-links a:hover {
            color: #7A5C0E;
        }

    body.light-mode .nav-cta {
        background: #C9A84C !important;
        color: #1A1206 !important;
    }

    body.light-mode .geo-accent {
        border-color: rgba(122,92,14,0.35);
    }

    body.light-mode .theme-toggle,
    body.light-mode .menu-toggle {
        border-color: rgba(120,88,20,0.28);
        color: #5C4A20;
    }

        body.light-mode .theme-toggle:hover,
        body.light-mode .menu-toggle:hover,
        body.light-mode .lang-btn:hover {
            border-color: #C9A84C;
            color: #7A5C0E;
            background: rgba(201,168,76,0.1);
        }

    body.light-mode .mobile-menu-btn {
        border-color: rgba(120,88,20,0.28);
        color: #5C4A20;
    }

    body.light-mode #about,
    body.light-mode #tech {
        border-top: 1px solid rgba(120,88,20,0.16);
        border-bottom: 1px solid rgba(120,88,20,0.16);
    }

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--muted);
    flex-shrink: 0;
}

    .theme-toggle:hover {
        border-color: var(--gold);
        color: var(--gold);
        background: var(--gold-dim);
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
        display: block;
        transition: transform 0.4s ease;
    }

    .theme-toggle:hover svg {
        transform: rotate(20deg);
    }

    .theme-toggle .icon-moon {
        display: block;
    }

    .theme-toggle .icon-sun {
        display: none;
    }

body.light-mode .theme-toggle .icon-moon {
    display: none;
}

body.light-mode .theme-toggle .icon-sun {
    display: block;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--deep);
    color: var(--text);
    overflow-x: hidden;
}

    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
        pointer-events: none;
        z-index: 9999;
        opacity: 0.4;
    }

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--deep);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 2px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    display: flex;
    align-items: center;
}

    .logo-img img {
        height: 100%;
        width: auto;
        display: block;
        filter: invert(1);
    }

body.light-mode .logo-img img {
    filter: invert(0);
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

.logo-ar {
    position: relative;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

    .logo-ar::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 60%;
        height: 2px;
        background: linear-gradient(90deg, var(--gold), transparent);
        border-radius: 2px;
    }

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
}

    .footer-brand:hover,
    .footer-brand:visited,
    .footer-brand:active {
        text-decoration: none;
        color: var(--text);
    }

.footer-logo-wrap {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-logo-img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: contain;
    filter: invert(1);
}

body.light-mode .footer-logo-img {
    filter: invert(0);
}

.footer-brand-text {
    position: relative;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text);
    display: flex;
    align-items: center;
}

    .footer-brand-text::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -6px;
        width: 60%;
        height: 2px;
        background: linear-gradient(90deg, var(--gold), transparent);
        border-radius: 2px;
    }

.qiq-logo-box {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(201,168,76,0.18), rgba(201,168,76,0.08));
    border: 1px solid rgba(201,168,76,0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 30px rgba(0,0,0,0.22);
    backdrop-filter: blur(8px);
}

.qiq-logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
}

/* ================= NAVBAR ================= */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7,13,26,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 84px;
    padding-left: 2rem;
    padding-right: 2rem;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 38px;
    display: flex;
    align-items: center;
}

    .logo-img img {
        height: 100%;
        filter: invert(1);
    }

body.light-mode .logo-img img {
    filter: invert(0);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-ar {
    position: relative;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

    .logo-ar::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 60%;
        height: 2px;
        background: linear-gradient(90deg, var(--gold), transparent);
    }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex: 1 1 auto;
    justify-content: center;
}

    .nav-links a {
        font-size: 0.95rem;
        font-weight: 700;
        color: #fff;
        text-decoration: none;
        white-space: nowrap;
        transition: color 0.2s ease, opacity 0.2s ease;
    }

        .nav-links a:hover {
            color: var(--gold);
        }

.nav-cta {
    padding: 0.7rem 1.35rem;
    background: var(--gold);
    color: var(--deep) !important;
    font-weight: 800 !important;
    border-radius: 8px;
    font-size: 0.88rem !important;
    transition: 0.2s;
}

    .nav-cta:hover {
        background: var(--gold-light);
        transform: translateY(-1px);
        color: var(--deep) !important;
    }

.desktop-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lang-dropdown {
    position: relative;
}

.lang-btn,
.menu-toggle {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--muted);
    flex-shrink: 0;
}

    .lang-btn:hover,
    .menu-toggle:hover {
        border-color: var(--gold);
        color: var(--gold);
        background: var(--gold-dim);
    }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 110px;
    display: none;
    flex-direction: column;
    padding: 6px;
    border-radius: 10px;
    background: rgba(15,25,40,0.96);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    z-index: 1000;
}

    .lang-menu.show {
        display: flex;
    }

    .lang-menu form {
        margin: 0;
    }

.lang-option {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    text-align: start;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
}

    .lang-option:hover {
        background: rgba(255,255,255,0.06);
    }

.menu-toggle {
    display: none;
    color: var(--text);
}

    .menu-toggle .material-symbols-outlined {
        font-size: 28px;
    }

.mobile-only {
    display: none;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

.container,
.hero-inner,
.nav-inner {
    width: 100%;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 1200px) {
    .container,
    .hero-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .nav-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 992px) {
    nav {
        overflow: visible;
    }

    .nav-inner {
        min-height: 80px;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        gap: 1rem;
    }

    .brand {
        min-width: 0;
    }

    .logo-text {
        min-width: 0;
    }

    .logo-ar,
    .footer-brand-text {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .container,
    .hero-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    nav {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .nav-inner {
        min-height: 76px;
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 0.75rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 1rem;
        backdrop-filter: blur(16px);
        background: rgba(15,25,40,0.6);
        border-top: 1px solid rgba(255,255,255,0.08);
        border-radius: 0 0 16px 16px;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        z-index: 999;
    }

        .nav-links.active {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .nav-links a {
            width: 100%;
            padding: 0.8rem 0;
            font-size: 0.95rem;
        }

    .desktop-cta {
        display: none !important;
    }

    .mobile-only {
        display: flex;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .logo-img {
        height: 32px;
    }

    .logo-ar {
        font-size: 0.95rem;
    }

    .qiq-logo-box {
        width: 54px;
        height: 54px;
    }

    .qiq-logo-img {
        width: 42px;
        height: 42px;
    }

    .section-tag {
        letter-spacing: 0.18em;
        font-size: 0.6rem;
    }

    .section-sub {
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .lang-menu {
        right: 0;
        left: auto;
        min-width: 100px;
    }
}

@media (min-width: 769px) {
    .nav-links {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        background: transparent !important;
        border: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        width: auto !important;
    }

    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .terminal {
        display: none;
    }
}