/* ===========================================================================
   EPAC GROUP — Premium corporate stylesheet
   Palette: ivory/cream base · teal (#107080) · crimson (#C04050)
   Type: Cormorant Garamond (display) + Jost (body) / El Messiri + Tajawal (AR)
   =========================================================================== */

:root {
    --ivory:      #FAF6EE;
    --ivory-2:    #F4ECDC;
    --cream:      #EFE5D2;
    --paper:      #FFFFFF;
    --ink:        #20292B;
    --ink-soft:   #4A565A;
    --muted:      #7A8488;
    --line:       #E4D9C4;

    --teal:       #107080;
    --teal-deep:  #0E5963;
    --teal-dark:  #0A4750;
    --crimson:    #C04050;
    --crimson-dk: #9E2F3E;
    --gold:       #BE9B5C;

    --shadow-sm:  0 2px 10px rgba(20,60,66,.06);
    --shadow:     0 14px 40px -18px rgba(14,57,63,.28);
    --shadow-lg:  0 30px 70px -28px rgba(14,57,63,.40);

    --radius:     18px;
    --radius-sm:  12px;
    --radius-lg:  26px;

    --container:  1200px;
    --gutter:     clamp(20px, 5vw, 64px);

    --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-body:    'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ease: cubic-bezier(.22,.61,.36,1);
}

html[dir="rtl"] {
    --font-display: 'El Messiri', 'Tajawal', sans-serif;
    --font-body:    'Tajawal', 'Segoe UI', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.65;
    font-weight: 400;
    letter-spacing: .1px;
    overflow-x: clip;            /* clip (not hidden) so position:sticky header keeps working */
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; color: var(--ink); letter-spacing: .2px; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { font-weight: 700; letter-spacing: 0; }

::selection { background: var(--teal); color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
    position: fixed; left: 12px; top: 12px; z-index: 2000;
    background: var(--teal); color: #fff; padding: 10px 18px; border-radius: 8px;
    transform: translateY(-180%); transition: transform .25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }
html { overflow-x: clip; }
body { max-width: 100%; }

/* ===========================================================================
   Buttons & links
   =========================================================================== */
.btn {
    display: inline-flex; align-items: center; gap: .55em;
    padding: .95em 1.7em; border-radius: 100px;
    font-weight: 500; font-size: .98rem; letter-spacing: .3px;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
    will-change: transform;
}
.btn-sm { padding: .62em 1.15em; font-size: .85rem; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 12px 26px -12px rgba(16,112,128,.7); }
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-3px); box-shadow: 0 18px 34px -12px rgba(16,112,128,.75); }
.btn-outline { background: transparent; color: var(--teal-deep); box-shadow: inset 0 0 0 1.5px var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; transform: translateY(-3px); }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: #fff; transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.btn-light { background:#fff; color: var(--teal-deep); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.link-arrow {
    display: inline-flex; align-items: center; gap: .5em;
    font-weight: 500; color: var(--teal-deep); font-size: .95rem;
    transition: gap .3s var(--ease), color .3s;
}
.link-arrow .arr { transition: transform .35s var(--ease); }
.link-arrow:hover { color: var(--crimson); }
.link-arrow:hover .arr { transform: translateX(5px); }
html[dir="rtl"] .link-arrow .arr { transform: scaleX(-1); }
html[dir="rtl"] .link-arrow:hover .arr { transform: scaleX(-1) translateX(5px); }

/* ===========================================================================
   Header / nav
   =========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: box-shadow .35s, border-color .35s;
}
/* Backdrop lives on a pseudo-element — NOT on .site-header itself — so it does
   not become the containing block for the position:fixed mobile menu. */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(250,246,238,.85);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    transition: background .35s;
}
.site-header.scrolled::before { background: rgba(250,246,238,.97); }
.site-header.scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.header-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; }
.brand-logo { height: 46px; width: auto; transition: transform .4s var(--ease); }
.brand:hover .brand-logo { transform: scale(1.04); }

.nav-list { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav-link {
    position: relative; font-size: .96rem; font-weight: 400; color: var(--ink-soft);
    padding: 6px 2px; transition: color .3s;
}
.nav-link::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
    background: var(--crimson); transition: right .35s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }
.nav-link.is-active { color: var(--teal-deep); font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 500; }
.lang-btn { color: var(--muted); padding: 3px 5px; border-radius: 6px; transition: color .3s, background .3s; }
.lang-btn.is-active { color: var(--teal-deep); }
.lang-btn:hover { color: var(--crimson); }
.lang-sep { color: var(--line); }
.header-cta { display: inline-flex; }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; transition: background .3s; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================================================================
   Sections & shared blocks
   =========================================================================== */
