/* ==========================================================================
   Career Spark — Edu Solutions & Technologies
   Shared design system (single stylesheet for every page)
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --navy-900: #081831;
  --navy: #0b1f3a;
  --navy-700: #15305a;
  --royal: #2952cc;
  --royal-600: #2246b0;
  --royal-50: #eef3fd;
  --gold: #e0a526;
  --gold-600: #c68d14;
  --gold-50: #fdf5e3;
  --slate: #1e293b;
  --muted: #586780;
  --surface: #f5f8fc;
  --warm: #f8f6f2;
  --white: #ffffff;
  --border: #e2e8f0;
  --success: #15803d;
  --success-50: #ecfdf3;
  --danger: #b42318;
  --danger-50: #fef3f2;

  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-h3: clamp(1.15rem, 1rem + 0.5vw, 1.375rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6rem);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06), 0 1px 3px rgba(11, 31, 58, 0.08);
  --shadow: 0 6px 24px -8px rgba(11, 31, 58, 0.18);
  --shadow-lg: 0 24px 48px -16px rgba(11, 31, 58, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 76px;
  --container: 1200px;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--slate);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--royal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--royal-600); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--navy); color: var(--white); padding: 0.75rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.4rem;
  font: 600 var(--fs-sm)/1.2 var(--font-body);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(3px); }

.btn-primary { background: var(--royal); color: var(--white); box-shadow: 0 8px 20px -10px rgba(41, 82, 204, .8); }
.btn-primary:hover { background: var(--royal-600); color: var(--white); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy-900); box-shadow: 0 8px 20px -10px rgba(224, 165, 38, .9); }
.btn-gold:hover { background: var(--gold-600); color: var(--navy-900); transform: translateY(-1px); }
.btn-outline { border-color: var(--border); color: var(--navy); background: var(--white); }
.btn-outline:hover { border-color: var(--royal); color: var(--royal); }
.btn-ghost-light { border-color: rgba(255,255,255,.35); color: var(--white); background: transparent; }
.btn-ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); color: var(--white); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .2s var(--ease); width: 1.1em; height: 1.1em; }

/* ---------- 4. Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-width: 0; }
.brand-mark {
  position: relative; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
  background: #ffffff;
  color: var(--royal); font: 800 1rem/1 var(--font-heading); letter-spacing: .02em;
}
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 800 1.15rem/1.15 var(--font-heading); color: var(--navy); letter-spacing: .02em; text-transform: uppercase; }
.brand-tag { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-nav { display: flex; align-items: center; gap: var(--space-5); }
.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  position: relative; display: block; padding: .55rem .8rem; border-radius: 8px;
  font-weight: 500; font-size: var(--fs-sm); color: var(--slate); text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-list a:hover { color: var(--royal); background: var(--royal-50); }
.nav-list a[aria-current="page"] { color: var(--royal); font-weight: 700; }
.nav-list a[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px;
  border-radius: 2px; background: var(--gold);
}

.nav-toggle {
  display: none; position: relative; width: 48px; height: 48px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 12px; background: var(--white); cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute; left: 50%; width: 20px; height: 2px; margin-left: -10px;
  background: var(--navy); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); background: var(--navy); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(-45deg); background: var(--navy); }

@media (max-width: 1023px) {
  /* Without JS the nav simply wraps below the brand, so it is always usable */
  .header-inner { flex-wrap: wrap; padding-block: .5rem; }
  .site-nav { width: 100%; flex-wrap: wrap; gap: var(--space-3); padding-bottom: .5rem; }
  .nav-list { flex-wrap: wrap; }

  .js .header-inner { flex-wrap: nowrap; padding-block: 0; }
  .js .nav-toggle { display: block; }
  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: var(--space-4);
    padding: var(--space-5) 1.25rem var(--space-6);
    background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .js .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .js .nav-list a { padding: .85rem 1rem; font-size: var(--fs-base); }
  .js .nav-list a[aria-current="page"] { background: var(--royal-50); }
  .js .nav-list a[aria-current="page"]::after { left: 0; right: auto; top: .7rem; bottom: .7rem; width: 3px; height: auto; }
  .nav-cta { width: 100%; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 380px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 1.05rem; }
}

/* ---------- 5. Sections & typography helpers ---------- */
.section { padding-block: var(--section-y); }
.section-surface { background: var(--surface); }
.section-warm { background: var(--warm); }
.section-navy { background: var(--navy); color: rgba(255,255,255,.82); }
.section-navy h2, .section-navy h3 { color: var(--white); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: var(--space-3);
  font: 700 var(--fs-xs)/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--royal);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--gold); }
