/* ==========================================================
   ACC Institute, Butwal: main stylesheet
   Change brand colours here:
   ========================================================== */
:root {
  --primary: #1d2f8c;      /* ACC navy */
  --primary-dark: #131f63;
  --accent: #e0262f;       /* ACC red */
  --ink: #142033;
  --muted: #5b6678;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 35, 70, .08);
  --shadow-lg: 0 20px 50px rgba(15, 35, 70, .14);
  --max: 1180px;
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; margin-top: 32px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 2px solid transparent; cursor: pointer; transition: all .2s ease;
  font-family: var(--font-body); line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary); background: rgba(29,47,140,.08);
  padding: .35em .9em; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- Top bar ---------- */
.topbar { background: var(--primary-dark); color: #dce6f5; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #fff; font-weight: 500; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: all .25s;
}
.header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(15,35,70,.06); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-logo { height: 52px; width: auto; display: block; }
.brand-badge {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #2a7de1); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; letter-spacing: .03em;
  box-shadow: 0 6px 16px rgba(29,47,140,.3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu a { color: var(--ink); font-weight: 500; font-size: .96rem; position: relative; }
.nav-menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s;
}
.nav-menu a:not(.btn):hover::after, .nav-menu a.active::after { width: 100%; }
.nav-menu .nav-cta { color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; border-radius: 2px; }
.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); }

/* ---------- Hero ---------- */
.hero {
  padding: 70px 0 90px;
  background:
    radial-gradient(900px 400px at 90% -10%, rgba(42,125,225,.14), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(245,165,36,.14), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hl { color: var(--primary); position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: .28em;
  background: var(--accent); opacity: .35; z-index: -1; border-radius: 4px;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 26px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-points li { font-weight: 500; font-size: .95rem; color: var(--ink); padding-left: 26px; position: relative; }
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .7rem; display: grid; place-items: center; font-weight: 700;
}
.hero-media { position: relative; }
.slides {
  position: relative; aspect-ratio: 1/1; border-radius: 22px; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-lg); max-width: 540px; margin-left: auto;
}
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .9s ease; }
.slide.active { opacity: 1; }
.slide-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; max-width: 540px; margin-left: auto; }
.slide-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: #c5cbe0; cursor: pointer; transition: all .3s; }
.slide-dots button.on { background: var(--primary); width: 26px; border-radius: 6px; }
.hero-card {
  position: absolute; left: -24px; bottom: -24px; background: #fff; border-radius: 14px;
  padding: 12px 18px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px;
  border-left: 4px solid var(--accent);
}
.hero-card div { display: flex; flex-direction: column; line-height: 1.3; }
.hero-card span { color: var(--muted); font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); }

/* Services */
.services { padding: 80px 0 90px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
  color: var(--ink); transition: all .25s; position: relative; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transform: scaleX(0);
  transform-origin: left; transition: transform .3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-card p { color: var(--muted); }
.icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.6rem; background: rgba(29,47,140,.08); margin-bottom: 18px;
}
.more { color: var(--primary); font-weight: 600; font-size: .95rem; }

/* Two column */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.two-col.reverse .col-media { order: 2; }
.col-media img { width: 100%; border-radius: 20px; box-shadow: var(--shadow-lg); }
.col-media.poster { max-width: 480px; justify-self: center; width: 100%; }
.col-text p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.check-list li { padding-left: 30px; position: relative; font-weight: 500; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--primary); color: #fff; font-size: .72rem; display: grid; place-items: center;
}
.note { font-size: .92rem; font-style: italic; }

/* Languages */
.lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lang-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: all .25s;
}
.lang-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.lang-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: top; }
.lang-body { padding: 22px 22px 24px; }
.lang-body p { color: var(--muted); font-size: .95rem; margin: 0; }
.lang-tag {
  display: inline-block; font-size: .85rem; font-weight: 600; color: var(--primary-dark);
  background: rgba(245,165,36,.18); padding: .2em .7em; border-radius: 6px; margin-bottom: 10px;
}