section { position: relative; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.bg-cream { background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%); }
.bg-paper { background: var(--paper); }
.bg-teal { background: radial-gradient(120% 140% at 80% 0%, var(--teal) 0%, var(--teal-deep) 55%, var(--teal-dark) 100%); color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(34px, 5vw, 58px); }
.section-head.is-center { margin-inline: auto; text-align: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .6em;
    font-size: .76rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
    color: var(--crimson); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--crimson); display: inline-block; }
.is-center .eyebrow::after { content: ""; width: 26px; height: 1.5px; background: var(--crimson); display: inline-block; }
.section-title { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.bg-teal .section-title, .bg-teal .eyebrow { color: #fff; }
.bg-teal .eyebrow { color: #fff; opacity: .9; }
.bg-teal .eyebrow::before, .bg-teal .eyebrow::after { background: rgba(255,255,255,.6); }
.section-intro { margin-top: 18px; font-size: 1.08rem; color: var(--ink-soft); }
.bg-teal .section-intro { color: rgba(255,255,255,.85); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 2.6vw, 34px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(22px, 2.6vw, 34px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2vw, 28px); }

/* ===========================================================================
   Hero
   =========================================================================== */
.hero {
    position: relative; overflow: hidden;
    padding: clamp(70px, 12vw, 130px) 0 clamp(60px, 9vw, 110px);
    background:
        radial-gradient(60% 80% at 85% -10%, rgba(16,112,128,.10) 0%, transparent 60%),
        radial-gradient(50% 60% at 0% 110%, rgba(192,64,80,.08) 0%, transparent 60%),
        linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
}
.hero-shape { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; pointer-events: none; }
.hero-shape.s1 { width: 340px; height: 340px; top: -90px; inset-inline-end: -60px; background: radial-gradient(circle at 30% 30%, rgba(16,112,128,.18), transparent 70%); }
.hero-shape.s2 { width: 260px; height: 260px; bottom: -70px; inset-inline-start: 6%; background: radial-gradient(circle at 60% 40%, rgba(192,64,80,.14), transparent 70%); }
.hero-inner { position: relative; max-width: 880px; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .7em;
    font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--teal-deep); background: rgba(255,255,255,.65); border: 1px solid var(--line);
    padding: 8px 16px; border-radius: 100px; margin-bottom: 26px; box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); box-shadow: 0 0 0 4px rgba(192,64,80,.18); }
.hero h1 { font-size: clamp(2.7rem, 7vw, 5.2rem); line-height: 1.04; letter-spacing: -.5px; }
.hero h1 .accent { color: var(--teal); font-style: italic; }
.hero-sub { margin-top: 26px; font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--ink-soft); max-width: 660px; }
.hero-cta { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-strip { margin-top: clamp(46px, 7vw, 80px); display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; border-top: 1px solid var(--line); padding-top: 28px; }
.hero-strip .hs-item { display: flex; flex-direction: column; }
.hero-strip .hs-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--teal-deep); line-height: 1; }
.hero-strip .hs-label { font-size: .82rem; color: var(--muted); letter-spacing: .03em; }

/* ===========================================================================
   Video hero
   =========================================================================== */
.video-hero {
    position: relative; overflow: hidden;
    min-height: min(92vh, 820px);
    display: flex; align-items: center;
    color: #fff;
}
.video-hero .vh-media { position: absolute; inset: 0; z-index: 0; }
.video-hero video, .video-hero .vh-poster {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.video-hero::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(180deg, rgba(10,71,80,.42) 0%, rgba(10,71,80,.30) 40%, rgba(10,55,62,.86) 100%),
        radial-gradient(70% 60% at 80% 10%, rgba(16,112,128,.30), transparent 60%);
}
.video-hero .container { position: relative; z-index: 2; padding-block: clamp(80px, 12vh, 140px); }
.vh-inner { max-width: 820px; }
.vh-eyebrow {
    display: inline-flex; align-items: center; gap: .7em;
    font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
    padding: 8px 16px; border-radius: 100px; margin-bottom: 24px; backdrop-filter: blur(6px);
}
.vh-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); box-shadow: 0 0 0 0 rgba(192,64,80,.6); animation: pulseDot 2.4s var(--ease) infinite; }
.video-hero h1 { color: #fff; font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.05; letter-spacing: -.5px; text-shadow: 0 10px 40px rgba(0,0,0,.25); }
.video-hero h1 .accent { color: #fff; font-style: italic; position: relative; }
.video-hero h1 .accent::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .09em; background: var(--crimson); border-radius: 2px; transform: scaleX(0); transform-origin: left; animation: underline 1s var(--ease) .6s forwards; }
html[dir="rtl"] .video-hero h1 .accent::after { transform-origin: right; }
.vh-sub { margin-top: 24px; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: rgba(255,255,255,.92); max-width: 620px; }
.vh-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.vh-cta .btn-ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); backdrop-filter: blur(4px); }
.vh-cta .btn-ghost:hover { background: rgba(255,255,255,.24); }
.vh-scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(255,255,255,.8); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.vh-scroll .mouse { width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.6); border-radius: 12px; position: relative; }
.vh-scroll .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 7px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: scrollWheel 1.8s var(--ease) infinite; }

