/* ============================================
   IMCO — تصميم عصري مختلط (Eclectic Modern)
   Dark/light rhythm · mesh hero · glass · Vazirmatn + Syne
   ============================================ */

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

:root {
    --bg-deep: #0c0c0f;
    --bg-elevated: #14141a;
    --surface: #f4f4f7;
    --surface-2: #e8e8ef;
    --white: #ffffff;
    --text-on-dark: #e8e8ed;
    --text-on-dark-muted: #9898a8;
    --text-on-light: #16161d;
    --text-on-light-muted: #5c5c6e;
    --accent-cyan: #22d3ee;
    --accent-cyan-dim: rgba(34, 211, 238, 0.14);
    --accent-violet: #a78bfa;
    --accent-violet-dim: rgba(167, 139, 250, 0.16);
    --accent-coral: #fb7185;
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-light: rgba(22, 22, 29, 0.08);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow-cyan: 0 0 40px rgba(34, 211, 238, 0.15);
    --shadow-glow-violet: 0 0 48px rgba(167, 139, 250, 0.12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px;
    --hero-image: none;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
    line-height: 1.75;
    color: var(--text-on-light);
    background: var(--surface);
    overflow-x: hidden;
}

.logo-latin {
    font-family: 'Syne', 'Vazirmatn', sans-serif;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Navigation — زجاج داكن → فاتح عند التمرير ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(12, 12, 15, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    background: rgba(244, 244, 247, 0.88);
    border-bottom-color: var(--border-glass-light);
    box-shadow: var(--shadow-soft);
}

.navbar.scrolled .logo h2,
.navbar.scrolled .nav-link {
    color: var(--text-on-light);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: #0e7490;
}

.navbar.scrolled .nav-link::after {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
}

.navbar.scrolled .hamburger span {
    background: var(--text-on-light);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    min-height: var(--nav-height);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    border: none;
    padding: 0;
    margin: 0;
    line-height: 1.2;
}

.logo h2 .logo-latin {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.navbar:not(.scrolled) .logo h2 .logo-latin {
    filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.35));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(232, 232, 237, 0.92);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: var(--text-on-dark);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== Hero — mesh + blobs + محاذاة بداية RTL ========== */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: right;
    background: var(--bg-deep);
    color: var(--text-on-dark);
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(ellipse 100% 80% at 100% 0%, rgba(167, 139, 250, 0.35), transparent 55%),
        radial-gradient(ellipse 80% 70% at 0% 100%, rgba(34, 211, 238, 0.28), transparent 50%),
        radial-gradient(ellipse 60% 50% at 70% 60%, rgba(251, 113, 133, 0.12), transparent 45%),
        linear-gradient(165deg, rgba(12, 12, 15, 0.3) 0%, transparent 45%, rgba(20, 20, 26, 0.85) 100%),
        var(--hero-image);
    background-size: auto, auto, auto, auto, cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-bg-photo {
    position: absolute;
    inset: -2%;
    width: 104%;
    height: 104%;
    object-fit: cover;
    filter: blur(2px) brightness(0.52) saturate(1.08);
    transform: scale(1.03);
    z-index: -1;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0.5px, transparent 0.5px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 85% 75% at 80% 40%, black 15%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 80% 40%, black 15%, transparent 70%);
    pointer-events: none;
    animation: heroMeshDrift 22s ease-in-out infinite alternate;
}

@keyframes heroMeshDrift {
    from { opacity: 0.4; transform: scale(1) translate(0, 0); }
    to { opacity: 0.75; transform: scale(1.04) translate(-2%, 1%); }
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--surface), transparent);
    pointer-events: none;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(12, 12, 15, 0.5) 0%, transparent 42%, rgba(12, 12, 15, 0.35) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: min(92vw, 720px);
    margin-inline-start: 0;
    margin-inline-end: auto;
    padding: calc(var(--nav-height) + 2rem) 28px 100px 8vw;
}

.hero-content::after {
    content: '';
    position: absolute;
    top: calc(var(--nav-height) + 1.25rem);
    bottom: 4rem;
    right: 0;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    opacity: 0.95;
    pointer-events: none;
}