.section-navy .eyebrow, .page-hero .eyebrow, .hero .eyebrow { color: var(--gold); }

.section-head { max-width: 720px; margin-bottom: var(--space-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { color: var(--muted); font-size: var(--fs-lg); }
.section-foot { margin-top: var(--space-7); display: flex; justify-content: center; }
.lead { font-size: var(--fs-lg); color: var(--muted); }

/* ---------- 6. Media frames & graceful fallbacks ---------- */
.media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--royal-50), var(--surface));
  aspect-ratio: var(--ratio, 4 / 3);
}
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }
.media.contain > img { object-fit: contain; padding: var(--space-4); }

/* Image frames should render the original upload with no generated text or pseudo-element overlays. */

/* ---------- 7. Home hero ---------- */
.hero {
  position: relative; overflow: hidden; color: rgba(255,255,255,.85);
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(41,82,204,.45), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(224,165,38,.14), transparent 60%),
    var(--navy);
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero h1 { color: var(--white); }
.hero h1 .accent { color: var(--gold); }
.hero .lead { color: rgba(255,255,255,.78); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero-points { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); margin: var(--space-6) 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.hero-points li { display: flex; align-items: center; gap: .5rem; }
.hero-points .icon { color: var(--gold); }

.hero-visual { position: relative; }
.hero-slides { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3.2; box-shadow: var(--shadow-lg); background: var(--navy-700); }
.hero-slide { position: absolute; inset: 0; margin: 0; border-radius: 0; aspect-ratio: auto; opacity: 0; transition: opacity 1s var(--ease); }
.hero-slide.is-active, .hero-slides:not(.is-ready) .hero-slide:first-child { opacity: 1; }
.hero-dots { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 4px; }
.hero-dots button { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.hero-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.55); transition: width .3s var(--ease), background-color .3s; }
.hero-dots button[aria-current="true"]::before { width: 22px; background: var(--gold); }
.hero-badge {
  position: absolute; left: -18px; bottom: 28px; z-index: 3; max-width: 260px;
  display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem;
  background: var(--white); color: var(--slate); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: var(--fs-xs); line-height: 1.4;
}
.hero-badge strong { display: block; font: 700 var(--fs-sm)/1.3 var(--font-heading); color: var(--navy); }
.hero-badge-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold-600); }

/* ---------- 8. Inner page hero ---------- */
.page-hero {
  position: relative; overflow: hidden; color: rgba(255,255,255,.8);
  background:
    radial-gradient(700px 360px at 90% 0%, rgba(41,82,204,.5), transparent 60%),
    var(--navy);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}
.page-hero h1 { color: var(--white); margin-bottom: var(--space-3); }
.page-hero p { max-width: 640px; font-size: var(--fs-lg); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 var(--space-4); padding: 0; list-style: none; font-size: var(--fs-xs); }
.breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: rgba(255,255,255,.4); }
.breadcrumb [aria-current] { color: var(--gold); }

/* ---------- 9. Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-media { position: relative; }
.split-media .media { box-shadow: var(--shadow); }
.split-media::before {
  content: ""; position: absolute; z-index: -1; inset: 24px -18px -18px 24px;
  border-radius: var(--radius-lg); background: var(--gold-50); border: 1px solid rgba(224,165,38,.25);
}
.check-list { list-style: none; padding: 0; margin: var(--space-5) 0; display: grid; gap: var(--space-3); }
.check-list li { display: flex; gap: .75rem; align-items: flex-start; }
.check-list .icon { color: var(--royal); margin-top: .3em; background: var(--royal-50); border-radius: 50%; padding: 3px; width: 1.4em; height: 1.4em; }

/* ---------- 10. Cards ---------- */
.grid { display: grid; gap: var(--space-5); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card .media { border-radius: 0; --ratio: 16 / 10; }
.card .media img { transition: transform .6s var(--ease); }
.card:hover .media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: var(--space-5); }
.card-body h3 { margin-bottom: var(--space-2); }
.card-body p { color: var(--muted); font-size: var(--fs-sm); }
.card-body .link-arrow { margin-top: auto; padding-top: var(--space-4); }
.card-tag {
  align-self: flex-start; margin-bottom: var(--space-3); padding: .3rem .65rem; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--gold-600); background: var(--gold-50);
}