@keyframes pulseDot { 0%{ box-shadow:0 0 0 0 rgba(192,64,80,.5);} 70%{ box-shadow:0 0 0 9px rgba(192,64,80,0);} 100%{ box-shadow:0 0 0 0 rgba(192,64,80,0);} }
@keyframes underline { to { transform: scaleX(1); } }
@keyframes scrollWheel { 0%{ opacity:0; transform:translateX(-50%) translateY(0);} 40%{opacity:1;} 100%{ opacity:0; transform:translateX(-50%) translateY(10px);} }

/* ===========================================================================
   Animated section dividers
   =========================================================================== */
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0; position: relative; }
.divider .dv-line { height: 1px; width: clamp(60px, 18vw, 200px); background: linear-gradient(90deg, transparent, var(--line)); }
.divider .dv-line:last-of-type { background: linear-gradient(90deg, var(--line), transparent); }
.divider .dv-diamond { width: 9px; height: 9px; background: var(--crimson); transform: rotate(45deg); border-radius: 2px; animation: diamondPulse 3s var(--ease) infinite; }
.divider .dv-spark { position: absolute; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px 2px rgba(16,112,128,.6); opacity: .85; animation: sparkTravel 5s linear infinite; }
.divider-dark .dv-line { background: linear-gradient(90deg, transparent, rgba(255,255,255,.3)); }
.divider-dark .dv-line:last-of-type { background: linear-gradient(90deg, rgba(255,255,255,.3), transparent); }
.divider-dark .dv-diamond { background: #fff; }
.divider-dark .dv-spark { background: #fff; box-shadow: 0 0 10px 2px rgba(255,255,255,.6); }
@keyframes diamondPulse { 0%,100%{ transform:rotate(45deg) scale(1); opacity:1;} 50%{ transform:rotate(45deg) scale(1.5); opacity:.6;} }
@keyframes sparkTravel { 0%{ left:calc(50% - clamp(60px,18vw,200px) - 14px); opacity:0;} 10%{opacity:.9;} 50%{ left:calc(50% + clamp(60px,18vw,200px) + 14px); opacity:.9;} 51%,100%{ opacity:0;} }

/* ===========================================================================
   Activity band — interactive vectors
   =========================================================================== */
.activity-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px 26px 34px; text-align: center; box-shadow: var(--shadow-sm);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
    cursor: default; outline: none;
}
.activity-card:hover, .activity-card:focus-visible { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.activity-art { height: 168px; display: grid; place-items: center; margin-bottom: 14px; }
.vec { width: 100%; max-width: 200px; height: 168px; }
.activity-title { font-size: 1.35rem; margin-bottom: 6px; }
.activity-desc { font-size: .86rem; color: var(--muted); letter-spacing: .02em; }

/* shared vector styling */
.vg-ground { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.vg-st  { stroke: var(--teal-deep); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.vg-st2 { stroke: var(--teal); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.vg-fill { fill: var(--teal-deep); }
.vg-st-fill { fill: var(--crimson); }
.vg-hole { fill: var(--ivory); }
.vg-cable { stroke: var(--ink-soft); stroke-width: 2; }
.vg-load { fill: var(--crimson); }
.vg-leaf { fill: var(--teal); }

/* --- Crane (animates continuously; speeds up on hover) --- */
.crane-sway { transform-origin: 63px 180px; animation: craneSway 7s var(--ease) infinite; }
.crane-jib  { transform-origin: 63px 50px; animation: jibActive 5s var(--ease) infinite; }
.crane-hook, .crane-load { transform-origin: 150px 92px; animation: hookLift 5s var(--ease) infinite; }
@keyframes craneSway { 0%,100%{ transform: rotate(-.6deg);} 50%{ transform: rotate(.6deg);} }
@keyframes jibActive { 0%,100%{ transform: rotate(-9deg);} 50%{ transform: rotate(9deg);} }
@keyframes hookLift { 0%,100%{ transform: translateY(8px);} 50%{ transform: translateY(-12px);} }
.activity-construction:hover .crane-jib, .activity-construction:focus-visible .crane-jib { animation-duration: 3.2s; }
.activity-construction:hover .crane-hook, .activity-construction:hover .crane-load,
.activity-construction:focus-visible .crane-hook, .activity-construction:focus-visible .crane-load { animation-duration: 3.2s; }

/* --- Interiors (lamp swings + glows continuously) --- */
.lamp-swing { transform-origin: 118px 34px; animation: lampActive 3.4s var(--ease) infinite; }
.lamp-glow { fill: var(--gold); opacity: .45; animation: glowPulse 3.4s var(--ease) infinite; }
.lamp-bulb { fill: #ffe7a3; transition: fill .4s; }
.vg-leaf { transform-origin: 146px 138px; }
@keyframes lampActive { 0%,100%{ transform: rotate(-7deg);} 50%{ transform: rotate(7deg);} }
@keyframes glowPulse { 0%,100%{ opacity:.32;} 50%{ opacity:.7;} }
.activity-interiors:hover .lamp-swing, .activity-interiors:focus-visible .lamp-swing { animation-duration: 2.2s; }
.activity-interiors:hover .lamp-glow, .activity-interiors:focus-visible .lamp-glow { animation-duration: 2.2s; }

/* --- MEP gears (spin continuously; faster on hover) --- */
.gear { transform-box: fill-box; transform-origin: center; }
.gear-a { animation: spin 7s linear infinite; }
.gear-b { animation: spinRev 7s linear infinite; }
.wrench { transform-box: fill-box; transform-origin: 50px 150px; animation: wrenchIdle 4.5s var(--ease) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinRev { to { transform: rotate(-360deg); } }
@keyframes wrenchIdle { 0%,100%{ transform: rotate(-6deg);} 50%{ transform: rotate(5deg);} }
.activity-mep:hover .gear-a, .activity-mep:focus-visible .gear-a { animation-duration: 3s; }
.activity-mep:hover .gear-b, .activity-mep:focus-visible .gear-b { animation-duration: 3s; }
.activity-mep:hover .wrench, .activity-mep:focus-visible .wrench { animation-duration: 1.6s; }

/* float for hero soft shapes */
@keyframes floatY { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-16px);} }

/* ===========================================================================
   Animated stat icons (homepage stats band, on teal)
   =========================================================================== */
.stat-icon { width: 40px; height: 40px; margin: 0 auto 10px; }
.stat-vec { width: 100%; height: 100%; overflow: visible; }
.stat-vec .b { fill: rgba(255,255,255,.92); transform-box: fill-box; transform-origin: bottom; }
.sv-build .b1 { animation: barPulse 2.2s var(--ease) infinite; }
.sv-build .b2 { animation: barPulse 2.2s var(--ease) .25s infinite; }
.sv-build .b3 { animation: barPulse 2.2s var(--ease) .5s infinite; }
@keyframes barPulse { 0%,100%{ transform: scaleY(.82);} 50%{ transform: scaleY(1);} }

.sv-check .ring { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 2.5; }
.sv-check .tick { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: drawTick 2.6s var(--ease) infinite; }
@keyframes drawTick { 0%{ stroke-dashoffset: 30;} 35%,70%{ stroke-dashoffset: 0;} 100%{ stroke-dashoffset: 30;} }

.sv-star .star { fill: rgba(255,255,255,.92); transform-box: fill-box; transform-origin: center; animation: twinkle 2.8s var(--ease) infinite; }
@keyframes twinkle { 0%,100%{ transform: scale(.82) rotate(0deg); opacity:.7;} 50%{ transform: scale(1) rotate(12deg); opacity:1;} }

.sv-heart .heart { fill: rgba(255,255,255,.92); transform-box: fill-box; transform-origin: center; animation: heartbeat 1.8s var(--ease) infinite; }
@keyframes heartbeat { 0%,100%{ transform: scale(.85);} 15%{ transform: scale(1.05);} 30%{ transform: scale(.92);} 45%{ transform: scale(1);} }

/* ===========================================================================
   Company cards
   =========================================================================== */
.company-card {
    background: var(--paper); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    display: flex; flex-direction: column;
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
}
.company-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cc-media { position: relative; aspect-ratio: 3/2; overflow: hidden; display: block; }
.cc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.company-card:hover .cc-media img { transform: scale(1.07); }
.cc-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10,71,80,.55) 100%); }
.cc-est {
    position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
    font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    background: rgba(255,255,255,.92); color: var(--teal-deep); padding: 6px 12px; border-radius: 100px;
}
.cc-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.cc-tagline { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--crimson); }
.cc-name { font-size: 1.5rem; margin: 10px 0 12px; }
.cc-name a { transition: color .3s; }
.cc-name a:hover { color: var(--teal); }
.cc-desc { color: var(--ink-soft); font-size: .98rem; flex: 1; }
.cc-body .link-arrow { margin-top: 20px; }
.company-card { border-top: 4px solid var(--accent, var(--teal)); }

/* ===========================================================================
   Project cards
   =========================================================================== */
.project-card {
    background: var(--paper); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    display: flex; flex-direction: column;
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.pc-media { position: relative; aspect-ratio: 4/3; overflow: hidden; display: block; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project-card:hover .pc-media img { transform: scale(1.08); }
.pc-cat {
    position: absolute; bottom: 12px; inset-inline-start: 12px;
    font-size: .72rem; font-weight: 600; letter-spacing: .05em;
    background: rgba(16,112,128,.94); color: #fff; padding: 6px 13px; border-radius: 100px;
    backdrop-filter: blur(4px);
}
.pc-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.pc-title { font-size: 1.32rem; line-height: 1.2; margin-bottom: 8px; }
.pc-title a { transition: color .3s; }
.pc-title a:hover { color: var(--teal); }
.pc-companies { font-size: .8rem; font-weight: 500; color: var(--crimson); letter-spacing: .02em; margin-bottom: 12px; }
.pc-desc { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.pc-role { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); background: var(--ivory-2); border-radius: 10px; padding: 11px 14px; border-inline-start: 3px solid var(--teal); }
.pc-role-label { font-weight: 600; color: var(--teal-deep); }
.pc-body .link-arrow { margin-top: 18px; }

/* ===========================================================================
   Filters (projects page)
   =========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: clamp(30px, 4vw, 48px); }
.filter-btn {
    padding: .6em 1.25em; border-radius: 100px; font-size: .9rem; font-weight: 500;
    color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line);
    transition: all .3s var(--ease);
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal-deep); }
.filter-btn.is-active { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 10px 22px -12px rgba(16,112,128,.8); }
.project-card.is-hidden { display: none; }
.project-card.filtering { animation: fadeUp .5s var(--ease) both; }

/* ===========================================================================
   Why / feature cards
   =========================================================================== */
.feature-card {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--radius); padding: 30px 28px; transition: transform .4s var(--ease), background .4s;
}
.feature-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.12); }
.feature-card .fc-num { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: rgba(255,255,255,.55); }
.feature-card h3 { color: #fff; font-size: 1.3rem; margin: 12px 0 10px; }
.feature-card p { color: rgba(255,255,255,.8); font-size: .96rem; }

/* ---- Stats / counters ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px,2vw,30px); }
.stat { text-align: center; padding: 8px; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--teal-deep); line-height: 1; }
.bg-teal .stat-num { color: #fff; }
.stat-label { margin-top: 8px; font-size: .9rem; color: var(--muted); letter-spacing: .03em; }
.bg-teal .stat-label { color: rgba(255,255,255,.8); }

/* ===========================================================================
   Team cards
   =========================================================================== */
.team-card {
    background: var(--paper); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.team-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.tc-media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--cream); }