.hero-title {
    font-family: 'Vazirmatn', sans-serif;
    font-size: clamp(1.75rem, 4.5vw, 2.85rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.85vw, 1.12rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.9;
    max-width: 100%;
    color: var(--text-on-dark-muted);
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn {
    padding: 0.88rem 1.85rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
    font-family: 'Vazirmatn', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #06b6d4, var(--accent-violet));
    color: var(--bg-deep);
    box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(34, 211, 238, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(34, 211, 238, 0.45);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator span {
    display: block;
    width: 26px;
    height: 42px;
    border: 2px solid rgba(34, 211, 238, 0.45);
    border-radius: 14px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    border-radius: 2px;
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.35; transform: translateX(-50%) translateY(12px); }
}

/* ========== Trust strip ========== */
section.trust-strip {
    padding: 1.65rem 0;
    background: linear-gradient(92deg, var(--bg-elevated) 0%, #1a1a24 50%, var(--bg-elevated) 100%);
    border-top: 1px solid rgba(34, 211, 238, 0.2);
    border-bottom: 1px solid var(--border-glass);
}

.trust-strip-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .trust-strip-inner {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 1.25rem 2rem;
    }
}

.trust-strip-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-family: 'Syne', sans-serif;
    color: var(--text-on-dark-muted);
    margin: 0;
    white-space: nowrap;
}

.trust-strip-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.trust-pill {
    display: inline-block;
    padding: 0.45rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-on-dark);
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.trust-pill:hover {
    border-color: rgba(167, 139, 250, 0.5);
    background: var(--accent-violet-dim);
    box-shadow: var(--shadow-glow-violet);
}

/* ========== Animations ========== */
.animate-fade-in {
    animation: fadeInUp 0.9s ease-out;
}
.animate-fade-in-delay {
    animation: fadeInUp 0.9s ease-out 0.25s both;
}
.animate-fade-in-delay-2 {
    animation: fadeInUp 0.9s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

section:not(.hero) {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

section:not(.hero).in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Sections base ========== */
section {
    padding: 5.5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.25rem;
}

.section-title {
    font-family: 'Vazirmatn', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text-on-light);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.03em;
    line-height: 1.2;
    padding-inline-end: 1.25rem;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0.15em;
    bottom: 0.15em;
    right: 0;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
}

.section-title::after {
    display: none;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-on-light-muted);
    margin-top: 1rem;
    font-weight: 500;
}

/* عناوين على خلفيات داكنة */
.capabilities .section-title,
.projects-detail .section-title {
    color: var(--text-on-dark);
}

.capabilities .section-title::before,
.projects-detail .section-title::before {
    background: linear-gradient(180deg, var(--accent-coral), var(--accent-cyan));
}

.capabilities .section-subtitle,
.projects-detail .section-subtitle {
    color: var(--text-on-dark-muted);
}

/* ========== About ========== */
.about {
    background: var(--surface);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.about-text h3 {
    font-size: 1.28rem;
    color: var(--text-on-light);
    margin-bottom: 0.65rem;
    margin-top: 1.75rem;
    font-weight: 800;
    border-inline-end: 3px solid var(--accent-cyan);
    padding-inline-end: 0.85rem;
}

.about-text h3:first-child { margin-top: 0; }

.about-text p {
    color: var(--text-on-light-muted);
    line-height: 1.95;
    margin-bottom: 1.35rem;
    font-size: 1rem;
}

.section-media-card {
    margin: 0 0 1.25rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-glass-light);
}

.section-media-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

@media (min-width: 768px) and (max-width: 991px) {
    .about-stats--bento {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-stats--bento .stat-card--feature {
        grid-column: 1 / -1;
    }
    .about-stats--bento .stat-card--wide {
        grid-column: 1 / -1;
    }
}

@media (min-width: 992px) {
    .about-stats--bento {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto auto;
        gap: 1.15rem;
        align-content: start;
    }

    .about-stats--bento .stat-card--feature {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
        min-height: 260px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        background: linear-gradient(145deg, var(--white) 0%, var(--surface-2) 100%);
        border: 1px solid var(--border-glass-light);
        box-shadow: var(--shadow-soft), var(--shadow-glow-cyan);
    }

    .about-stats--bento .stat-card--feature .stat-number {
        font-size: clamp(2.35rem, 3.8vw, 3.1rem);
    }

    .about-stats--bento .stat-card:nth-child(2) {
        grid-column: 3;
        grid-row: 1;
    }

    .about-stats--bento .stat-card:nth-child(3) {
        grid-column: 4;
        grid-row: 1;
    }

    .about-stats--bento .stat-card--wide {
        grid-column: 3 / 5;
        grid-row: 2;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        text-align: center;
        flex-wrap: wrap;
    }

    .about-stats--bento .stat-card--wide .stat-label {
        max-width: 12rem;
    }
}

.stat-card {
    background: var(--white);
    padding: 1.85rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-glass-light);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft), 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0891b2, var(--accent-violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.45rem;
    font-variant-numeric: tabular-nums;
}

.stat-number::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    margin: 0.5rem auto 0;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
}

.stat-label {
    color: var(--text-on-light-muted);
    font-weight: 600;
    font-size: 0.88rem;
}

/* ========== Services ========== */
.services {
    background: var(--white);
}

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

.service-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-glass-light);
    border-inline-end: 3px solid #06b6d4;
}

