/* ==========================================================================
   Driver Education Achieved — style.css
   --------------------------------------------------------------------------
   Colors come from the badge logo:
     navy  = palmetto tree    green = laurel leaves    gold = car-decal lettering
   Change a color once in :root and it updates everywhere.

   Contents
     1.  Font + colors
     2.  Base
     3.  Layout helpers
     4.  Buttons
     5.  Header + menu
     6.  Headings
     7.  Hero (home) + page banner (inner pages)
     8.  Price strip
     9.  Sections: feature cards, steps, two-column split
     10. Photo gallery
     11. Price cards
     12. FAQ
     13. Promo banner
     14. Hours, location, contact, forms
     15. Footer
     16. Lightbox
     17. Back-to-top button
   ========================================================================== */


/* 1. Font + colors ------------------------------------------------------- */

@font-face {
  font-family: "Anton";
  src: url("../fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy:        #0b2e63;
  --navy-dark:   #071f45;
  --green:       #3d6b24;
  --green-dark:  #2e5219;
  --gold:        #f2b31b;
  --silver:      #eef1f4;
  --line:        #d8dee6;
  --text:        #1a1f26;
  --muted:       #55606e;
  --white:       #ffffff;

  --font-head: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --header-height: 84px;
  --lane-stripe: repeating-linear-gradient(90deg, var(--gold) 0 44px, transparent 44px 72px);
}


/* 2. Base ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  font: 17px/1.6 var(--font-body);
  color: var(--text);
  background: var(--white);
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--green); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.icon { width: 1.15em; height: 1.15em; flex: none; }


/* 3. Layout helpers ------------------------------------------------------ */

/* .wrap sets ONLY left/right padding, so it never overrides top/bottom padding */
.wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}
.wrap-narrow { max-width: 880px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }

/* visually hidden, still read by search engines and screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--gold); color: #000; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

.section { padding: 80px 0; }
.section-silver { background: var(--silver); }
@media (max-width: 700px) { .section { padding: 56px 0; } }


/* 4. Buttons ------------------------------------------------------------- */

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.buttons-stacked { flex-direction: column; align-items: stretch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 11px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: 16px; line-height: 1.2; text-align: center; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-green        { background: var(--green); color: var(--white); }
.btn-green:hover  { background: var(--green-dark); color: var(--white); }
.btn-navy         { background: var(--navy); color: var(--white); }
.btn-navy:hover   { background: var(--navy-dark); color: var(--white); }
.btn-outline      { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-light        { border-color: var(--white); color: var(--white); }
.btn-light:hover  { background: var(--white); color: var(--navy); }


/* 5. Header + menu ------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
  transition: transform .25s ease;
}
.site-header.is-hidden { transform: translateY(-100%); }   /* set by main.js on scroll down */

.header-inner { display: flex; align-items: center; gap: 22px; height: var(--header-height); }

.header-logo img { width: 232px; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 2px; }
.main-nav a {
  display: block; padding: 8px 11px; border-radius: 8px;
  color: var(--white); font-weight: 600; font-size: 15.5px; text-decoration: none; white-space: nowrap;
}
.main-nav a:hover { background: rgba(255, 255, 255, .1); color: var(--white); }
.main-nav a[aria-current="page"] { color: var(--gold); }

.header-note {
  margin: 0; white-space: nowrap;
  font: 400 15px/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold);
}

.header-call {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--green); color: var(--white);
  font-weight: 800; font-size: 15.5px; text-decoration: none; white-space: nowrap;
}
.header-call:hover { background: var(--green-dark); color: var(--white); }

/* menu button: 3 bars that turn into an X */
.menu-button {
  display: none; position: relative; flex: none;
  width: 46px; height: 46px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer;
}
.menu-button span {
  position: absolute; left: 11px; width: 24px; height: 2.5px; border-radius: 2px;
  background: var(--white); transition: transform .2s, opacity .2s;
}
.menu-button span:nth-child(1) { top: 15px; }
.menu-button span:nth-child(2) { top: 22px; }
.menu-button span:nth-child(3) { top: 29px; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* tablets and small laptops: menu collapses behind the button */
@media (max-width: 1140px) {
  .menu-button { display: block; }
  .header-note { margin-left: auto; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .main-nav a { padding: 13px 8px; font-size: 17px; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
}

/* phones: round icon-only call button */
@media (max-width: 600px) {
  :root { --header-height: 66px; }
  .header-inner { gap: 10px; }
  .header-logo img { width: 158px; }
  .header-note { display: none; }
  .header-call { margin-left: auto; width: 46px; height: 46px; padding: 0; justify-content: center; }
  .header-call .icon { width: 20px; height: 20px; }
  .header-call-number { display: none; }
}

/* phones turned sideways: thinner header */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-height: 58px; }
  .header-logo img { width: 150px; }
  .main-nav { max-height: calc(100vh - 58px); overflow: auto; }
}


/* 6. Headings ------------------------------------------------------------ */

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }

h1, h2 {
  font-family: var(--font-head); font-weight: 400;
  letter-spacing: .01em; text-transform: uppercase;
}
h2 { font-size: clamp(30px, 4.2vw, 44px); color: var(--navy); margin-bottom: 28px; }
h3 { font-size: 20px; color: var(--navy); }

/* small descriptive label above a heading's slogan, inside the same heading tag */
.heading-label {
  display: block; margin-bottom: 8px;
  font: 800 13.5px/1.35 var(--font-body); letter-spacing: .14em;
  color: var(--green);
}

/* small title above a paragraph */
.mini-title {
  margin: 22px 0 8px;
  font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.mini-title:first-child { margin-top: 0; }


/* 7. Hero (home) + page banner (inner pages) ---------------------------- */

.hero, .page-banner {
  position: relative;
  background: var(--navy);
  color: var(--white);
}
.hero::after, .page-banner::after {          /* gold lane stripe along the bottom */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: var(--lane-stripe);
}

.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-top: 56px; padding-bottom: 56px;
}
.hero h1 { font-size: clamp(38px, 5.2vw, 64px); margin-bottom: 18px; }
.hero .heading-label, .page-banner .heading-label { color: var(--gold); font-size: 14px; letter-spacing: .09em; }
.hero-text { font-size: clamp(17px, 1.6vw, 19px); max-width: 56ch; color: #e3eaf3; margin-bottom: 24px; }
.hero-photo img { border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; padding-bottom: 50px; }
}

.page-banner .wrap { padding-top: 50px; padding-bottom: 50px; }
.page-banner h1 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 14px; }
.page-banner p { max-width: 62ch; margin: 0; color: #e3eaf3; font-size: clamp(17px, 1.6vw, 19px); }
.page-banner a { color: var(--gold); }


/* 8. Price strip --------------------------------------------------------- */

.price-strip { background: var(--silver); border-bottom: 1px solid var(--line); }
.price-strip ul { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 18px; }
.price-strip li { padding: 0 6px; border-left: 2px dashed var(--line); }
.price-strip li:first-child { border-left: 0; }
.price-strip li a {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 6px 8px; border-radius: 10px; text-decoration: none;
  transition: background-color .15s;
}
.price-strip li a:hover { background: var(--white); }
.price-strip-name { font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--muted); }
.price-strip-price { font: 400 32px/1.15 var(--font-head); color: var(--navy); }
.price-strip-more { margin: 0; padding: 8px 0 18px; text-align: center; font-size: 15px; color: var(--muted); }
.price-strip-more a { color: var(--green); font-weight: 700; }

@media (max-width: 960px) {
  .price-strip ul { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .price-strip li:nth-child(3) { border-left: 0; }
}
@media (max-width: 600px) {
  .price-strip ul { grid-template-columns: 1fr; row-gap: 0; padding-top: 8px; }
  .price-strip li { padding: 0; border-left: 0; border-top: 2px dashed var(--line); }
  .price-strip li:first-child { border-top: 0; }
  .price-strip li a { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; padding: 10px 4px; }
  .price-strip-price { font-size: 26px; }
  .price-strip-more { padding-top: 10px; }
}


/* 9. Sections: feature cards, steps, two-column split ------------------- */

.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  padding: 28px 26px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line);
}
.section-silver .feature-card { border-color: transparent; box-shadow: 0 2px 10px rgba(11, 46, 99, .07); }
.feature-card > .icon {
  width: 46px; height: 46px; padding: 11px; margin-bottom: 16px; border-radius: 12px;
  background: var(--navy); color: var(--gold);
}
.feature-card p { margin: 0; color: var(--muted); }
@media (max-width: 880px) { .feature-cards { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.steps li {
  padding: 26px 22px; border-radius: var(--radius);
  background: var(--white); box-shadow: 0 2px 10px rgba(11, 46, 99, .07);
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 14px; border-radius: 50%;
  background: var(--gold); color: var(--navy-dark); font: 400 24px/1 var(--font-head);
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.split-photo-left { grid-template-columns: .95fr 1.05fr; }
.split-photo img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(11, 46, 99, .15); }
.panel { padding: 30px; border-radius: var(--radius); background: var(--silver); }
.section-silver .panel { background: var(--white); }

@media (max-width: 900px) {
  .split, .split-photo-left { grid-template-columns: 1fr; gap: 36px; }
  .split-photo-left .split-photo { order: 2; }
}

.quote {
  margin: 22px 0 26px; padding: 18px 22px;
  border-left: 5px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--silver); color: var(--navy); font-size: 19px; font-weight: 600;
}
.section-silver .quote { background: var(--white); }
.quote cite { display: block; margin-top: 6px; font-style: normal; font-weight: 700; font-size: 14px; color: var(--muted); }

.checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.checklist .icon { margin-top: .25em; color: var(--green); }

.county-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 30px; }
.county-list li { padding: 8px 18px; border-radius: 999px; background: var(--navy); color: var(--white); font-weight: 700; }