.tc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.team-card:hover .tc-media img { transform: scale(1.05); }
.tc-badge {
    position: absolute; top: 12px; inset-inline-end: 12px;
    font-size: .68rem; font-weight: 600; letter-spacing: .04em;
    background: rgba(190,155,92,.95); color: #fff; padding: 5px 11px; border-radius: 100px;
}
.tc-body { padding: 22px 24px 26px; }
.tc-name { font-size: 1.35rem; }
.tc-title { display: inline-block; margin: 4px 0 12px; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--crimson); }
.tc-bio { color: var(--ink-soft); font-size: .93rem; }

/* ===========================================================================
   Breadcrumbs / page hero
   =========================================================================== */
.page-hero {
    padding: clamp(56px, 8vw, 92px) 0 clamp(30px, 4vw, 46px);
    background:
        radial-gradient(55% 90% at 88% 0%, rgba(16,112,128,.10), transparent 60%),
        linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
}
.page-hero .eyebrow { color: var(--crimson); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: 18ch; }
.page-hero .lead { margin-top: 18px; font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; }
.breadcrumbs { background: transparent; padding: 16px 0 0; font-size: .86rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-inline-end: 8px; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); transition: color .3s; }
.breadcrumbs a:hover { color: var(--teal); }
.breadcrumbs [aria-current] span { color: var(--teal-deep); font-weight: 500; }