.service-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 1rem;
    filter: saturate(1.05) contrast(1.02);
    border: 1px solid var(--border-glass-light);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft), var(--shadow-glow-violet);
    background: var(--white);
}

.service-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0e7490;
    transition: var(--transition);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card:hover .service-icon {
    color: var(--accent-violet);
    transform: scale(1.08);
}

.service-card h3 {
    font-size: 1.22rem;
    color: var(--text-on-light);
    margin-bottom: 0.65rem;
    font-weight: 800;
}

.service-card p {
    color: var(--text-on-light-muted);
    line-height: 1.8;
    font-size: 0.94rem;
}

/* ========== Capabilities — خلفية داكنة ========== */
.capabilities {
    background: var(--bg-deep);
    color: var(--text-on-dark);
}

.cap-block {
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-glass);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.cap-block:hover {
    border-color: rgba(34, 211, 238, 0.25);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), var(--shadow-glow-cyan);
}

.cap-head {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1.35rem;
    padding: 0.9rem 1.35rem;
    border-radius: var(--radius-sm);
    color: var(--text-on-dark);
    text-align: right;
    background: linear-gradient(105deg, rgba(34, 211, 238, 0.12), rgba(167, 139, 250, 0.1));
    border: 1px solid var(--border-glass);
}

.cap-block-media {
    width: 100%;
    height: 185px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    filter: brightness(0.78) saturate(1.08);
    border: 1px solid var(--border-glass);
}

.cap-operations .cap-head { border-inline-end: 3px solid var(--accent-cyan); }
.cap-support .cap-head { border-inline-end: 3px solid #34d399; }
.cap-training .cap-head { border-inline-end: 3px solid var(--accent-violet); }
.cap-other .cap-head { border-inline-end: 3px solid var(--accent-coral); }
.cap-info .cap-head { border-inline-end: 3px solid #2dd4bf; }
.cap-partners .cap-head { border-inline-end: 3px solid var(--accent-cyan); }

.cap-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.1rem;
}

.cap-card {
    background: rgba(255, 255, 255, 0.04);
    padding: 1.45rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    border-inline-end: 3px solid rgba(34, 211, 238, 0.35);
    transition: var(--transition);
}

.cap-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.07);
    border-inline-end-color: var(--accent-violet);
}

.cap-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.cap-card h4 {
    font-size: 1.05rem;
    color: var(--text-on-dark);
    margin-bottom: 0.45rem;
    font-weight: 800;
}

.cap-card p {
    color: var(--text-on-dark-muted);
    font-size: 0.9rem;
    line-height: 1.75;
    margin: 0;
}

.cap-intro, .cap-sub {
    margin-bottom: 0.85rem;
    color: var(--text-on-dark-muted);
    line-height: 1.85;
}

.cap-sub {
    font-weight: 700;
    color: var(--accent-cyan);
}

.training-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.training-tags span {
    display: inline-block;
    padding: 0.5rem 0.95rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

.training-tags span:hover {
    background: var(--accent-violet-dim);
    border-color: rgba(167, 139, 250, 0.4);
}

.other-depts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.dept-pill {
    padding: 0.75rem 1.35rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

.dept-pill:hover {
    background: var(--accent-cyan-dim);
    border-color: rgba(34, 211, 238, 0.4);
}

.cap-info p, .cap-partners p {
    color: var(--text-on-dark-muted);
    line-height: 1.9;
    margin: 0;
}

.cap-info, .cap-partners {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ========== Portfolio ========== */
.portfolio {
    background: var(--surface-2);
}

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

.portfolio-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-glass-light);
    transition: var(--transition);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-soft), var(--shadow-glow-violet);
}

.portfolio-image {
    position: relative;
    height: 280px;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-bg {
    position: absolute;
    inset: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    object-fit: cover;
    filter: blur(6px) brightness(0.7) saturate(1.1);
    transform: scale(1.05);
    transition: transform var(--transition), filter var(--transition);
    z-index: 0;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12, 12, 15, 0.35) 0%, rgba(12, 12, 15, 0.78) 100%);
    z-index: 1;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 15, 0.2);
    backdrop-filter: blur(1px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
    color: var(--text-on-dark);
    padding: 2rem;
    text-align: center;
    border-top: 3px solid var(--accent-cyan);
    z-index: 2;
}