.feature {
  padding: var(--space-6); border-radius: var(--radius-lg); background: var(--white);
  border: 1px solid var(--border); height: 100%;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature h3 { margin-bottom: var(--space-2); }
.feature p { color: var(--muted); font-size: var(--fs-sm); }
.feature-icon {
  width: 52px; height: 52px; margin-bottom: var(--space-4); border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--royal), var(--navy-700)); color: var(--white);
}
.feature-icon .icon { width: 24px; height: 24px; }
.section-navy .feature { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.section-navy .feature p { color: rgba(255,255,255,.7); }
.section-navy .feature-icon { background: var(--gold); color: var(--navy-900); }

/* ---------- 11. Course / service detail blocks ---------- */
.detail { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); border-bottom: 1px solid var(--border); }
.detail:last-of-type { border-bottom: 0; }
.detail .split { align-items: start; }
.detail-number { font: 800 var(--fs-xs)/1 var(--font-body); color: var(--gold-600); letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--space-3); display: block; }
.detail-body p { color: var(--slate); }
.detail-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: var(--space-4) 0; }
.pill-list li { padding: .4rem .8rem; border-radius: 999px; background: var(--royal-50); color: var(--royal-600); font-size: var(--fs-xs); font-weight: 600; }
.media-stack { display: grid; gap: var(--space-4); }
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.subnav {
  position: sticky; top: var(--header-h); z-index: 50; background: var(--white); border-bottom: 1px solid var(--border);
}
.subnav ul { display: flex; gap: .25rem; overflow-x: auto; list-style: none; margin: 0; padding: .6rem 0; scrollbar-width: thin; }
.subnav a { display: block; white-space: nowrap; padding: .45rem .9rem; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); text-decoration: none; }
.subnav a:hover { background: var(--royal-50); color: var(--royal); }
.note {
  display: flex; gap: .75rem; padding: var(--space-4) var(--space-5); border-radius: var(--radius);
  background: var(--gold-50); border: 1px solid rgba(224,165,38,.3); font-size: var(--fs-sm); color: var(--slate);
}
.note .icon { color: var(--gold-600); margin-top: .2em; }

