/* =============================================================
   TASNEEM AL-RAFIDAIN — INDUSTRIAL EDITORIAL THEME v2.0
   ============================================================= */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-ar);
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-color);
    background: #ffffff;
    overflow-x: hidden;
    font-weight: 400;
}

body.lang-en { font-family: var(--font-en); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    line-height: 1.08;
    letter-spacing: -.02em;
    font-weight: 800;
    color: var(--dark);
}

p { margin: 0 0 1em; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================================
   TYPOGRAPHY — EDITORIAL SCALE
   ============================================================= */

.display-xl {
    font-size: clamp(48px, 9vw, 140px);
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.04em;
}

.display-lg {
    font-size: clamp(40px, 6.5vw, 88px);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -.03em;
}

.display-md {
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.025em;
}

.display-sm {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.015em;
}

.overline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .28em;
    color: var(--primary);
}
.overline::before {
    content: "";
    width: 32px; height: 1px;
    background: var(--primary);
}
html[dir="rtl"] .overline { letter-spacing: .14em; }

.section-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: .08em;
}

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--gray);
    margin-bottom: 16px;
}

/* =============================================================
   BUTTONS — SHARP EDITORIAL
   ============================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all .3s cubic-bezier(.2,.8,.2,1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--dark);
    border-color: var(--dark);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--dark);
    color: #ffffff;
    border-color: var(--dark);
}
.btn-dark:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--dark);
    border-color: var(--dark);
}
.btn-outline:hover {
    background: var(--dark);
    color: #ffffff;
}

.btn-ghost {
    padding: 12px 0;
    background: transparent;
    border: none;
    color: var(--dark);
    border-bottom: 2px solid var(--dark);
    border-radius: 0;
    padding-bottom: 8px;
}
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }

.btn i, .btn svg { transition: transform .3s ease; }
.btn:hover i, .btn:hover svg { transform: translateX(4px); }
html[dir="rtl"] .btn:hover i, html[dir="rtl"] .btn:hover svg { transform: translateX(-4px); }

/* =============================================================
   TOPBAR
   ============================================================= */

.topbar {
    background: var(--topbar-bg);
    color: #d4d4d4;
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.topbar-info { display: flex; gap: 28px; flex-wrap: wrap; }
.topbar-info a, .topbar-info span {
    display: inline-flex; align-items: center; gap: 8px;
    color: #d4d4d4;
    transition: color .2s;
}
.topbar-info a:hover { color: var(--primary); }
.topbar-info i { color: var(--primary); font-size: 12px; }

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.15);
    padding: 4px 12px;
    letter-spacing: .12em;
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }

/* =============================================================
   HEADER / NAV
   ============================================================= */

.site-header {
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all .3s ease;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header.scrolled {
    background: var(--header-scrolled);
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 32px;
}

.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo img,
.site-logo .custom-logo,
.site-logo .custom-logo-link img {
    max-height: 44px !important;
    height: 44px !important;
    width: auto !important;
    background: transparent !important;
    border-radius: 8px;
    transition: transform .3s ease;
    object-fit: contain;
}
.site-logo .custom-logo-link {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
}
.site-logo:hover .custom-logo { transform: scale(1.05); }
.brand-text { text-decoration: none; color: inherit; }
.site-branding .brand-text {
    display: flex; flex-direction: column;
    line-height: 1.1;
}
.site-branding .brand-text .brand-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
}
.site-branding .brand-text .brand-sub {
    color: var(--primary);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-weight: 700;
    margin-top: 2px;
}
@media (max-width: 1200px) {
    .site-branding .brand-text { display: none; }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-close { display: none; }
.main-nav ul {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    gap: 4px;
}
.main-nav a {
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    letter-spacing: .02em;
    position: relative;
    transition: color .2s;
}
.main-nav a::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 16px; right: 16px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
html[dir="rtl"] .main-nav a::after { transform-origin: right; }
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: #ffffff; }
.main-nav a:hover::after,
.main-nav .current-menu-item > a::after,
.main-nav .current_page_item > a::after { transform: scaleX(1); }

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--primary);
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 1.5px solid var(--primary);
    transition: all .25s;
    line-height: 1;
}
.header-cta i { font-size: 11px; }
.header-cta:hover { background: var(--primary); color: #fff; }

.nav-toggle {
    display: none;
    background: none; border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
}

/* =============================================================
   HERO — EDITORIAL HERO
   ============================================================= */

.editorial-hero {
    position: relative;
    background: var(--dark);
    color: #ffffff;
    overflow: hidden;
    padding: 120px 0 100px;
    min-height: 92vh;
    display: flex;
    align-items: center;
}
.editorial-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.editorial-hero-bg .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
    filter: grayscale(100%) contrast(1.1);
}
.editorial-hero-bg .hero-slide.active {
    opacity: .35;
}
/* Single-image mode: no animation needed */
.editorial-hero:not(.has-slider) .hero-slide { transition: none; }
.editorial-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--dark) 30%, rgba(31,31,31,.5) 70%, transparent);
    z-index: 1;
}
.editorial-hero .container { position: relative; z-index: 2; width: 100%; }

