/* Custom components added for the Hugo rebuild — things Bulma doesn't
   provide a component for, plus a couple of the original theme's bespoke
   pieces (the header banner strip, the season-dates list). Everything
   that Bulma already covers (buttons, cards, the nav, grid, notifications)
   is left to Bulma's own classes rather than re-styled here — see
   bulma-theme.css for the one place ZipZone's brand color/fonts are
   injected into Bulma's own CSS variables. */

/* Navbar height: Bulma's default (3.25rem / 52px) is barely taller than
   the 42px-tall logo, leaving almost no breathing room above/below it on
   both desktop and mobile. Taller gives the logo real padding instead of
   nearly filling the bar. Set on :root (not just .navbar) because Bulma's
   own .has-navbar-fixed-top helper reads this same variable on <html>/
   <body> to push page content down below the now out-of-flow fixed navbar
   — html/body are ancestors of .navbar, so they'd otherwise only see
   Bulma's default 3.25rem, not this site's taller bar. */
:root {
  --bulma-navbar-height: 5rem;
}

/* Homepage hero: the always-visible poster <img> sits behind the video
   (layouts/index.html), positioned/cropped identically to theme.css's own
   .hero-bg-video rule so the two line up exactly. The video itself starts
   transparent and fades in once site.js confirms real playback has begun
   (the 'is-playing' class) — a deliberate reveal over the static poster
   instead of an abrupt pop from still image to motion. */
.hero-wrapper .hero-bg .hero-bg-poster {
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
@supports (object-fit: cover) {
  .hero-wrapper .hero-bg .hero-bg-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.hero-bg-video {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-bg-video.is-playing {
  opacity: 1;
}

/* Bulma caps every .navbar-item img at max-height: 1.75rem (sized for a
   small square icon logo) — our logo is wide and short, so that cap was
   squishing it vertically while header.html's explicit width/height
   attributes (already derived from the real file's aspect ratio) kept it
   full width. Removing the cap on the brand logo so it renders at its own
   correct, already-computed dimensions instead of being clipped down. */
.navbar-brand .navbar-item img {
  --bulma-navbar-item-img-max-height: none;
}

/* Bulma's .navbar.is-dark colors its dropdown panel using the dark hue/
   saturation, but takes the LIGHTNESS from --bulma-navbar-dropdown-item-
   background-l, which defaults to the page's own scheme lightness (white
   on this site) rather than the navbar's own dark lightness — so on mobile,
   where the dropdown renders inline as part of the expanded menu instead
   of a floating panel, it shows up near-white against the dark top-level
   items right above it. Pulling the lightness (and item text color) from
   the same dark-theme variables the top-level items already use makes the
   submenu read as one continuous dark menu instead of two clashing panels. */
.navbar.is-dark {
  --bulma-navbar-dropdown-item-background-l: var(--bulma-dark-l);
  --bulma-navbar-dropdown-item-color-l: var(--bulma-dark-invert-l);
}

/* theme.css (the old WordPress theme's global link styling) sets
   a:hover,a:focus{color:#cc4600} — orange, meant for body-copy links. Bulma
   never gives .navbar-item/.navbar-link their own hover text color (hover
   feedback is the subtle background-lighten effect already built into the
   dark navbar), so that generic rule wins on hover for the top-level nav
   and turns it orange. The dropdown items are unaffected because their own
   Bulma color rule is more specific than a:hover. Re-asserting the same
   color on hover restores Bulma's intended (no text-color-change) behavior
   for the top-level items too, matching the dropdown. */
.navbar-item:hover,
.navbar-link:hover {
  color: var(--bulma-navbar-item-color);
}

/* Bulma's navbar text sizes (1rem top-level, 0.875rem dropdown) read small
   against this site's larger logo/branding — bumping both up, keeping the
   dropdown a notch below the top level to preserve the hierarchy. */
.navbar-item,
.navbar-link {
  font-size: 1.15rem;
}

.navbar-dropdown {
  font-size: 1rem;
}

/* Dark mode is turned off for this release: on Android especially, the
   page would pick up the visitor's OS dark preference, but none of the
   hand-written custom.css/theme.css components (booking-options, price
   tiers, season-dates-list, etc.) are dark-mode aware — hardcoded light
   colors against a dark Bulma background looked broken. Forcing the
   light theme is done in baseof.html (data-theme="light" on <html>,
   which beats Bulma's own prefers-color-scheme:dark block in the
   cascade); this just tells the browser's own native UI (scrollbars,
   form controls) to stay light too, so nothing is left dark-tinted. */
:root {
  color-scheme: light;
}

/* Button text weight: the tour-card "Book Now" buttons use Bulma's
   has-text-weight-semibold utility (600) rather than Bulma's own default
   button weight (500, --bulma-weight-medium) — bumping every button to
   match via Bulma's own CSS variable, so it's the sitewide standard
   instead of a one-off utility class. */
.button {
  --bulma-button-weight: var(--bulma-weight-semibold);
}

/* Tour/feature card bullet lists (the "What's included" / "Includes:"
   lists) carry a 15px left indent from theme.css — removing it so the
   bullet text lines up with the rest of the card's text instead of being
   indented in from it. Keeping list-style-position: inside (rather than
   just zeroing the padding) so the bullet marker itself isn't clipped at
   the card's edge. */
.card-content ul,
.card-content ol {
  padding-left: 0;
  list-style-position: inside;
}

/* Mosaic tile buttons (callout-grid, index.html) and the hero button
   otherwise inherit the text-shadow theme.css puts on .callout-grid-inner
   and .hero-caption (for legibility of white text directly on a photo) —
   buttons sit on a solid orange background, not the photo, so they don't
   need it and shouldn't have it, matching every other button on the site
   (and zipzone.ca itself, confirmed: its own callout-grid-button has no
   text-shadow either). */
.callout-grid-button,
.hero-button {
  text-shadow: none;
}

/* Hero button (index.html) is Bulma's .is-large size on desktop, while the
   callout-header button below it is Bulma's normal size — intentional
   there (hero is the primary CTA), but on mobile the two buttons sit close
   together and the size mismatch reads as inconsistent. Reset just the
   hero button back to normal size below the tablet breakpoint by
   overriding Bulma's own --bulma-control-size variable (which is what
   .is-large itself sets), rather than hardcoding padding/font-size. */
@media (max-width: 767px) {
  .hero-button.is-large {
    --bulma-control-size: var(--bulma-size-normal);
  }
}

/* Content images: make every image dropped into page body content
   responsive, since it isn't wrapped in Bulma's .image/figure markup. */
.layout img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Skip-link: visible only when focused (keyboard navigation). Bulma's
   .is-sr-only has no focus-visible variant, so this is a small addition
   on top of it rather than a replacement. */
.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #fff;
  clip: auto;
  white-space: normal;
}

/* Responsive 16:9 video embed (e.g. the YouTube tour video) */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Page banner (header_image): a full-bleed strip at a fixed height,
   regardless of the source photo's native aspect ratio. The original theme
   got this by having WordPress crop every banner upload server-side to a
   fixed ~2880x410 shape before serving it; we have the single uploaded
   original instead, so we crop it client-side with object-fit instead of
   maintaining a server-side crop step. */
.header-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}
@media (min-width: 768px) {
  .header-image img { height: 300px; }
}
@media (min-width: 992px) {
  .header-image img { height: 410px; }
}

/* Photo gallery grid (e.g. DynaClimb action shots) */
.layout .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 30px 0;
}
.layout .gallery-grid figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.layout .gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Equal-height cards within a Bulma columns row. Bulma's .columns is a flex
   row with the default align-items:stretch (desktop widths only — it's not
   flex at all below 769px, where columns stack and this is moot), so each
   .column is already stretched to match the tallest sibling. The .card
   inside doesn't fill that height on its own (height:auto), so this makes
   it do that, then lets .card-content (not the image or footer) absorb the
   slack, which keeps every footer button lined up along the bottom of the
   row regardless of how much text is in each card. */
