/* ============================================================
   Tiba Karbala — site stylesheet (RTL & LTR ready)
   Design system: navy + gold, fluid type, self-hosted fonts.
   Colour themes live in themes.css (html[data-theme]).
   Site font is chosen in the admin panel (html[data-font]).
   ============================================================ */
:root {
  --navy: #0c1e30;
  --navy-2: #12293f;
  --navy-3: #1b3a57;
  --gold: #e0a02e;
  --gold-dark: #c8871b;
  /* darker gold for small text on light surfaces (AA contrast ≥ 4.5:1) */
  --gold-ink: #9a6410;
  --ink: #14202b;
  --muted: #5b6b7a;
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e3e9ef;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(12, 30, 48, .06);
  --shadow: 0 12px 34px rgba(12, 30, 48, .10);
  --shadow-lg: 0 24px 60px rgba(12, 30, 48, .18);

  --header-h: 76px;
  --container: 1180px;
  --section-y: clamp(52px, 6.5vw, 92px);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-body: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  --fs-base: clamp(15.5px, .22vw + 14.8px, 17px);
  --lh-base: 1.8;
}

/* Font choices (admin → المظهر والخط) */
:root[data-font="alan-sans"]   { --font-body: 'Alan Sans', 'Cairo', 'Segoe UI', Tahoma, sans-serif; --lh-base: 1.85; }
:root[data-font="cairo-play"]  { --font-body: 'Cairo Play', 'Cairo', 'Segoe UI', Tahoma, sans-serif; --fs-base: clamp(15px, .2vw + 14.4px, 16.5px); }
:root[data-font="markazi-text"]{ --font-body: 'Markazi Text', 'Cairo', Georgia, serif; --fs-base: clamp(17.5px, .3vw + 16.5px, 19px); --lh-base: 1.85; }
:root[data-font="readex-pro"]  { --font-body: 'Readex Pro', 'Cairo', 'Segoe UI', Tahoma, sans-serif; --fs-base: clamp(15px, .2vw + 14.5px, 16.5px); }
:root[data-font="markazi-text"] h1,
:root[data-font="markazi-text"] h2,
:root[data-font="markazi-text"] h3 { font-weight: 700; letter-spacing: 0; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: var(--lh-base);
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .55em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--gold); color: var(--navy); }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 26px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  min-height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(12, 30, 48, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header .container { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); }
.site-header.scrolled {
  background: rgba(12, 30, 48, .97);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
}
.brand { display: flex; align-items: center; gap: 12px; margin-inline-end: auto; min-width: 0; }
.brand img { height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text b { font-size: 1.06rem; color: #fff; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: .72rem; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  position: relative;
  color: rgba(255, 255, 255, .86); padding: 9px 13px; border-radius: 999px;
  font-weight: 600; font-size: .96rem; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.main-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.main-nav a.active { color: var(--gold); }
.main-nav a.active::after {
  content: ""; position: absolute; inset-inline: 13px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--gold);
}
.lang-switch {
  color: #fff; border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px;
  padding: 7px 15px; font-weight: 700; font-size: .83rem; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.lang-switch:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.burger {
  display: none; background: none; border: 0; cursor: pointer; padding: 11px;
  border-radius: 10px; line-height: 0;
}
.burger span {
  display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0;
  border-radius: 2px; transition: transform .25s var(--ease), opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop {
  position: fixed; inset: 0; z-index: 59; background: rgba(4, 12, 22, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s var(--ease);
}
.nav-backdrop.show { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative; display: flex; align-items: center;
  min-height: min(90svh, 860px);
  background:
    linear-gradient(180deg, rgba(12, 30, 48, .62) 0%, rgba(12, 30, 48, .72) 55%, rgba(12, 30, 48, .9) 100%),
    var(--hero-img, none) center/cover no-repeat var(--navy);
  color: #fff; padding-top: var(--header-h);
}
.hero-inner { max-width: 800px; padding-block: clamp(64px, 9vw, 110px); }
.hero .kicker { color: var(--gold); }
.hero h1 { font-size: clamp(2rem, 4.8vw, 3.5rem); font-weight: 900; letter-spacing: -.02em; margin-bottom: .4em; }
.hero p { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, .9); max-width: 660px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(24px, 4vw, 36px); }
.hero-inner > * { animation: rise .7s var(--ease) both; }
.hero-inner > *:nth-child(2) { animation-delay: .07s; }
.hero-inner > *:nth-child(3) { animation-delay: .14s; }
.hero-inner > *:nth-child(4) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 800; margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  min-height: 48px; padding: 12px 27px; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: .96rem; line-height: 1.2;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:active { transform: translateY(0) scale(.985); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 10px 26px rgba(224, 160, 46, .3); }
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-3); transform: translateY(-2px); }

/* ---------- Stats ---------- */
.stats { background: var(--navy-2); color: #fff; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding-block: clamp(28px, 4vw, 44px); text-align: center;
}
.stat { padding: 8px 6px; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; inset-block: 18%; inset-inline-start: 0;
  width: 1px; background: rgba(255, 255, 255, .12);
}
.stat b { display: block; font-size: clamp(1.5rem, 3vw, 2.05rem); color: var(--gold); font-weight: 900; line-height: 1.2; }
.stat span { color: rgba(255, 255, 255, .78); font-size: .88rem; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section.alt { background: linear-gradient(180deg, #fff, #fbfcfd); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto clamp(30px, 4vw, 48px); }
.section-head h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); color: var(--navy); }
.section-head p { color: var(--muted); font-size: 1.02rem; margin-bottom: 0; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy-2); }
.card-media img, .card-media picture, .card-media picture img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card-media .noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .5); font-size: 3rem; background:
    repeating-linear-gradient(45deg, var(--navy-2), var(--navy-2) 14px, var(--navy-3) 14px, var(--navy-3) 28px);
}
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-date { color: var(--gold-ink); font-size: .8rem; font-weight: 800; margin-bottom: 8px; letter-spacing: .01em; }
.card-body h3 { font-size: 1.06rem; color: var(--navy); margin-bottom: .5em; }
.card-body p { color: var(--muted); font-size: .92rem; flex: 1; margin-bottom: 14px; }
.card-link { color: var(--gold-ink); font-weight: 800; font-size: .9rem; align-self: flex-start; }
.card-link::after { content: " ←"; transition: margin .2s; }
[dir="ltr"] .card-link::after { content: " →"; }
.card-link:hover::after { margin-inline-start: 4px; }
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
  .card:hover .card-media img { transform: scale(1.06); }
}
/* video badge on cards */
.card-badge {
  position: absolute; inset-inline-start: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(8, 18, 28, .78); color: #fff; font-size: .76rem; font-weight: 800;
  padding: 5px 11px 5px 9px; border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card-badge svg { width: 13px; height: 13px; }

/* ---------- Services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.svc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.svc .icon {
  width: 54px; height: 54px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(12, 30, 48, .18);
}
.svc .icon svg { width: 27px; height: 27px; stroke: var(--gold); }
.svc h3 { font-size: 1.04rem; color: var(--navy); }
.svc p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (hover: hover) {
  .svc:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-4px); }
}

/* ---------- About teaser ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 54px); align-items: center; }
.about-grid .media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-grid .media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.about-grid h2 { color: var(--navy); font-size: clamp(1.45rem, 2.8vw, 2.1rem); }
.about-grid p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 18px 0 26px; }
.check-list li { padding-inline-start: 30px; position: relative; margin-bottom: 10px; font-weight: 600; color: var(--navy); }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 15px; height: 15px;
  border-radius: 50%; background: var(--gold);
  box-shadow: inset 0 0 0 3.5px #fff, 0 0 0 1.5px var(--gold);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--navy), var(--navy-3));
  color: #fff; text-align: center; padding-block: clamp(52px, 7vw, 78px);
}
.cta-band::after {
  content: ""; position: absolute; inset-inline-end: -12%; top: -40%;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 160, 46, .16), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(1.45rem, 3vw, 2.15rem); }
.cta-band p { color: rgba(255, 255, 255, .86); max-width: 560px; margin-inline: auto; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    linear-gradient(180deg, rgba(12, 30, 48, .82), rgba(12, 30, 48, .94)),
    var(--hero-img, none) center/cover var(--navy);
  color: #fff;
  padding: calc(var(--header-h) + clamp(36px, 5vw, 62px)) 0 clamp(36px, 5vw, 56px);
  text-align: center;
}
.page-hero h1 { font-size: clamp(1.65rem, 3.6vw, 2.6rem); margin-bottom: .25em; }
.page-hero p { color: rgba(255, 255, 255, .82); max-width: 640px; margin-inline: auto; margin-bottom: 0; }
.breadcrumbs { font-size: .84rem; color: rgba(255, 255, 255, .7); margin-bottom: 14px; }
.breadcrumbs a { transition: color .2s; }
.breadcrumbs a:hover { color: var(--gold); }

/* ---------- Article ---------- */
.article { background: #fff; }
.article-wrap { max-width: 900px; margin-inline: auto; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted);
  font-size: .88rem; margin-bottom: 24px;
}
.article-meta span {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border-radius: 999px; padding: 4px 13px;
}
.article-body { font-size: 1.05rem; color: #26313c; max-width: 72ch; }
.article-body > p:first-of-type { font-size: 1.1rem; color: #1c2836; }
.article-body h2, .article-body h3 { color: var(--navy); margin-top: 1.5em; scroll-margin-top: calc(var(--header-h) + 16px); }
.article-body a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
.article-body img { border-radius: var(--radius-sm); margin-block: 1.2em; }
.article-body blockquote {
  border-inline-start: 4px solid var(--gold); margin: 1.4em 0; padding: 10px 18px;
  background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted);
}
.article-hero-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; box-shadow: var(--shadow); }
.article-hero-img img { width: 100%; max-height: 560px; object-fit: cover; }

.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0; }
.img-grid figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--bg); }
.img-grid img { width: 100%; height: 220px; object-fit: cover; transition: transform .45s var(--ease); }
.img-grid figure:hover img { transform: scale(1.05); }