.hero-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: rgba(255,255,255,.7);
}
.hero-meta::before {
    content: "";
    width: 60px; height: 2px;
    background: var(--primary);
}

.hero-title {
    font-size: clamp(52px, 9.5vw, 150px);
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.045em;
    margin: 0 0 32px;
    color: #ffffff;
    max-width: 18ch;
}
.hero-title .highlight {
    color: var(--primary);
    font-style: italic;
    font-weight: 900;
}

.hero-desc {
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.5;
    max-width: 560px;
    color: rgba(255,255,255,.85);
    margin-bottom: 48px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-scroll-cue {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255,255,255,.7);
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.hero-scroll-cue::after {
    content: "";
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,.4);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); }
}

/* =============================================================
   STATS STRIP
   ============================================================= */

.stats-strip {
    background: var(--primary);
    color: #ffffff;
    padding: 64px 0;
    position: relative;
    overflow: hidden;
}
.stats-strip::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--dark);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.stat-item {
    padding: 24px 32px;
    border-inline-start: 1px solid rgba(255,255,255,.22);
}
.stat-item:first-child { border-inline-start: none; }
.stat-number {
    font-size: clamp(40px, 5vw, 68px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.03em;
    display: block;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .18em;
    opacity: .9;
}

/* =============================================================
   SECTION — GENERIC
   ============================================================= */

.section {
    padding: var(--section-spacing) 0;
    position: relative;
}
.section-dark {
    background: var(--dark);
    color: #ffffff;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #ffffff; }
.section-light { background: var(--light); }

.section-head {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    margin-bottom: 72px;
    align-items: end;
}
.section-head .label-col { border-top: 2px solid var(--dark); padding-top: 24px; }
.section-dark .section-head .label-col { border-color: var(--primary); }
.section-head .title-col h2 {
    margin: 0;
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.03em;
}
.section-head .title-col p {
    margin-top: 16px;
    font-size: 18px;
    line-height: 1.6;
    color: #5a5a5a;
    max-width: 620px;
}
.section-dark .section-head .title-col p { color: rgba(255,255,255,.7); }

@media (max-width: 900px) {
    .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}

/* =============================================================
   EXPERTISE — 3 PILLARS
   ============================================================= */

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e8e4de;
}
.expertise-item {
    background: #ffffff;
    padding: 56px 40px;
    position: relative;
    overflow: hidden;
    transition: all .4s ease;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.expertise-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--dark);
    transform: translateY(100%);
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
    z-index: 0;
}
.expertise-item:hover::before { transform: translateY(0); }
.expertise-item > * { position: relative; z-index: 1; transition: color .4s ease; }
.expertise-item:hover h3,
.expertise-item:hover p,
.expertise-item:hover .expertise-arrow,
.expertise-item:hover .section-number { color: #ffffff; }
.expertise-item:hover .expertise-icon { color: var(--primary); border-color: var(--primary); }

.expertise-header {
    display: flex; justify-content: space-between; align-items: start;
    margin-bottom: 28px;
}
.expertise-icon {
    width: 56px; height: 56px;
    border: 2px solid var(--dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: var(--dark);
    transition: all .4s;
}
.expertise-item h3 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.expertise-item p {
    font-size: 15px;
    line-height: 1.65;
    color: #555;
    margin-bottom: 24px;
    flex-grow: 1;
}
.expertise-arrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-top: auto;
    color: var(--primary);
}

@media (max-width: 900px) {
    .expertise-grid { grid-template-columns: 1fr; }
    .expertise-item { min-height: auto; padding: 40px 28px; }
}

/* =============================================================
   WHY CHOOSE US
   ============================================================= */

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.why-item {
    padding: 40px 0;
    border-top: 2px solid var(--primary);
}
.why-item .big-num {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .15em;
    color: var(--primary);
    margin-bottom: 16px;
    display: inline-flex; align-items: center; gap: 12px;
}
.why-item .big-num::after {
    content: "";
    width: 48px; height: 1px;
    background: rgba(255,255,255,.3);
}
.why-item h3 {
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -.02em;
}
.why-item p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,.75);
}

@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; gap: 0; } }

/* =============================================================
   MISSION BLOCK
   ============================================================= */