.columns > .column > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.columns > .column > .card > .card-content {
  flex-grow: 1;
}

/* Crop every card image to the same shape, so a row of cards doesn't end up
   lopsided just because the source photos have different native aspect
   ratios (object-fit:cover keeps them filling the box without distorting). */
.card .card-image .image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card .card-image .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "Most Popular" badge: overlaid on the card photo's bottom-right corner
   instead of sitting as its own line above the title. */
.card-image {
  position: relative;
}
.card-image-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
}

/* Tour pricing tiers (used inside .card-content on pricing / tour pages).
   The three tiers (General Admission, Youth, Little Zippers) stack as
   full-width rows, each row a description/price pair, in a two-column
   grid so every row's price starts at the same x-position (.price-tier-col
   has no box of its own — display: contents — so its two children become
   direct grid items, sharing column tracks across all three rows).
   The description column is sized with `max-content`, not plain `auto`
   and not `1fr` — both of those tied the gap to the window size: `auto`
   is allowed to shrink under space pressure, so on a narrow card the
   text wraps differently per row and each row is left with a different
   amount of slack before the price; `1fr` fills all available space, so
   on a wide card short text like "General Admission" leaves a lot of
   it empty, stranding the price far to the right. `max-content` doesn't
   shrink — it's always exactly as wide as the longest line the real
   content needs (computed live, not a guessed pixel value, so it keeps
   working if the text changes later) — so the gap stays the same small
   size at any window size. The trade-off: if a future label's content
   is too long for the card to fit at max-content width, it overflows
   rather than wrapping — acceptable here since the real content is
   short and stable, but worth knowing if that changes. */