/* ---------- 12. Profile (Managing Director) ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.profile-card { position: sticky; top: calc(var(--header-h) + 24px); background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.profile-card .media { border-radius: 0; --ratio: 4 / 5; }
.profile-card .media img { object-position: top center; }
.profile-meta { padding: var(--space-5); border-top: 4px solid var(--gold); }
.profile-meta h3 { font-size: 1.4rem; margin-bottom: .2rem; }
.profile-meta p { color: var(--royal); font-weight: 600; font-size: var(--fs-sm); letter-spacing: .08em; text-transform: uppercase; }
.roles { display: grid; gap: var(--space-3); margin: var(--space-5) 0; padding: 0; list-style: none; }
.roles li { padding: var(--space-4) var(--space-5); border-radius: var(--radius); background: var(--surface); border-left: 3px solid var(--royal); font-weight: 500; }
.qualifications { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: var(--space-4) 0 var(--space-5); }
.qualifications li { padding: .5rem .9rem; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--border); font-size: var(--fs-sm); }
.qualifications abbr { text-decoration: none; font-weight: 700; color: var(--navy); }

/* ---------- 13. Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--space-4); }
.gallery-item { margin: 0; }
.gallery-item button { all: unset; display: block; width: 100%; cursor: zoom-in; border-radius: var(--radius); }
.gallery-item button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.gallery-item .media { --ratio: 1 / 1; }
.gallery-item .media img { transition: transform .5s var(--ease), filter .3s; }
.gallery-item button:hover .media img { transform: scale(1.05); }
.gallery-item .media::after { transition: opacity .3s; }
.gallery-item.is-hidden { display: none; }
.gallery-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-preview .gallery-item:first-child { grid-row: span 2; }
.gallery-preview .gallery-item:first-child .media { --ratio: auto; height: 100%; min-height: 100%; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-5); }
.video-card { margin: 0; }
.video-card .media { --ratio: 16 / 9; background: var(--navy); }
.video-card figcaption { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--muted); }

.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem); background: rgba(8, 24, 49, .94);
}
.lightbox.is-open { display: flex; animation: fade-in .2s var(--ease); }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.lightbox img { max-height: calc(100dvh - 9rem); width: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: var(--navy-700); }
.lightbox figcaption { color: rgba(255,255,255,.85); font-size: var(--fs-sm); text-align: center; }
.lightbox-status { color: rgba(255,255,255,.85); font-size: var(--fs-sm); }
.lightbox-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: var(--white); display: grid; place-items: center; cursor: pointer;
  transition: background-color .2s;
}
.lightbox-btn:hover { background: rgba(255,255,255,.2); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
  .lightbox img { max-height: calc(100dvh - 11rem); }
}

/* ---------- 14. CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr auto; gap: var(--space-6); align-items: center;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem); border-radius: var(--radius-lg); color: rgba(255,255,255,.82);
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(224,165,38,.25), transparent 60%),
    linear-gradient(135deg, var(--navy), var(--navy-700));
}
.cta-band h2 { color: var(--white); margin-bottom: var(--space-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- 15. Contact ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.contact-list { display: grid; gap: var(--space-4); margin: 0 0 var(--space-6); padding: 0; list-style: none; }
.contact-item { display: flex; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius); background: var(--white); border: 1px solid var(--border); }
.contact-item h3 { font-size: var(--fs-base); margin-bottom: .2rem; }
.contact-item p, .contact-item a { font-size: var(--fs-sm); }
.contact-item a { font-weight: 600; }
.contact-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--royal-50); color: var(--royal); }
.branch-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.branch-list li { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--border); font-weight: 600; color: var(--navy); font-size: var(--fs-sm); }
.branch-list li.is-main { border-color: var(--gold); background: var(--gold-50); }
.branch-list .icon { color: var(--gold-600); }

.form-card { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: var(--fs-sm); color: var(--navy); }
.form-field .req { color: var(--danger); }
.form-field .hint { font-size: var(--fs-xs); color: var(--muted); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 48px; padding: .75rem .9rem; font: inherit; font-size: 1rem; color: var(--slate);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; background: var(--white); border-color: var(--royal); box-shadow: 0 0 0 4px rgba(41,82,204,.15); }
.form-field [aria-invalid="true"] { border-color: var(--danger); background: var(--danger-50); }
.field-error { min-height: 1.1em; font-size: var(--fs-xs); color: var(--danger); font-weight: 500; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-top: var(--space-5); }
.form-status { margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius-sm); font-size: var(--fs-sm); display: none; }
.form-status.is-visible { display: block; }
.form-status.success { background: var(--success-50); color: var(--success); border: 1px solid rgba(21,128,61,.25); }
.form-status.error { background: var(--danger-50); color: var(--danger); border: 1px solid rgba(180,35,24,.25); }
.form-status.info { background: var(--gold-50); color: var(--slate); border: 1px solid rgba(224,165,38,.35); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: var(--white); animation: spin .8s linear infinite; display: none; }
.is-loading .spinner { display: inline-block; }

/* ---------- 16. Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.72); font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: var(--space-6); padding-block: var(--space-8) var(--space-7); }
.site-footer h2 { font-size: var(--fs-sm); color: var(--white); letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--gold); }
.footer-brand .brand-name { color: var(--white); }
.footer-brand .brand-tag { color: rgba(255,255,255,.6); }
.footer-brand p { margin-top: var(--space-4); max-width: 340px; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact .icon { color: var(--gold); margin-top: .25em; width: 1.1em; height: 1.1em; }
.social { display: flex; gap: .5rem; margin-top: var(--space-4); }
.social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--white); }
.social a:hover { background: var(--gold); color: var(--navy-900); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; font-size: var(--fs-xs); color: rgba(255,255,255,.55); }

/* ---------- 17. Reveal animation (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-delay-1 { transition-delay: .08s; }
.js .reveal-delay-2 { transition-delay: .16s; }
.js .reveal-delay-3 { transition-delay: .24s; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1023px) {
  .hero-grid, .split, .profile, .contact-layout { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-visual { max-width: 640px; }
  .hero-badge { left: 12px; }
  .profile-card { position: static; max-width: 420px; }
  .cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 2rem, var(--container)); }
  .grid-3, .grid-2, .grid-4, .form-grid, .branch-list { grid-template-columns: 1fr; }
  .gallery-preview { grid-template-columns: 1fr 1fr; }
  .gallery-preview .gallery-item:first-child { grid-column: span 2; grid-row: auto; }
  .gallery-preview .gallery-item:first-child .media { --ratio: 16 / 10; height: auto; }
  .footer-grid { grid-template-columns: 1fr; padding-block: var(--space-7) var(--space-6); }
  .hero-actions .btn, .cta-actions .btn, .detail-actions .btn { flex: 1 1 100%; }
  .hero-badge { position: relative; left: auto; bottom: auto; margin: -28px auto 0; max-width: calc(100% - 24px); }
  .split-media::before { inset: 14px -8px -10px 14px; }
  .media-row { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
}

/* ---------- 19. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}