.mission-split {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 80px;
    align-items: center;
}
.mission-text h2 {
    font-size: clamp(36px, 5vw, 68px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: 32px;
}
.mission-text h2 em {
    color: var(--primary);
    font-style: italic;
    font-weight: 900;
}
.mission-text .lede {
    font-size: 20px;
    line-height: 1.55;
    color: #333;
    margin-bottom: 32px;
    font-weight: 400;
}
.mission-pillars {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
}
.mission-pillars li {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}
.mission-pillars li:last-child { border-bottom: 1px solid #ddd; }
.mission-pillars .num {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary);
    flex-shrink: 0;
    min-width: 48px;
    letter-spacing: -.02em;
}
.mission-pillars h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -.01em;
}
.mission-pillars p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.mission-visual {
    position: relative;
    aspect-ratio: 3/4;
    background: var(--dark);
    overflow: hidden;
}
.mission-visual img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(30%) contrast(1.05);
    transition: filter .6s, transform .6s;
}
.mission-visual:hover img { filter: grayscale(0) contrast(1); transform: scale(1.03); }
.mission-visual .mission-badge {
    position: absolute;
    bottom: 24px; left: 24px; right: 24px;
    background: var(--primary);
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mission-visual .mission-badge .big {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -.02em;
}
.mission-visual .mission-badge .small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-weight: 700;
    text-align: end;
}

@media (max-width: 900px) { .mission-split { grid-template-columns: 1fr; gap: 48px; } }

/* =============================================================
   PROJECTS — EDITORIAL GRID
   ============================================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
}
.project-card {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    text-decoration: none;
    color: #ffffff;
    display: block;
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.project-card:hover { transform: translateY(-8px); }

.project-card:nth-child(6n+1) { grid-column: span 7; aspect-ratio: 16/10; }
.project-card:nth-child(6n+2) { grid-column: span 5; aspect-ratio: 4/5; }
.project-card:nth-child(6n+3) { grid-column: span 4; aspect-ratio: 4/5; }
.project-card:nth-child(6n+4) { grid-column: span 8; aspect-ratio: 16/10; }
.project-card:nth-child(6n+5) { grid-column: span 6; aspect-ratio: 16/11; }
.project-card:nth-child(6n+6) { grid-column: span 6; aspect-ratio: 16/11; }

.project-card .bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(70%) contrast(1.1);
    transition: all .6s ease;
    z-index: 0;
}
.project-card:hover .bg {
    filter: grayscale(0) contrast(1);
    transform: scale(1.05);
}
.project-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,15,15,.1) 0%, rgba(15,15,15,.85) 100%);
    z-index: 1;
    transition: background .4s ease;
}
.project-card:hover .overlay {
    background: linear-gradient(180deg, rgba(252,114,60,.2) 0%, rgba(15,15,15,.88) 100%);
}
.project-card .content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px;
    z-index: 2;
    color: #ffffff;
}
.project-card .tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .22em;
    padding: 6px 12px;
    background: var(--primary);
    color: #ffffff;
    margin-bottom: 16px;
}
.project-card h3 {
    color: #ffffff;
    font-size: clamp(22px, 2.2vw, 32px);
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.12;
    letter-spacing: -.02em;
}
.project-card .arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    margin-top: 14px;
    opacity: .85;
}

@media (max-width: 900px) {
    .projects-grid { grid-template-columns: 1fr; gap: 20px; }
    .project-card:nth-child(n) { grid-column: span 1; aspect-ratio: 4/3; }
}

/* =============================================================
   SINGLE PROJECT PAGE
   ============================================================= */

.project-single-hero {
    position: relative;
    min-height: 70vh;
    background: var(--dark);
    color: #ffffff;
    display: flex; align-items: flex-end;
    padding: 120px 0 80px;
    overflow: hidden;
}
.project-single-hero .bg-img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .55; filter: grayscale(30%);
    z-index: 0;
}
.project-single-hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, var(--dark) 0%, transparent 60%);
    z-index: 1;
}
.project-single-hero .container { position: relative; z-index: 2; }
.project-breadcrumb {
    font-size: 13px;
    letter-spacing: .15em;
    text-transform: uppercase;
    opacity: .75;
    margin-bottom: 24px;
}
.project-breadcrumb a { color: var(--primary); }
.project-single-hero h1 {
    font-size: clamp(36px, 6vw, 84px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.03em;
    margin: 0;
    color: #ffffff;
    max-width: 20ch;
}

.project-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    padding: 80px 0;
}
.project-meta-side {
    border-top: 2px solid var(--dark);
    padding-top: 24px;
}
.project-meta-side dl { margin: 0; display: grid; gap: 20px; }
.project-meta-side dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--gray);
    margin-bottom: 6px;
}
.project-meta-side dd {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}
.project-content-main {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}
.project-content-main h2, .project-content-main h3 {
    margin-top: 2em;
    font-size: 32px;
    font-weight: 800;
}
.project-content-main p { margin: 0 0 1.3em; }

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 0 120px;
}
.project-gallery .gitem {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
}
.project-gallery .gitem img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s, filter .5s;
    filter: grayscale(25%);
}
.project-gallery .gitem:hover img { transform: scale(1.08); filter: grayscale(0); }
.project-gallery .gitem.wide { grid-column: span 2; }