/* Tuition */
.tuition-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0 18px; }
.level { background: #fff; border-radius: 12px; padding: 20px; border-left: 4px solid var(--primary); box-shadow: var(--shadow); }
.level h3 { margin-bottom: .3em; }
.level p { margin: 0; font-size: .95rem; }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-item { text-align: center; padding: 26px 18px; }
.why-item .icon { margin: 0 auto 16px; background: rgba(245,165,36,.15); }
.why-item p { color: var(--muted); font-size: .95rem; }

/* Gallery */
.gallery-grid { columns: 4 240px; column-gap: 14px; }
.g-item { display: block; width: 100%; margin: 0 0 14px; break-inside: avoid; border-radius: 12px; overflow: hidden; background: #dfe6f0; box-shadow: 0 4px 14px rgba(15,35,70,.08); }
.g-item img { width: 100%; transition: transform .4s; }
.g-item:hover img { transform: scale(1.04); }
.g-item.hide { display: none; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(8,16,30,.92); z-index: 100;
  display: grid; place-items: center; padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 10px; }
.lb-close {
  position: absolute; top: 16px; right: 22px; background: none; border: 0; color: #fff;
  font-size: 2.6rem; cursor: pointer; line-height: 1;
}

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--primary) 60%, #2a7de1); color: #fff; padding: 60px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; margin-bottom: .2em; }
.cta-inner p { margin: 0; color: #dce6f5; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.contact-info > p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.ci-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--bg-alt); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.contact-list strong { display: block; font-size: .85rem; color: var(--muted); font-weight: 500; }
.contact-list a, .contact-list span { font-weight: 600; color: var(--ink); }
.contact-list a:hover { color: var(--primary); }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.enquiry { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.enquiry label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 14px; }
.enquiry input, .enquiry select, .enquiry textarea {
  display: block; width: 100%; margin-top: 6px; padding: .75em .9em; font: inherit; font-size: .97rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fbfcfe; transition: border-color .2s;
}
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.enquiry .invalid { border-color: #d64545; }
.form-status { margin: 12px 0 0; font-size: .92rem; }
.form-status.ok { color: #157a3f; }
.form-status.err { color: #c03434; }

.map-wrap { margin-top: 56px; }
.map-wrap iframe { width: 100%; height: 400px; border: 0; border-radius: 18px; box-shadow: var(--shadow); }

/* Footer */
.footer { background: #0c1626; color: #a9b4c6; padding: 60px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer a, .footer span { display: block; color: #a9b4c6; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.brand-footer { margin-bottom: 14px; }
.brand-footer strong { color: #fff; }
.brand-footer small { color: #7f8ba0; margin: 0; }
.brand-footer .brand-text span { margin: 0; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid #1f2b40; margin-top: 40px; padding-top: 20px; padding-bottom: 24px; font-size: .88rem;
}
.footer-bottom span { display: inline; margin: 0; }

/* Floating call button */
.fab-call {
  position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%;
  background: #1fa855; color: #fff; display: none; place-items: center; font-size: 1.5rem;
  box-shadow: 0 10px 25px rgba(31,168,85,.45); z-index: 60; animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,168,85,.5); } 50% { box-shadow: 0 0 0 14px rgba(31,168,85,0); } }

/* Placeholder images (shown until a real photo is added) */
img.is-placeholder { background: #e8eef7; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .fab-call { animation: none; }
}


/* ---------- Added: posters, course cards, filters ---------- */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; font: inherit; color: inherit; }
.sub-head { text-align: center; margin: 70px 0 28px; font-size: 1.4rem; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.course-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: all .25s; }
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.course-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: top; }
.cc-body { padding: 18px 20px 20px; }
.cc-body h4 { font-size: 1.05rem; margin-bottom: .35em; }
.cc-body p { color: var(--muted); font-size: .93rem; margin: 0; }
.pill { display: inline-block; font-size: .72rem; background: var(--accent); color: #fff; padding: .15em .6em; border-radius: 999px; vertical-align: middle; margin-left: 4px; font-family: var(--font-body); }
.check-list.cols { grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
.mini-list li { padding-left: 16px; position: relative; }
.mini-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lang-body h3 { margin-bottom: .5em; }
.muted { color: var(--muted); }
.level.shifts { border-left-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -16px 0 28px; }
.filter { font: inherit; font-size: .9rem; font-weight: 500; padding: .5em 1.1em; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: all .2s; min-height: 40px; }
.filter:hover { border-color: var(--primary); }
.filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: 0; color: #fff; font-size: 2.4rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; line-height: 1; }
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.brand-footer .brand-logo { height: 56px; background: #fff; border-radius: 50%; padding: 2px; }
.footer .brand-footer span { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 10px 20px 24px; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(15,35,70,.12);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .25s;
  }
  .nav-menu.open { transform: none; opacity: 1; visibility: visible; }
  .nav-menu a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-menu a::after { display: none; }
  .nav-menu .nav-cta { margin-top: 14px; border: 0; }
  .hero { padding: 40px 0 70px; }
  .hero-grid, .two-col, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .two-col.reverse .col-media { order: 0; }
  .hero-card { left: 14px; bottom: -20px; }
  .service-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .gallery-grid { columns: 2 140px; column-gap: 10px; }
  .g-item { margin-bottom: 10px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .slides { margin: 0 auto; } .slide-dots { margin: 16px auto 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: span 2; }
  .fab-call { display: grid; }
}
@media (max-width: 560px) {
  .topbar-inner > span:first-child { display: none; }
  .topbar-inner { justify-content: center; }
  .lang-grid, .why-grid, .tuition-levels, .check-list.cols { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cc-body { padding: 12px 12px 14px; } .cc-body p { font-size: .85rem; }
  .brand-text small { display: none; }
  .cta-btns { width: 100%; } .cta-btns .btn { flex: 1; }
  .hero-actions .btn { flex: 1 1 100%; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .map-wrap iframe { height: 300px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }
  .enquiry { padding: 22px; }
}
.footer .brand-text { display: flex; }
.footer .brand-text small { display: block; }
.hero-card { bottom: 56px; }
@media (max-width: 880px) { .hero-card { left: 0; bottom: 50px; } }

/* Cover photo */
.cover { background: #0f1a52; }
.cover img { width: 100%; max-width: 1600px; margin: 0 auto; aspect-ratio: 1600/901; object-fit: cover; }
.cover + .hero { padding-top: 60px; }

/* ---------- Gallery slideshow ---------- */
.g-stage { position: relative; max-width: 760px; margin: 0 auto 18px; background: linear-gradient(135deg, #eef2f9, #dde5f2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.g-main { display: block; width: 100%; height: min(72vh, 640px); padding: 14px; border: 0; background: none; cursor: zoom-in; }
.g-main img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; opacity: 0; }
.g-main img.in { animation: gFade .6s ease forwards; }
@keyframes gFade { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--primary); font-size: 2rem; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(15,35,70,.18); transition: all .2s; }
.g-nav:hover { background: var(--primary); color: #fff; }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-count, .g-play { position: absolute; bottom: 12px; z-index: 2; background: rgba(19,31,99,.85); color: #fff; font-size: .85rem; border-radius: 999px; }
.g-count { left: 12px; padding: .3em .8em; }
.g-play { right: 12px; border: 0; width: 34px; height: 34px; cursor: pointer; font-size: .75rem; }
.gallery-grid.g-thumbs { columns: auto; display: flex; gap: 10px; overflow-x: auto; max-width: 760px; margin: 0 auto 24px; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.g-thumbs .g-item { flex: 0 0 84px; height: 84px; margin: 0; border: 2px solid transparent; padding: 0; cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s; scroll-snap-align: center; }
.g-thumbs .g-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.g-thumbs .g-item:hover { opacity: 1; }
.g-thumbs .g-item:hover img { transform: none; }
.g-thumbs .g-item.current { opacity: 1; border-color: var(--accent); }
.g-thumbs .g-item.hide { display: none; }
@media (max-width: 640px) {
  .g-main { height: min(62vh, 460px); padding: 8px; }
  .g-nav { width: 40px; height: 40px; font-size: 1.6rem; }
  .g-prev { left: 6px; } .g-next { right: 6px; }
  .g-thumbs .g-item { flex-basis: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .g-main img.in { animation: none; opacity: 1; } }