.portfolio-overlay h3,
.portfolio-overlay p {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform 0.35s ease;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.portfolio-overlay p {
    transition-delay: 0.08s;
}

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

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    opacity: 1;
    transform: translateY(-1px);
}

.portfolio-item:hover .portfolio-bg {
    transform: scale(1.1);
    filter: blur(8px) brightness(0.62) saturate(1.15);
}

.portfolio-item:hover .portfolio-image::before {
    background:
        linear-gradient(180deg, rgba(12, 12, 15, 0.2) 0%, rgba(12, 12, 15, 0.76) 100%);
}

.portfolio-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 0.45rem;
    font-weight: 800;
}

.portfolio-overlay p {
    font-size: 0.92rem;
    opacity: 0.95;
}

/* ========== Achievements ========== */
.achievements-section {
    background: var(--white);
}

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

.ach-card {
    padding: 1.85rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-glass-light);
    border-top: 4px solid #0891b2;
    transition: var(--transition);
    background: var(--white);
}

.ach-card:hover {
    box-shadow: var(--shadow-soft), 0 0 0 1px rgba(167, 139, 250, 0.2);
    transform: translateY(-5px);
}

.ach-card h3 {
    font-size: 1.15rem;
    margin-bottom: 1.1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--surface-2);
    color: var(--text-on-light);
    font-weight: 800;
}

.ach-ops { border-top-color: #0891b2; }
.ach-recon { border-top-color: #10b981; }
.ach-qa { border-top-color: var(--accent-violet); }
.ach-qc { border-top-color: var(--accent-coral); }
.ach-train { border-top-color: #06b6d4; }
.ach-aware { border-top-color: #14b8a6; }

.ach-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.ach-table tr {
    border-bottom: 1px solid var(--surface-2);
}

.ach-table tr:last-child { border-bottom: none; }

.ach-table td {
    padding: 0.55rem 0;
    color: var(--text-on-light-muted);
}

.ach-table td:first-child {
    color: var(--text-on-light-muted);
}

.ach-table td strong {
    color: var(--text-on-light);
    font-weight: 800;
}

.ach-note {
    margin-top: 0.85rem;
    font-size: 0.82rem;
    color: var(--text-on-light-muted);
    line-height: 1.65;
}

/* ========== Projects detail — داكن ========== */
.projects-detail {
    background: var(--bg-deep);
    color: var(--text-on-dark);
}

.projects-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.35rem;
}

.project-detail-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

.project-detail-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: var(--shadow-glow-cyan);
}

.project-detail-header {
    background: linear-gradient(120deg, rgba(34, 211, 238, 0.2), rgba(167, 139, 250, 0.15));
    color: var(--text-on-dark);
    padding: 1.15rem 1.35rem;
    font-weight: 800;
    font-size: 1rem;
    border-inline-end: 3px solid var(--accent-violet);
}

.project-detail-card ul {
    list-style: none;
    padding: 1.15rem 1.35rem;
    margin: 0;
}

.project-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    filter: brightness(0.72) saturate(1.07);
}

.project-detail-card ul li {
    padding: 0.45rem 0;
    color: var(--text-on-dark-muted);
    line-height: 1.65;
    border-bottom: 1px solid var(--border-glass);
}

.project-detail-card ul li:last-child { border-bottom: none; }

/* ========== Profile ========== */
.profile-section {
    background: var(--surface);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-card {
    background: var(--white);
    padding: 1.85rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass-light);
    border-inline-end: 3px solid var(--accent-violet);
    transition: var(--transition);
}

.profile-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
}

.profile-card h3 {
    color: var(--text-on-light);
    font-size: 1.15rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--surface-2);
    font-weight: 800;
}

.profile-thumb {
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 0.9rem;
    border: 1px solid var(--border-glass-light);
    filter: saturate(1.05) contrast(1.03);
}

.profile-card ul {
    list-style: none;
}

.profile-card ul li {
    padding: 0.4rem 0;
    color: var(--text-on-light-muted);
    line-height: 1.65;
    position: relative;
    padding-inline-end: 1.1rem;
}

.profile-card ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
}

.profile-stats-inline {
    text-align: center;
    padding: 1.85rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass-light);
    box-shadow: var(--shadow-soft);
}

.profile-stats-inline p {
    color: var(--text-on-light-muted);
    margin: 0;
    line-height: 1.85;
    font-size: 0.98rem;
}

/* ========== Contact — مختلط: سطح فاتح + لوحة زجاجية ========== */
.contact {
    background: linear-gradient(160deg, var(--surface-2) 0%, var(--white) 45%, var(--surface) 100%);
    padding: 5.5rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border-glass-light);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    box-shadow: var(--shadow-soft);
}