.post-nav {
  display: flex; justify-content: space-between; gap: 18px; margin-top: 44px;
  border-top: 1px solid var(--line); padding-top: 24px;
}
.post-nav a {
  max-width: 47%; color: var(--navy); font-weight: 700; font-size: .94rem; line-height: 1.5;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, background .2s;
}
.post-nav a:hover { border-color: var(--gold); background: var(--bg); }
.post-nav .label { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; margin-bottom: 2px; }

/* ---------- Video (news posts) ---------- */
.video-block { margin: 6px 0 34px; }
.video-head { display: flex; align-items: center; gap: 9px; color: var(--navy); font-weight: 800; font-size: 1rem; margin-bottom: 12px; }
.video-head .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(224, 160, 46, .18);
}
.video-frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--radius); overflow: hidden; background: #050b12;
  box-shadow: var(--shadow-lg);
}
.video-frame iframe, .video-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.video-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
  background: #050b12 center/cover no-repeat; display: flex; align-items: center; justify-content: center;
  color: #fff; overflow: hidden;
}
.video-facade::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 11, 18, .25), rgba(5, 11, 18, .62));
  transition: background .3s;
}
.video-facade:hover::before { background: linear-gradient(180deg, rgba(5, 11, 18, .15), rgba(5, 11, 18, .5)); }
.video-facade .play {
  position: relative; z-index: 1;
  width: 72px; height: 72px; border-radius: 50%; background: var(--gold); color: var(--navy);
  display: grid; place-items: center; box-shadow: 0 14px 40px rgba(0, 0, 0, .4);
  transition: transform .25s var(--ease);
}
.video-facade .play svg { width: 26px; height: 26px; margin-inline-start: 3px; }
.video-facade:hover .play { transform: scale(1.07); }
.video-facade .hint { position: absolute; z-index: 1; bottom: 14px; inset-inline-start: 16px; font-size: .82rem; font-weight: 700; opacity: .9; }
.video-caption { color: var(--muted); font-size: .86rem; margin-top: 10px; }