@media (max-width: 900px) {
    .project-body { grid-template-columns: 1fr; gap: 40px; padding: 48px 0; }
    .project-gallery { grid-template-columns: 1fr 1fr; }
    .project-gallery .gitem.wide { grid-column: span 2; }
}

/* =============================================================
   TEAM
   ============================================================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
}
.team-member {
    background: #ffffff;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    overflow: hidden;
    border: 1px solid #e6e2dc;
    transition: border-color .3s, transform .3s;
}
.team-member:hover { border-color: var(--primary); transform: translateY(-4px); }
.team-member-photo {
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center;
    background-color: var(--dark);
}
.team-member-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.team-member-body .role {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--primary);
    margin-bottom: 12px;
}
.team-member-body h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -.02em;
}
.team-member-contact {
    display: flex; flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #444;
}
.team-member-contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.team-member-contact a:hover { color: var(--primary); }
.team-member-contact i { color: var(--primary); width: 16px; flex-shrink: 0; }

@media (max-width: 900px) {
    .team-grid { grid-template-columns: 1fr; gap: 24px; }
    .team-member { grid-template-columns: 1fr; }
    .team-member-photo { aspect-ratio: 16/10; }
}

/* =============================================================
   CTA BANNER
   ============================================================= */

.cta-banner {
    background: var(--primary);
    color: #ffffff;
    padding: 96px 0;
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: "";
    position: absolute;
    top: -20%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.15), transparent 70%);
    z-index: 0;
}
.cta-banner .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    align-items: center;
}
.cta-banner h2 {
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0;
}
.cta-banner .btn {
    background: var(--dark);
    color: #ffffff;
    border-color: var(--dark);
    justify-self: end;
}
html[dir="rtl"] .cta-banner .btn { justify-self: start; }
.cta-banner .btn:hover {
    background: #ffffff;
    color: var(--dark);
    border-color: #ffffff;
}

@media (max-width: 900px) {
    .cta-banner .container { grid-template-columns: 1fr; text-align: center; }
    .cta-banner .btn, html[dir="rtl"] .cta-banner .btn { justify-self: center; }
}

/* =============================================================
   CONTACT
   ============================================================= */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}
.contact-info h2 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: 32px;
}
.contact-details {
    display: flex; flex-direction: column;
    gap: 28px;
    margin-top: 40px;
}
.contact-detail {
    display: flex; gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}
.contact-detail .icon {
    width: 48px; height: 48px;
    background: var(--primary);
    color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.contact-detail .txt h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--gray);
    margin-bottom: 6px;
}
.contact-detail .txt p, .contact-detail .txt a {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.contact-form-wrap {
    background: var(--dark);
    color: #ffffff;
    padding: 56px;
}
.contact-form-wrap h3 {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 32px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.contact-form { display: grid; gap: 20px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 16px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.3);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .3s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: rgba(255,255,255,.45);
    font-weight: 500;
}
.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form .btn { margin-top: 8px; justify-self: start; }
#contact-msg {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    display: none;
}
#contact-msg.show { display: block; }
#contact-msg.success { background: #2ecc71; color: #fff; }
#contact-msg.error { background: #e74c3c; color: #fff; }

@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .contact-form-wrap { padding: 32px 24px; }
    .contact-form .row { grid-template-columns: 1fr; }
}

/* =============================================================
   PAGE HERO (inner pages)
   ============================================================= */