.contact-item h4 {
    font-size: 1.1rem;
    color: var(--text-on-light);
    margin-bottom: 0.35rem;
    font-weight: 800;
}

.contact-item p {
    color: var(--text-on-light-muted);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass-light);
    box-shadow: var(--shadow-soft), 0 0 0 1px rgba(167, 139, 250, 0.08);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--border-glass-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-on-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px var(--accent-violet-dim);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.contact .btn-primary {
    align-self: flex-start;
}

/* ========== Footer ========== */
.footer {
    background: linear-gradient(180deg, var(--bg-deep) 0%, #08080c 100%);
    color: var(--text-on-dark);
    padding: 3.5rem 0 1.75rem;
    border-top: 1px solid rgba(34, 211, 238, 0.25);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.25rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 0.85rem;
    color: var(--text-on-dark);
    font-weight: 800;
}

.footer-section h3 {
    border: none;
    padding: 0;
    display: inline-block;
}

.footer-section h3 .logo-latin {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.footer-section p {
    color: var(--text-on-dark-muted);
    line-height: 1.85;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-on-dark-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-cyan);
    padding-inline-end: 6px;
}

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

.social-link {
    color: var(--text-on-dark-muted);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-violet);
    padding-inline-end: 6px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-glass);
    color: var(--text-on-dark-muted);
    font-size: 0.9rem;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        flex-direction: column;
        background: rgba(244, 244, 247, 0.97);
        backdrop-filter: blur(16px);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-soft);
        padding: 1.5rem 0;
        gap: 0;
        border-bottom: 1px solid var(--border-glass-light);
    }

    .nav-menu.active { right: 0; }

    .nav-menu .nav-link {
        color: var(--text-on-light);
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        color: #0e7490;
    }

    .nav-menu li { padding: 0.85rem 0; }

    .about-content,
    .contact-content { grid-template-columns: 1fr; }

    .section-media-card img {
        height: 200px;
    }

    .hero {
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        margin-inline: auto;
        padding: calc(var(--nav-height) + 2rem) 24px 100px;
    }

    .hero-content::after {
        top: auto;
        bottom: 5.5rem;
        right: 50%;
        transform: translateX(50%);
        width: min(200px, 50vw);
        height: 4px;
        background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-stats { grid-template-columns: repeat(2, 1fr); }

    .about-stats--bento .stat-card--feature,
    .about-stats--bento .stat-card--wide {
        grid-column: 1 / -1;
    }

    .services-grid,
    .portfolio-grid { grid-template-columns: 1fr; }

    .service-thumb {
        height: 170px;
    }

    .portfolio-image {
        height: 260px;
    }

    .portfolio-overlay {
        padding: 1.45rem;
    }

    .portfolio-overlay h3 {
        font-size: 1.1rem;
    }

    .portfolio-overlay p {
        font-size: 0.88rem;
        line-height: 1.75;
    }

    .cap-block { padding: 1.35rem; }
    .cap-cards { grid-template-columns: 1fr; }

    .cap-block-media {
        height: 160px;
    }

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

    .project-thumb {
        height: 150px;
    }

    .profile-thumb {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .about-stats { grid-template-columns: 1fr; }

    .hero-bg-photo {
        filter: blur(1px) brightness(0.5) saturate(1.05);
    }

    .section-media-card img {
        height: 180px;
    }

    .portfolio-image {
        height: 235px;
    }

    .portfolio-bg {
        filter: blur(5px) brightness(0.72) saturate(1.08);
    }

    .service-thumb,
    .profile-thumb {
        height: 145px;
    }

    .cap-block-media,
    .project-thumb {
        height: 140px;
    }
}

html {
    scroll-behavior: smooth;
}

/* ========== تقليل الحركة — وصولية ========== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-grid {
        animation: none;
        opacity: 0.55;
    }

    .scroll-indicator span::before {
        animation: none;
        opacity: 0.85;
    }

    section:not(.hero) {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reveal-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-fade-in,
    .animate-fade-in-delay,
    .animate-fade-in-delay-2 {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

html.reduce-motion {
    scroll-behavior: auto;
}

html.reduce-motion .hero-grid {
    animation: none;
}

html.reduce-motion .scroll-indicator span::before {
    animation: none;
}

html.reduce-motion section:not(.hero) {
    opacity: 1;
    transform: none;
    transition: none;
}

html.reduce-motion .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
}

html.reduce-motion .animate-fade-in,
html.reduce-motion .animate-fade-in-delay,
html.reduce-motion .animate-fade-in-delay-2 {
    animation: none;
    opacity: 1;
    transform: none;
}