/* ===========================================================================
   Company / project detail
   =========================================================================== */
.detail-hero { position: relative; overflow: hidden; min-height: 420px; display: flex; align-items: flex-end; color: #fff; }
.detail-hero img.dh-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,71,80,.25) 0%, rgba(10,71,80,.82) 100%); z-index: 1; }
.detail-hero .container { position: relative; z-index: 2; padding-block: clamp(40px, 6vw, 72px); }
.detail-hero .eyebrow { color: #fff; opacity: .92; }
.detail-hero .eyebrow::before { background: rgba(255,255,255,.7); }
.detail-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.detail-hero .dh-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .92rem; color: rgba(255,255,255,.9); }
.detail-hero .dh-meta b { font-weight: 600; }

.prose { max-width: 760px; }
.prose p { color: var(--ink-soft); font-size: 1.06rem; margin-bottom: 1em; }
.lead-text { font-size: 1.18rem; color: var(--ink); }

.split { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.services-list { display: grid; gap: 12px; }
.services-list li {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: .98rem; transition: transform .3s, box-shadow .3s;
}
.services-list li:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
html[dir="rtl"] .services-list li:hover { transform: translateX(-4px); }
.services-list .chk { color: var(--teal); font-weight: 700; flex-shrink: 0; }

.info-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.info-card h3 { font-size: 1.2rem; margin-bottom: 16px; }
.info-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.info-row:last-child { border-bottom: none; }
.info-row .ir-k { color: var(--muted); }
.info-row .ir-v { font-weight: 500; color: var(--ink); text-align: end; }

/* ---- Gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery a { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery a:hover img { transform: scale(1.08); }
.gallery a:first-child { grid-column: span 2; grid-row: span 2; }

/* ---- Lightbox ---- */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(12,30,33,.92); display: none; align-items: center; justify-content: center; padding: 4vw; opacity: 0; transition: opacity .3s; }
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox .lb-close { position: absolute; top: 18px; inset-inline-end: 22px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; }
.lightbox .lb-prev { inset-inline-start: 18px; } .lightbox .lb-next { inset-inline-end: 18px; }