.page-hero {
    background: var(--dark);
    color: #ffffff;
    padding: 140px 0 96px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1473341304170-971dccb5ac1e?w=1920&q=80');
    background-size: cover; background-position: center;
    opacity: .18;
    filter: grayscale(100%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .overline { color: var(--primary); margin-bottom: 20px; }
.page-hero h1 {
    color: #ffffff;
    font-size: clamp(40px, 6.5vw, 96px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.03em;
    margin: 0;
    max-width: 20ch;
}

/* =============================================================
   FOOTER
   ============================================================= */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 96px 0 32px;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-col h4 {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .22em;
    margin-bottom: 24px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: var(--footer-text); font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-about .site-branding {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-about p { font-size: 14px; line-height: 1.7; max-width: 360px; }

/* Footer logo — smaller + rounded corners (all screen sizes) */
.footer-about .custom-logo,
.footer-about .custom-logo-link img {
    max-height: 52px !important;
    height: 52px !important;
    width: auto !important;
    background: transparent !important;
    border-radius: 10px;
    object-fit: contain;
}
.footer-about .custom-logo-link {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
}

.footer-socials { display: flex; gap: 10px; margin-top: 20px; }
.footer-socials a {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    transition: all .3s;
}
.footer-socials a:hover { background: var(--primary); border-color: var(--primary); }

.footer-bottom {
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 16px;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* =============================================================
   RESPONSIVE NAV
   ============================================================= */

@media (max-width: 1024px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: fixed;
        top: 0;
        inset-inline-end: 0;
        width: 280px;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        padding: 80px 28px 28px;
        transform: translateX(100%);
        transition: transform .3s ease;
        z-index: 200;
        align-items: stretch;
    }
    html[dir="rtl"] .main-nav { transform: translateX(-100%); }
    /* `.open` must WIN over the RTL rule — same specificity, declared later,
       and forced with !important as a safety net for plugin/browser overrides. */
    html[dir="rtl"] .main-nav.open,
    html[dir="ltr"] .main-nav.open,
    .main-nav.open { transform: translateX(0) !important; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .main-nav a::after { display: none; }
    .nav-close {
        display: inline-flex;
        position: absolute;
        top: 20px; inset-inline-end: 20px;
        background: none; border: none;
        color: #fff; font-size: 28px;
        cursor: pointer;
    }
    .header-cta { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(3) { border-inline-start: none; }
    .stat-item { padding: 20px 24px; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item { border-inline-start: none !important; border-top: 1px solid rgba(255,255,255,.22); }
    .stat-item:first-child { border-top: none; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { justify-content: center; }
    .section-head { gap: 20px; }
    .expertise-item { padding: 32px 24px; }
}

/* =============================================================
   IMAGE GALLERY BLOCK
   ============================================================= */

.tanseem-gallery {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
}
.tanseem-gallery[data-cols="2"] { --cols: 2; }
.tanseem-gallery[data-cols="3"] { --cols: 3; }
.tanseem-gallery[data-cols="4"] { --cols: 4; }

.tanseem-gallery .gitem {
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--dark);
    position: relative;
}
.tanseem-gallery .gitem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s;
    filter: grayscale(15%);
}
.tanseem-gallery .gitem:hover img { transform: scale(1.06); filter: grayscale(0); }
.tanseem-gallery .gitem::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.3));
    opacity: 0;
    transition: opacity .3s;
}
.tanseem-gallery .gitem:hover::after { opacity: 1; }

@media (max-width: 900px) {
    .tanseem-gallery[data-cols="4"] { --cols: 3; }
}
@media (max-width: 600px) {
    .tanseem-gallery { gap: 8px; }
    .tanseem-gallery[data-cols="4"],
    .tanseem-gallery[data-cols="3"] { --cols: 2; }
}

/* =============================================================
   VIDEO EMBED BLOCK
   ============================================================= */

.tanseem-video {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--dark);
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 2px;
}
.tanseem-video iframe,
.tanseem-video video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
    object-fit: cover;
}

/* =============================================================
   LIGHTBOX
   ============================================================= */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; }
.lightbox-close {
    position: absolute;
    top: 24px; inset-inline-end: 24px;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    width: 48px; height: 48px;
    font-size: 20px;
    cursor: pointer;
}

/* =============================================================
   UTILS
   ============================================================= */

.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

[data-animate] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
[data-animate].visible {
    opacity: 1;
    transform: none;
}

.entry-content {
    font-size: 17px;
    line-height: 1.8;
}
.entry-content h2 { font-size: 32px; margin-top: 1.5em; }
.entry-content h3 { font-size: 24px; margin-top: 1.3em; }
.entry-content blockquote {
    border-inline-start: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 24px 0;
    font-style: italic;
    color: #555;
    background: #faf7f4;
}

/* =============================================================
   MOBILE POLISH
   ============================================================= */

/* Tablet portrait — 900px and below */
@media (max-width: 900px) {
    :root {
        --section-spacing: 56px;
    }
    .container { padding: 0 20px; }

    /* Topbar: drop address, keep only email + phone + lang */
    .topbar { padding: 8px 0; font-size: 12px; }
    .topbar .container { gap: 12px; }
    .topbar-info { gap: 16px; }
    .topbar-info > span:last-child { display: none; } /* hide address */
    .lang-switch { padding: 3px 10px; font-size: 11px; }

    /* Header */
    .site-header .container { padding-top: 14px; padding-bottom: 14px; gap: 12px; }
    .site-logo img { max-height: 38px !important; height: 38px !important; }

    /* Section head: tighter stack */
    .section-head { margin-bottom: 28px; gap: 12px; }
    .section-head .label-col { padding-top: 12px; }
    .section-head .title-col h2 { font-size: clamp(26px, 7vw, 40px); line-height: 1.1; }
    .section-head .title-col p { font-size: 15px; margin-top: 10px; line-height: 1.5; }
    .section-head .label-col .overline { font-size: 11px; }

    /* Hero: shorter on mobile */
    .editorial-hero {
        min-height: auto;
        padding: 64px 0 48px;
    }
    .hero-meta { margin-bottom: 24px; font-size: 11px; gap: 14px; }
    .hero-meta::before { width: 40px; }
    .hero-title {
        font-size: clamp(42px, 11vw, 72px) !important;
        line-height: .95;
        margin-bottom: 22px;
        max-width: 100%;
    }
    .hero-desc { font-size: 16px; margin-bottom: 32px; line-height: 1.55; }
    .hero-actions .btn { padding: 14px 24px; font-size: 12px; }

    /* Stats strip: 2 columns on tablet/phone for shorter page */
    .stats-strip { padding: 32px 0; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
    .stat-item { padding: 18px 20px; border-inline-start: 1px solid rgba(255,255,255,.22); border-top: none; }
    .stat-item:nth-child(odd) { border-inline-start: none; }
    .stat-item:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.22); }
    .stat-number { font-size: clamp(30px, 7vw, 46px) !important; margin-bottom: 4px; }
    .stat-label { font-size: 11px; letter-spacing: .14em; }

    /* Expertise / Why / Mission — compact on mobile */
    .expertise-grid { gap: 0; }
    .expertise-item { padding: 28px 22px; min-height: auto; }
    .expertise-item h3 { font-size: 20px; margin-bottom: 10px; }
    .expertise-item p { font-size: 14px; margin-bottom: 14px; line-height: 1.55; }
    .expertise-header { margin-bottom: 18px; }
    .expertise-icon { width: 48px; height: 48px; font-size: 18px; }
    .why-grid { gap: 24px; }
    .why-item { padding: 24px 0 0; }
    .why-item h3 { font-size: 22px; margin-bottom: 10px; }
    .why-item p { font-size: 14px; line-height: 1.55; }
    .why-item .big-num { margin-bottom: 10px; }
    .mission-split { gap: 32px; }
    .mission-text h2 { font-size: clamp(28px, 7vw, 42px); margin-bottom: 18px; }
    .mission-text .lede { font-size: 16px; margin-bottom: 20px; line-height: 1.55; }
    .mission-pillars { gap: 14px; }
    .mission-pillars li { padding: 14px 0; gap: 14px; }
    .mission-pillars .num { font-size: 17px; min-width: 32px; }
    .mission-pillars h4 { font-size: 15px; margin-bottom: 4px; }
    .mission-pillars p { font-size: 13px; line-height: 1.5; }
    .mission-visual { aspect-ratio: 3/2; }
    .mission-visual .mission-badge { padding: 12px 14px; }
    .mission-visual .mission-badge .big { font-size: 24px; }
    .mission-visual .mission-badge .small { font-size: 10px; letter-spacing: .15em; }

    /* Projects grid — 2 columns on mobile to halve page height */
    .projects-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .project-card:nth-child(n) { grid-column: span 1 !important; aspect-ratio: 1 !important; }
    .project-card .content { padding: 16px; }
    .project-card h3 { font-size: 15px !important; line-height: 1.2; }
    .project-card .tag { margin-bottom: 8px; font-size: 9px; padding: 3px 8px; letter-spacing: .15em; }
    .project-card .arrow { font-size: 10px; margin-top: 8px; letter-spacing: .12em; gap: 6px; }

    /* Single project hero */
    .project-single-hero { min-height: 46vh; padding: 80px 0 48px; }
    .project-single-hero h1 { font-size: clamp(32px, 8vw, 54px); }
    .project-body { padding: 48px 0; gap: 32px; }
    .project-meta-side { padding-top: 16px; }
    .project-content-main { font-size: 16px; line-height: 1.7; }
    .project-content-main h2, .project-content-main h3 { font-size: 24px; margin-top: 1.4em; }
    .project-gallery { grid-template-columns: 1fr; gap: 12px; padding-bottom: 64px; }
    .project-gallery .gitem.wide { grid-column: span 1; }

    /* Team — 2 columns on mobile, stacked internally */
    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    .team-member { grid-template-columns: 1fr; }
    .team-member-photo { aspect-ratio: 1; }
    .team-member-body { padding: 14px; }
    .team-member-body .role { font-size: 9px; margin-bottom: 6px; letter-spacing: .2em; }
    .team-member-body h3 { font-size: 15px; margin-bottom: 8px; line-height: 1.2; }
    .team-member-contact { gap: 4px; font-size: 11px; }
    .team-member-contact a { word-break: break-all; line-height: 1.35; }
    .team-member-contact i { width: 12px; font-size: 10px; }

    /* CTA banner */
    .cta-banner { padding: 40px 0; }
    .cta-banner h2 { font-size: clamp(22px, 6vw, 32px) !important; text-align: center; line-height: 1.2; }
    .cta-banner .btn { font-size: 12px; padding: 14px 26px; }
    .cta-banner .container { gap: 20px; }

    /* Contact */
    .contact-info h2 { font-size: clamp(28px, 7vw, 42px); margin-bottom: 20px; }
    .contact-detail { gap: 14px; }
    .contact-detail .icon { width: 40px; height: 40px; font-size: 15px; }
    .contact-detail .txt h4 { font-size: 10px; }
    .contact-detail .txt p, .contact-detail .txt a { font-size: 14px; }
    .contact-form-wrap { padding: 32px 22px; }
    .contact-form-wrap h3 { font-size: 22px; margin-bottom: 22px; }
    .contact-form input, .contact-form textarea { padding: 14px 0; font-size: 14px; }

    /* Page hero (inner) */
    .page-hero { padding: 96px 0 64px; }
    .page-hero h1 { font-size: clamp(32px, 8vw, 54px); }

    /* Footer — compact 2-column grid; About spans full width on top */
    .site-footer { padding: 36px 0 18px; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 22px 18px;
        padding-bottom: 24px;
    }
    .footer-about { grid-column: 1 / -1; }
    .footer-col h4 { margin-bottom: 10px; font-size: 11px; letter-spacing: .18em; }
    .footer-col ul li { margin-bottom: 6px; }
    .footer-col a, .footer-col li { font-size: 13px; line-height: 1.45; }
    .footer-about p { font-size: 13px; margin-top: 8px; max-width: 100%; line-height: 1.55; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 8px; padding-top: 14px; font-size: 11px; }

    /* Footer logo: small + rounded */
    .footer-about .site-branding { gap: 10px; margin-bottom: 14px; }
    .footer-about .custom-logo,
    .footer-about .custom-logo-link img {
        max-height: 40px !important;
        height: 40px !important;
        width: auto !important;
        background: transparent !important;
        border-radius: 8px;
    }
    .footer-about .custom-logo-link {
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        display: inline-flex;
        align-items: center;
        line-height: 0;
    }
    .footer-about .brand-text { display: flex; }
    .footer-about .brand-text .brand-name { font-size: 14px; }
    .footer-about .brand-text .brand-sub { font-size: 9px; }
    .footer-socials { margin-top: 12px; gap: 8px; }
    .footer-socials a { width: 34px; height: 34px; font-size: 12px; }

    /* Mission pillars card fixes */
    .mission-pillars li { gap: 16px; padding: 16px 0; }
    .mission-pillars .num { font-size: 18px; min-width: 36px; }

    /* Hide decorative scroll cue on mobile */
    .hero-scroll-cue { display: none; }
}