/* ---------- Gallery ---------- */
.gallery-grid { columns: 3; column-gap: 14px; }
.gallery-grid figure {
  margin: 0 0 14px; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden;
  cursor: zoom-in; box-shadow: var(--shadow-sm); position: relative; background: var(--bg);
}
.gallery-grid img { width: 100%; transition: transform .5s var(--ease); }
.gallery-grid figure::after {
  content: ""; position: absolute; inset: 0; background: rgba(12, 30, 48, 0); transition: background .3s;
}
.gallery-grid figure:hover::after { background: rgba(12, 30, 48, .16); }
.gallery-grid figure:hover img { transform: scale(1.04); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(24px, 4vw, 44px); align-items: start; }
.info-card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: clamp(24px, 4vw, 34px); }
.info-card h3 { color: var(--gold); font-size: 1.12rem; }
.info-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.info-item .icon {
  width: 44px; height: 44px; flex: none; border-radius: 12px; background: rgba(224, 160, 46, .15);
  display: flex; align-items: center; justify-content: center;
}
.info-item .icon svg { width: 21px; height: 21px; stroke: var(--gold); }
.info-item b { display: block; font-size: .94rem; }
.info-item span, .info-item a { color: rgba(255, 255, 255, .82); font-size: .92rem; overflow-wrap: anywhere; }
.info-item a:hover { color: var(--gold); }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 7px; color: var(--navy); }
.contact-form input, .contact-form textarea {
  width: 100%; min-height: 46px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: .95rem; background: var(--bg); color: var(--ink);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(224, 160, 46, .14);
}
.contact-form .field { margin-bottom: 18px; }
.form-hint { color: var(--muted); font-size: .82rem; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .75); }
.footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: clamp(24px, 4vw, 40px); padding-block: clamp(40px, 6vw, 58px) 36px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: var(--gold); }
.footer-brand img { height: 52px; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; overflow-wrap: anywhere; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 18px; font-size: .84rem; text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(8, 18, 28, .95);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 86svh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-btn {
  position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; cursor: pointer;
  width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .25s;
}
.lb-btn:hover { background: var(--gold); color: var(--navy); }
.lb-close { top: 18px; inset-inline-end: 18px; }
.lb-prev { inset-inline-start: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); inset-inline-end: 22px; z-index: 50;
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy);
  font-size: 1.25rem; cursor: pointer; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .28s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ---------- 404 ---------- */