/* ===========================================================================
   CTA block
   =========================================================================== */
.cta-block { text-align: center; }
.cta-block h2 { font-size: clamp(2rem, 4vw, 3rem); color: #fff; }
.cta-block p { color: rgba(255,255,255,.85); max-width: 560px; margin: 16px auto 30px; font-size: 1.08rem; }
.cta-block .btn-light { font-size: 1.02rem; padding: 1em 2em; }

/* ===========================================================================
   About — values
   =========================================================================== */
.value-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s; }
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.value-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: #fff; font-size: 1.4rem; margin-bottom: 16px; }
.value-card:nth-child(even) .value-ico { background: linear-gradient(135deg, var(--crimson), var(--crimson-dk)); }
.value-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); font-size: .96rem; }

.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px,2.5vw,30px); }
.mv-card { border-radius: var(--radius); padding: 36px; border: 1px solid var(--line); }
.mv-card.mission { background: linear-gradient(140deg, #fff, var(--ivory-2)); }
.mv-card.vision { background: linear-gradient(140deg, var(--teal-deep), var(--teal-dark)); color: #fff; }
.mv-card h3 { font-size: 1.7rem; margin-bottom: 14px; }
.mv-card.vision h3 { color: #fff; }
.mv-card p { font-size: 1.04rem; color: var(--ink-soft); }
.mv-card.vision p { color: rgba(255,255,255,.88); }

.structure-flow { display: grid; gap: 20px; }
.structure-top { text-align: center; }
.structure-node { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-sm); }
.structure-node.parent { background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: #fff; display: inline-block; }
.structure-node.parent h3 { color: #fff; }
.structure-children { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.structure-node h3 { font-size: 1.2rem; }
.structure-node p { font-size: .9rem; color: var(--ink-soft); margin-top: 6px; }
.structure-connector { width: 2px; height: 30px; background: var(--line); margin: 0 auto; }

/* ===========================================================================
   Contact
   =========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.contact-info { display: grid; gap: 16px; }
.ci-item { display: flex; gap: 16px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: transform .35s var(--ease), box-shadow .35s; }
.ci-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.ci-ico { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: var(--ivory-2); color: var(--teal-deep); font-size: 1.25rem; }
.ci-item h3 { font-size: 1.05rem; margin-bottom: 3px; }
.ci-item a, .ci-item p { color: var(--ink-soft); font-size: .96rem; word-break: break-word; }
.ci-item a:hover { color: var(--teal); }

.contact-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .86rem; font-weight: 500; margin-bottom: 7px; color: var(--ink); }
.field label .req { color: var(--crimson); }
.field input, .field textarea {
    width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line); background: var(--ivory); font: inherit; color: var(--ink);
    transition: border-color .3s, box-shadow .3s, background .3s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(16,112,128,.12); }
.field.invalid input, .field.invalid textarea { border-color: var(--crimson); }
.field .err { display: none; color: var(--crimson); font-size: .8rem; margin-top: 5px; }
.field.invalid .err { display: block; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.form-success { display: none; background: rgba(16,112,128,.1); border: 1px solid var(--teal); color: var(--teal-deep); padding: 16px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .96rem; }
.form-success.show { display: block; animation: fadeUp .5s var(--ease); }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-top: 8px; }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; filter: grayscale(.2) contrast(1.02); }

/* ===========================================================================
   Footer
   =========================================================================== */
.site-footer { background: linear-gradient(180deg, var(--teal-deep) 0%, var(--teal-dark) 100%); color: rgba(255,255,255,.82); padding-top: clamp(54px, 7vw, 84px); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr; gap: clamp(28px, 3vw, 50px); padding-bottom: 50px; }
.footer-logo { height: 50px; width: auto; display: block; }
.footer-about { margin: 18px 0 14px; font-size: .94rem; max-width: 34ch; color: rgba(255,255,255,.78); }
.footer-addr { font-size: .9rem; color: rgba(255,255,255,.6); }
.footer-title { color: #fff; font-size: 1.05rem; letter-spacing: .04em; margin-bottom: 18px; font-family: var(--font-body); font-weight: 600; }
.footer-links li, .footer-contact li { margin-bottom: 11px; font-size: .94rem; }
.footer-links a { color: rgba(255,255,255,.78); transition: color .3s, padding .3s; }
.footer-links a:hover { color: #fff; padding-inline-start: 5px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,.78); }
.footer-contact a:hover { color: #fff; }
.fc-ico { color: rgba(255,255,255,.55); }
.footer-lang { margin-top: 18px; display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.footer-lang a { color: rgba(255,255,255,.6); }
.footer-lang a.is-active, .footer-lang a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 22px 0; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .85rem; color: rgba(255,255,255,.6); }
.footer-credit a { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.35); transition: color .3s, border-color .3s; }
.footer-credit a:hover { color: var(--gold); border-color: var(--gold); }

.to-top { position: fixed; bottom: 92px; inset-inline-end: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 1.2rem; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .4s var(--ease); z-index: 940; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--teal-deep); transform: translateY(-3px); }

/* Floating WhatsApp button */
.wa-float {
    position: fixed; bottom: 26px; inset-inline-end: 24px; z-index: 950;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25D366; color: #fff; display: grid; place-items: center;
    box-shadow: 0 14px 30px -8px rgba(37,211,102,.7);
    transition: transform .35s var(--ease), box-shadow .35s;
    animation: waPulse 2.8s ease-in-out infinite;
}
.wa-float:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 18px 38px -8px rgba(37,211,102,.8); }
.wa-float svg { display: block; }
@keyframes waPulse { 0%,100%{ box-shadow: 0 14px 30px -8px rgba(37,211,102,.7), 0 0 0 0 rgba(37,211,102,.5); } 70%{ box-shadow: 0 14px 30px -8px rgba(37,211,102,.7), 0 0 0 16px rgba(37,211,102,0); } }
@media (max-width: 680px) { .wa-float { width: 52px; height: 52px; bottom: 20px; inset-inline-end: 18px; } .to-top { bottom: 82px; inset-inline-end: 20px; } }

/* ===========================================================================
   Scroll reveal & animations
   =========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 1024px) {
    .grid-3, .gallery, .structure-children { grid-template-columns: repeat(2, 1fr); }
    .grid-4, .stats { grid-template-columns: repeat(2, 1fr); }
    .split, .contact-grid, .mv-grid { grid-template-columns: 1fr; }
    .gallery a:first-child { grid-column: span 2; grid-row: auto; }
}

@media (max-width: 860px) {
    .header-cta { display: none; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; inset: 0 0 0 auto; width: min(84vw, 340px);
        height: 100dvh; min-height: 100vh;
        background: var(--ivory); box-shadow: var(--shadow-lg);
        transform: translateX(100%); transition: transform .4s var(--ease);
        padding: 84px 26px 32px; z-index: 1100; overflow-y: auto;
        display: flex; flex-direction: column; justify-content: center;
    }
    html[dir="rtl"] .main-nav { inset: 0 auto 0 0; transform: translateX(-100%); }
    .main-nav.open { transform: translateX(0); }
    .nav-list { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
    .nav-link { font-size: 1.2rem; padding: 16px 6px; border-bottom: 1px solid var(--line); display: block; }
    .nav-link::after { display: none; }
    body.nav-open { overflow: hidden; }
    /* Backdrop MUST sit BELOW the header (z1000) so the drawer's links — which
       live inside the header's stacking context — remain clickable. */
    .nav-backdrop { position: fixed; inset: 0; background: rgba(20,40,44,.5); opacity: 0; visibility: hidden; transition: opacity .35s; z-index: 990; }
    .nav-backdrop.show { opacity: 1; visibility: visible; }
    /* keep the hamburger/X tappable above the open drawer */
    .header-actions { position: relative; z-index: 1200; }
}

@media (max-width: 680px) {
    .grid-2, .grid-4, .gallery, .structure-children { grid-template-columns: 1fr; }
    .grid-3:not(.activity-grid) { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .gallery a:first-child { grid-column: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .hero-strip { gap: 16px 28px; }
    .hero-strip .hs-num { font-size: 1.6rem; }

    /* Sections requested as TWO cards per row on mobile */
    .mob-2 { grid-template-columns: repeat(2, 1fr) !important; gap: 14px; }
    .mob-2 .feature-card { padding: 20px 16px; }
    .mob-2 .feature-card h3 { font-size: 1.05rem; }
    .mob-2 .feature-card p { font-size: .85rem; }
    .mob-2 .tc-name { font-size: 1.05rem; }
    .mob-2 .tc-title { font-size: .68rem; }
    .mob-2 .tc-bio { font-size: .82rem; }
    .mob-2 .value-card { padding: 20px 16px; }
    .mob-2 .value-card h3 { font-size: 1.1rem; }
    .mob-2 .value-card p { font-size: .85rem; }

    /* Stats — keep all four on a SINGLE row on mobile */
    .stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .stat { padding: 4px 2px; }
    .stat-icon { width: 30px; height: 30px; }
    .stat-num { font-size: 1.55rem; }
    .stat-label { font-size: .6rem; line-height: 1.25; }

    /* keep the three discipline cards on a SINGLE row on mobile */
    .activity-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .activity-card { padding: 16px 8px 18px; border-radius: 14px; }
    .activity-art { height: 92px; margin-bottom: 8px; }
    .vec { height: 92px; }
    .activity-title { font-size: .82rem; line-height: 1.2; }

    /* trim oversized vertical whitespace on mobile */
    .section { padding: 56px 0; }
    .section-tight { padding: 40px 0; }
    .section-head { margin-bottom: 28px; }
    .video-hero { min-height: 74vh; }
    .video-hero .container { padding-block: 70px; }
    .divider { padding: 2px 0; }
}

@media (max-width: 680px) {
    /* Contact page — compact, integrated layout on mobile */
    .contact-info { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ci-item { flex-direction: column; gap: 8px; padding: 14px 14px; }
    .ci-ico { width: 40px; height: 40px; font-size: 1.1rem; }
    .ci-item h3 { font-size: .92rem; }
    .ci-item a, .ci-item p { font-size: .85rem; }
    .contact-form { padding: 22px 18px; border-radius: 18px; }
    .contact-grid { gap: 22px; }
    .map-wrap iframe { height: 240px; }
}

@media (max-width: 420px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom-inner { flex-direction: column; }
    .hero-cta .btn, .vh-cta .btn { width: 100%; justify-content: center; }
    .activity-title { font-size: .74rem; }
    .activity-card { padding: 12px 5px 14px; }
    .stat-num { font-size: 1.4rem; }
    .stat-label { font-size: .56rem; }
}

/* ===========================================================================
   Team cards v2 — clickable, image + name + title, bio in a light popup
   (EPAC customization)
   =========================================================================== */
.team-card .tc-trigger {
    display: block; width: 100%; text-align: inherit;
    background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
    color: inherit; font: inherit;
}
.team-card .tc-media { display: block; }
.team-card .tc-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(14,57,63,0) 40%, rgba(14,57,63,.42) 100%);
    opacity: 0; transition: opacity .4s var(--ease);
}
.team-card:hover .tc-overlay,
.team-card .tc-trigger:focus-visible .tc-overlay { opacity: 1; }
.team-card .tc-overlay-ico {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.92); color: var(--teal-deep);
    font-size: 1.7rem; font-weight: 300; line-height: 1;
    transform: translateY(8px); transition: transform .4s var(--ease);
}
.team-card:hover .tc-overlay-ico { transform: translateY(0); }
.team-card .tc-body { display: block; padding: 18px 20px 22px; }
.team-card .tc-name { display: block; font-family: var(--font-display, inherit); }

/* ---- Light popup ---- */
body.team-modal-open { overflow: hidden; }
.team-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.team-modal[hidden] { display: none; }
.team-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(32,41,43,.28);          /* light, not pure black */
    backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .25s var(--ease);
}
.team-modal.is-open .team-modal-backdrop { opacity: 1; }
.team-modal-card {
    position: relative; z-index: 1;
    width: min(560px, 100%);
    max-height: 88vh; overflow: auto;
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(16px) scale(.98);
    transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.team-modal.is-open .team-modal-card { opacity: 1; transform: translateY(0) scale(1); }
.team-modal-close {
    position: absolute; top: 12px; inset-inline-end: 14px; z-index: 2;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--line); background: rgba(255,255,255,.9);
    color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
    transition: background .25s var(--ease), transform .25s var(--ease);
}
.team-modal-close:hover { background: var(--cream); transform: rotate(90deg); }
.team-modal-body { padding: 40px 34px 34px; }
.team-modal-name { font-size: 1.7rem; margin: 0 0 4px; }
.team-modal-title {
    display: inline-block; margin-bottom: 16px;
    font-size: .82rem; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--crimson);
}
.team-modal-bio { color: var(--ink-soft); font-size: .98rem; line-height: 1.75; margin: 0; }

/* ---- Mobile: keep TWO cards per row on the team grids ---- */
@media (max-width: 680px) {
    .leadership-grid,
    .team-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
    .leadership-grid .tc-body,
    .team-grid .tc-body { padding: 12px 12px 16px; }
    .leadership-grid .tc-name,
    .team-grid .tc-name { font-size: 1rem; }
    .leadership-grid .tc-title,
    .team-grid .tc-title { font-size: .64rem; margin: 3px 0 0; }
    .team-modal { padding: 16px; }
    .team-modal-body { padding: 20px 20px 26px; }
    .team-modal-name { font-size: 1.4rem; }
}