/* Phone — 600px and below */
@media (max-width: 600px) {
    :root {
        --section-spacing: 44px;
    }
    .container { padding: 0 16px; }

    /* Topbar: keep only phone + lang */
    .topbar .container { flex-wrap: nowrap; }
    .topbar-info > a:first-child { display: none; } /* hide email, keep phone */
    .topbar-info > a { font-size: 12px; }

    /* Header: logo only (brand text already hidden via 1200px rule) */
    .site-header .container { padding-top: 12px; padding-bottom: 12px; }
    .site-logo img { max-height: 34px !important; height: 34px !important; }
    .nav-toggle { font-size: 20px; padding: 6px; }

    /* Hero: compact */
    .editorial-hero {
        min-height: auto;
        padding: 48px 0 40px;
    }
    .hero-meta { margin-bottom: 18px; }
    .hero-title {
        font-size: clamp(34px, 11vw, 52px) !important;
        letter-spacing: -.03em;
        margin-bottom: 16px;
    }
    .hero-desc { font-size: 14px; margin-bottom: 22px; line-height: 1.5; }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }
    .hero-actions .btn {
        justify-content: center;
        width: 100%;
        padding: 15px 20px;
    }

    /* Stats — 2 columns, tighter */
    .stats-strip { padding: 26px 0; }
    .stat-item { padding: 14px 16px; }
    .stat-number { font-size: clamp(26px, 9vw, 38px) !important; margin-bottom: 2px; }
    .stat-label { font-size: 10px; letter-spacing: .12em; }

    /* Expertise */
    .expertise-item { padding: 24px 20px; }
    .expertise-icon { width: 44px; height: 44px; font-size: 16px; }
    .expertise-item h3 { font-size: 18px; }

    /* Mission split */
    .mission-split { gap: 24px; }
    .mission-visual { aspect-ratio: 16/10; }

    /* Section head */
    .section-head { margin-bottom: 32px; }
    .section-head .title-col h2 { font-size: clamp(26px, 8vw, 36px); }
    .section-head .title-col p { font-size: 15px; }

    /* Project cards — stay 2-column on phone, square aspect */
    .project-card { aspect-ratio: 1 !important; }
    .project-card .content { padding: 14px; }
    .project-card h3 { font-size: 13px !important; line-height: 1.2; }
    .project-card .tag { font-size: 9px !important; padding: 3px 7px !important; }

    /* Team — stays 2-col, even tighter */
    .team-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .team-member { grid-template-columns: 1fr; }
    .team-member-photo { aspect-ratio: 1; }
    .team-member-body { padding: 12px; }
    .team-member-body h3 { font-size: 13px; margin-bottom: 4px; line-height: 1.15; }
    .team-member-body .role { font-size: 9px; }
    .team-member-contact { gap: 3px; }
    .team-member-contact a { font-size: 10px; word-break: break-all; line-height: 1.3; }

    /* Contact form */
    .contact-form-wrap { padding: 26px 18px; }
    .contact-form textarea { min-height: 100px; }

    /* CTA */
    .cta-banner { padding: 32px 0; }

    /* Page hero */
    .page-hero { padding: 80px 0 48px; }
    .page-hero .overline { margin-bottom: 14px; font-size: 11px; letter-spacing: .22em; }
    .page-hero h1 { font-size: clamp(28px, 9vw, 44px); }

    /* Single project */
    .project-single-hero { padding: 64px 0 36px; min-height: 40vh; }
    .project-meta-side dl { gap: 14px; }
    .project-meta-side dt { font-size: 10px; }
    .project-meta-side dd { font-size: 14px; }

    /* Alternating rows on services page */
    .section > .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 40px 0 !important;
    }
    .section > .container > div[style*="grid-template-columns"] > div:first-child,
    .section > .container > div[style*="grid-template-columns"] > div:nth-child(2) {
        order: unset !important;
    }
}