.err-wrap { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.err-wrap h1 { font-size: clamp(3.6rem, 12vw, 6rem); color: var(--gold); margin: 0; line-height: 1; }
.err-wrap h2 { color: var(--navy); margin-top: .3em; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-backdrop { display: block; }
  .main-nav a { padding: 9px 11px; font-size: .93rem; }
  .site-header .container { gap: 14px; }
}
@media (max-width: 980px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .img-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid .media { order: -1; }
}
@media (max-width: 880px) {
  :root { --header-h: 66px; }
  .burger { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); inset-inline: 0;
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
    background: var(--navy); flex-direction: column; align-items: stretch;
    padding: 10px 16px calc(22px + env(safe-area-inset-bottom)); gap: 2px;
    border-radius: 0 0 20px 20px;
    transform: translateY(-115%); transition: transform .3s var(--ease);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .45);
    visibility: hidden;
  }
  .main-nav.open { transform: translateY(0); visibility: visible; }
  .main-nav a { padding: 14px 16px; border-radius: 10px; font-size: 1rem; }
  .main-nav a + a { border-top: 1px solid rgba(255, 255, 255, .06); }
  .main-nav a.active {
    background: rgba(255, 255, 255, .06); box-shadow: inset -3px 0 0 var(--gold);
  }
  [dir="ltr"] .main-nav a.active { box-shadow: inset 3px 0 0 var(--gold); }
  .main-nav a.active::after { display: none; }
  .lang-switch { padding: 7px 13px; font-size: .8rem; }
  .brand img { height: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 16px; }
  .gallery-grid { columns: 2; }
  .section { padding-block: clamp(44px, 7vw, 60px); }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .hero { min-height: min(82svh, 720px); }
  .article-body { font-size: 1.02rem; }
}
@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 1fr; padding-block: 34px 24px; }
  .img-grid { grid-template-columns: 1fr; }
  .img-grid img { height: 240px; }
  .gallery-grid { columns: 1; }
  .brand-text span { display: none; }
  .btn { padding: 12px 22px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .video-facade .play { width: 62px; height: 62px; }
  .video-facade .play svg { width: 22px; height: 22px; }
  .theme-fab-wrap { bottom: max(18px, env(safe-area-inset-bottom)); inset-inline-start: 18px; }
  .to-top { bottom: max(18px, env(safe-area-inset-bottom)); inset-inline-end: 18px; }
}

/* ---------- Motion & accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0 !important; transition-duration: .001ms !important; }
}