/* class dates: one card per Saturday (past dates dimmed, next class marked by main.js) */
.class-dates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.class-dates li {
  position: relative; padding: 14px 10px 12px; border-radius: 12px; text-align: center;
  background: var(--white); border: 2px solid var(--line);
}
.section-silver .class-dates li { border-color: transparent; box-shadow: 0 2px 10px rgba(11, 46, 99, .07); }
.class-dates time { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.class-date-month   { font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.class-date-day     { font: 400 38px/1.05 var(--font-head); color: var(--navy); margin: 2px 0; }
.class-date-weekday { font-size: 13px; color: var(--muted); }

.class-dates li.is-past { opacity: .45; }
.class-dates li.is-next { border-color: var(--green); background: var(--green); box-shadow: none; }
.class-dates li.is-next .class-date-month,
.class-dates li.is-next .class-date-day,
.class-dates li.is-next .class-date-weekday { color: var(--white); }
.class-date-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--navy-dark);
  font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}

@media (max-width: 1000px) and (min-width: 901px) { .class-dates { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .class-dates { grid-template-columns: repeat(3, 1fr); gap: 10px; } .class-date-day { font-size: 32px; } }


/* 10. Photo gallery ------------------------------------------------------
   Rows of equal height, photos never cropped.
   Each figure gets a class that sets --r = photo width / photo height.
   New photo? Add a class here:  .ratio-NAME { --r: WIDTH / HEIGHT; }       */

.ratio-fleet  { --r: 3.117; }   /* 1920 x 616  */
.ratio-fusion { --r: 1.333; }   /* 1920 x 1440 */
.ratio-juke   { --r: 1.495; }   /*  960 x 642  */

.gallery { display: flex; flex-wrap: wrap; gap: 16px; }
.gallery figure { flex: var(--r) 1 calc(var(--r) * 220px); }
.gallery figcaption { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.gallery img { width: 100%; border-radius: var(--radius); }
@media (max-width: 600px) { .gallery figure { flex-basis: 100%; } }

/* any photo that opens in the lightbox */
.zoomable {
  display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius);
  background: none; cursor: zoom-in;
}


/* 11. Price cards -------------------------------------------------------- */

.price-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.price-card {
  position: relative; display: flex; flex-direction: column;
  padding: 28px 24px; border: 2px solid var(--line); border-radius: 18px; background: var(--white);
}
.price-card h3 { font-size: 19px; min-height: 2.3em; }
.price-card .price { margin: 0 0 10px; font: 400 54px/1 var(--font-head); color: var(--navy); }
.price-card .price span { font-size: .5em; vertical-align: .75em; margin-right: 2px; }
.price-card .checklist { margin: 14px 0 22px; font-size: 15.5px; }
.price-card .btn { margin-top: auto; }
.price-card-summary { color: var(--muted); font-size: 15.5px; margin: 0; }

.price-card-featured { border-color: var(--navy); background: var(--navy); color: var(--white); }
.price-card-featured h3,
.price-card-featured .price { color: var(--white); }
.price-card-featured .price-card-summary { color: #d3dceb; }
.price-card-featured .checklist .icon { color: var(--gold); }
.price-card-badge {
  position: absolute; top: -14px; left: 24px; margin: 0; padding: 4px 12px; border-radius: 999px;
  background: var(--gold); color: var(--navy-dark);
  font-weight: 800; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
}

@media (max-width: 1140px) { .price-cards { grid-template-columns: 1fr 1fr; row-gap: 30px; } }
@media (max-width: 620px)  { .price-cards { grid-template-columns: 1fr; } .price-card h3 { min-height: 0; } }


/* 12. FAQ (all answers visible, no accordions) -------------------------- */

.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin-bottom: 28px; }
.wrap-narrow .faq-list { grid-template-columns: 1fr; }
.faq-item { padding: 22px 24px; border-radius: var(--radius); background: var(--silver); }
.section-silver .faq-item { background: var(--white); box-shadow: 0 2px 10px rgba(11, 46, 99, .07); }
.faq-item h3 { font-size: 18px; margin-bottom: 8px; }
.faq-item p { margin: 0; color: #2f3a48; }
@media (max-width: 800px) { .faq-list { grid-template-columns: 1fr; } }


/* 13. Promo banner ------------------------------------------------------- */

.promo { position: relative; background: var(--green); color: var(--white); }
.promo::before, .promo::after {
  content: ""; position: absolute; left: 0; right: 0; height: 5px; background: var(--lane-stripe);
}
.promo::before { top: 0; }
.promo::after  { bottom: 0; }
.promo-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 24px;
  padding-top: 40px; padding-bottom: 40px; text-align: center;
}
.promo-title { margin: 0; font: 400 clamp(26px, 3vw, 34px)/1.1 var(--font-head); text-transform: uppercase; }
.promo-text { margin: 0; font-weight: 700; font-size: 18px; }


/* 14. Hours, location, contact, forms ----------------------------------- */

.visit-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: stretch; }
.icon-line { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.icon-line .icon { margin-top: .3em; color: var(--green); }

.hours li {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.hours li:first-child { border-top: 1px solid var(--line); }
.hours-label { font-weight: 700; }
.hours-time { text-align: right; color: var(--muted); }
@media (max-width: 480px) {
  .hours li { flex-direction: column; gap: 2px; }
  .hours-time { text-align: left; }
}

.map { min-height: 420px; border-radius: var(--radius); overflow: hidden; background: var(--silver); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
@media (max-width: 900px) {
  .visit-grid { grid-template-columns: 1fr; }
  .map, .map iframe { min-height: 340px; }
}

.contact-list { max-width: 560px; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list .icon { width: 24px; height: 24px; margin-top: 3px; color: var(--green); }
.contact-list strong { display: block; font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-list a { font-size: 19px; font-weight: 700; text-decoration: none; }


.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--white);
}
.social-links a:hover { background: var(--green); color: var(--white); }
.social-links .icon { width: 20px; height: 20px; }


/* 15. Footer ------------------------------------------------------------- */

.site-footer { position: relative; background: var(--navy-dark); color: var(--white); }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--lane-stripe);
}
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1.25fr; gap: 36px;
  padding-top: 60px; padding-bottom: 40px;
}
.footer-logo { width: 230px; margin-bottom: 16px; }
.footer-grid p, .footer-grid li { color: var(--white); margin: 0; }
.footer-grid li { padding: 4px 0; }
.footer-heading {
  margin: 6px 0 14px;
  font: 800 13.5px/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.site-footer .social-links a { background: rgba(255, 255, 255, .12); }
.site-footer .social-links a:hover { background: var(--green); color: var(--white); }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding-top: 20px; padding-bottom: 26px;
  border-top: 1px solid rgba(255, 255, 255, .15); font-size: 14.5px;
}
.footer-bottom p { margin: 0; }

@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; } }


/* 16. Lightbox (photo viewer) -------------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 12, 26, .94); touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; max-width: 94vw; max-height: 92vh; }
.lightbox img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; border-radius: 6px; cursor: zoom-in; }
.lightbox figcaption { margin-top: 10px; text-align: center; color: #cfd6e0; font-size: 14.5px; }

.lightbox.is-zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lightbox.is-zoomed figure { max-width: none; max-height: none; }
.lightbox.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }

.lightbox button {
  position: fixed; display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: var(--white);
  font-size: 34px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .26); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev  { left: 14px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lightbox-prev,
.lightbox.is-single .lightbox-next { display: none; }



/* 17. Back-to-top button (shown by main.js after scrolling down) -------- */

.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--navy); color: var(--white); border: 2px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .2s, transform .2s, visibility .2s, background-color .15s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--green); color: var(--white); }
.back-to-top .icon { width: 22px; height: 22px; }
@media (max-width: 600px) { .back-to-top { right: 14px; bottom: 14px; width: 46px; height: 46px; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