/* Very narrow — 380px and below */
@media (max-width: 380px) {
    .container { padding: 0 14px; }
    .site-header .container { gap: 8px; }
    .site-logo img { max-height: 30px !important; height: 30px !important; }
    .topbar-info { gap: 12px; }
    .topbar-info > a { font-size: 11px; }
    .hero-title { font-size: clamp(30px, 13vw, 44px) !important; }
    .stats-grid .stat-item { padding: 14px 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    .team-member-contact a { font-size: 9px; }
    .team-member-body { padding: 10px; }
    .team-member-body h3 { font-size: 12px; }
}

/* Respect iOS safe-area insets on notched devices */
@supports (padding: max(0px)) {
    @media (max-width: 900px) {
        .container {
            padding-left: max(16px, env(safe-area-inset-left));
            padding-right: max(16px, env(safe-area-inset-right));
        }
    }
}

/* Mobile menu panel refinements */
@media (max-width: 1024px) {
    .main-nav {
        width: min(92vw, 380px);
        padding: 72px 28px 24px;
        box-shadow: 20px 0 60px rgba(0,0,0,.4);
    }
    /* Shadow direction flips in RTL (panel is on LEFT edge in RTL) */
    html[dir="rtl"] .main-nav { box-shadow: 20px 0 60px rgba(0,0,0,.4); }
    html[dir="ltr"] .main-nav { box-shadow: -20px 0 60px rgba(0,0,0,.4); }
    .main-nav a {
        font-size: 16px;
        padding: 16px 0;
        letter-spacing: 0;
    }
    .main-nav ul { gap: 0; }
    .nav-close { font-size: 24px; }
    /* When nav is open:
       1. Lock body scroll
       2. Revert header/topbar from `sticky` to `static` so they stop creating
          stacking contexts (sticky + any z-index always creates a stacking
          context). This lets the backdrop at z:150 paint above them.
       3. Show the backdrop — a body-level element so it lives at root stacking. */
    body.nav-open { overflow: hidden; }
    body.nav-open .site-header,
    body.nav-open .topbar {
        position: static !important;
        z-index: auto !important;
    }

    #nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.6);
        z-index: 150;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }
    body.nav-open #nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Smoother touch feedback on mobile */
@media (hover: none) {
    .project-card:hover { transform: none; }
    .project-card:active { transform: scale(.98); }
    .expertise-item:hover::before { transform: translateY(100%); }
    .team-member:hover { transform: none; }
    .btn:hover { transform: none; }
    .btn:active { transform: scale(.97); }
}