.price-tiers {
  display: grid;
  grid-template-columns: max-content auto;
  column-gap: 24px;
  row-gap: 10px;
  align-items: center;
}
.price-tier-col {
  display: contents;
}
.price-tier-desc {
  min-width: 0;
}
.price-tier-desc > p {
  margin: 0;
}
/* The price + "CAD / Per Person" caption used to be a <table> (a rowspan
   cell beside two stacked unit cells), but a <table> run through CSS
   Grid's track-sizing algorithm reports an intrinsic height that doesn't
   match its own rendered height, so every row's grid track came out the
   same size regardless of its actual content — align-items: center then
   centered the price against the wrong box, leaving it flush with the
   top of 2-line descriptions instead of centered on them. Plain divs
   don't have that quirk. */
.price-tier-amount {
  display: flex;
  align-items: center;
  gap: 5px;
}
.price-tier-value {
  font-size: 1.5em;
  font-weight: bold;
}
.price-tier-unit {
  font-size: .5em;
  line-height: 1.3;
}

/* Book Online / Call to Book panel (booking-options.html partial): a grey
   boxed panel per option, matching the original theme's look, stacked on
   narrow screens and side-by-side (via flex, not a fixed width) above the
   tablet breakpoint. */
.booking-options {
  border: 1px solid #d9d9d9;
}
.booking-option {
  background-color: #eee;
  padding: 30px;
}
.booking-option + .booking-option {
  border-top: 1px solid #d9d9d9;
}
@media (min-width: 769px) {
  .booking-options {
    display: flex;
  }
  .booking-option {
    flex: 1;
  }
  .booking-option + .booking-option {
    border-top: 0;
    border-left: 1px solid #d9d9d9;
  }
}

/* FAQ "Q." prefix */
.faq-q {
  color: #ff6600;
}

/* Hours of Operation: season dates list */
.season-dates-list {
  list-style: none;
  padding: 0;
}
.season-dates-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.season-dates-list .icon-container {
  margin-right: 10px;
  flex-shrink: 0;
  width: 25px;
  text-align: center;
  padding-top: 2px;
  color: #ff5800;
}
.season-dates-list .details-container {
  display: flex;
  align-items: flex-start;
}
.season-dates-list .date-range {
  margin-right: 20px;
  flex-shrink: 0;
  font-weight: bold;
  min-width: 250px;
}
.season-dates-list .status-block {
  display: flex;
  flex-direction: column;
}
.season-dates-list .status.primary {
  font-weight: bold;
}
.season-dates-list .status.detail {
  font-size: 0.9em;
  color: #555;
}
@media (max-width: 600px) {
  .season-dates-list li {
    border-bottom: 0;
  }
  .season-dates-list .details-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .season-dates-list .date-range {
    margin-right: 0;
    margin-bottom: 5px;
    min-width: unset;
  }
}

/* Buttons: the original theme's global `a:hover` rule (theme.css) recolors
   every link's text on hover, including the text inside Bulma buttons —
   since a class+pseudo-class selector beats Bulma's own class selector,
   it wins and overrides the button's own color. Restore Bulma's own
   text color here (same formula Bulma's .button rule uses) so a button's
   label doesn't change color on hover/focus. Buttons also carry a faint
   drop shadow at every state by default; drop it everywhere rather than
   just on hover; so it doesn't reappear when hovering, focusing or
   clicking. */
a.button:hover,
a.button:focus {
  color: hsl(var(--bulma-button-h), var(--bulma-button-s), var(--bulma-button-color-l));
}
.button,
.button:hover,
.button:focus,
.button:active,
.button.is-focused,
.button:focus-visible {
  box-shadow: none;
}

/* Mosaic tile buttons (callout-grid, index.html): the original theme
   makes each button a full-width block below the tablet breakpoint. Lay
   them out in a column flexbox instead — align-items: flex-start sizes
   each button to its own content (flex's default for an auto-width
   item) rather than stretching it to the tile's full width, while still
   keeping one button per line. */
@media (max-width: 767px) {
  .container-callouts-grid .callout-grid-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Callout header banner (index.html, e.g. "Book Now for 2027!"): theme.css's
   bare `h2` rule sizes it at 3rem, sized for the wide skewed-panel desktop
   layout, which on mobile (just plain stacked text) wrapped across 3-4 lines
   and dominated the screen. Scales fluidly between the old mobile floor
   (1.75rem) and the unchanged desktop ceiling (3rem) instead of jumping at
   a single breakpoint. The middle term's 1.31rem + Nvw split (rather than
   pure vw) is the standard accessible-fluid-type formula, linearly
   interpolated between 375px and 1440px viewports — it's computed against
   this site's actual 14px html root (theme.css), not the 16px every public
   clamp()-calculator assumes, so it still lands exactly on 1.75rem/3rem at
   those two anchor widths. */
.container-callouts-header .callout-header-title {
  font-size: clamp(1.75rem, 1.31rem + 1.643vw, 3rem);
}

/* Plain data table (e.g. TripAdvisor widget embed on Testimonials) */
table.plain-table {
  border-collapse: collapse;
  width: 100%;
}
table.plain-table td {
  width: 100%;
}
