/* Primary — page-specific only. Everything reusable (hero, stepper,
   info-grid, app-download, banner) lives in the shared base
   (school.css) — see the Phase 2 report §36. The food range used to
   reuse the shared .fv-strip drag-strip component; replaced with its
   own grid below per client feedback — food is the point of this page,
   and a horizontal strip only ever showed a sliver of the range. */

/* Menu grid — 2 cols mobile, 3 tablet (≥768px), 4 desktop (≥1024px),
   matching the two breakpoints already used elsewhere in this codebase
   (school.css:257, school.css:795) rather than introducing new ones.
   A plain auto-flow grid: hiding a card via the category filter's own
   `hidden` toggle (components.js, unchanged) removes it from grid flow
   automatically, so remaining cards reflow with no manual re-layout. */
.fv-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .fv-menu-grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
}
@media (min-width: 1024px) {
  .fv-menu-grid { grid-template-columns: repeat(4, 1fr); gap: 1.35rem; }
}
.fv-menu-grid__card {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3.35;
  border-radius: var(--fv-radius-2xl);
  overflow: hidden;
  background: var(--fv-oat);
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.08);
}
/* Same equal-specificity issue as the lightbox below: a bare .fv-menu-grid__card
   never sets `display` itself outside this rule, but Grid still needs an
   explicit hide for a filtered-out card, since [hidden] alone only removes
   it from normal flow, not grid flow, without this. */
.fv-menu-grid__card[hidden] { display: none; }
.fv-menu-grid__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.fv-menu-grid__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0.8rem 0.6rem;
  background: linear-gradient(to top, rgba(20, 20, 20, 0.8), rgba(20, 20, 20, 0.18) 65%, transparent);
}
.fv-menu-grid__caption-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--fv-paper);
}
.fv-menu-grid__caption-cat {
  font-family: var(--fv-font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 253, 248, 0.75);
}
@media (min-width: 1024px) {
  .fv-menu-grid__caption-name { font-size: 0.95rem; }
}

/* "See more" / "Show less" row — see primary.js for the logic. Same
   .fv-tab styling Secondary's own show-more button uses, for visual
   consistency with that proven pattern. */
.fv-menu-showmore-row {
  margin-top: 1.5rem;
  text-align: center;
}
.fv-menu-showmore-row [data-fv-menu-showmore] {
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

/* Menu download CTAs — moved below the food grid, in their own small
   CTA area, deliberately separated from the category filters above the
   grid so they don't read as more filters. Real .fv-btn markup so they
   already match the site's button language; only applied here since
   .fv-btn is normally only ever used on <a> tags elsewhere, and a plain
   <button> needs its own UA-chrome reset (font/appearance) anchors
   never needed. No href yet — see food-showcase.php — but built so a
   real download link/handler can be wired to
   data-fv-download="menu" / "nutrition" later without touching this
   markup or CSS. */
.fv-menu-downloads {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(20, 20, 20, 0.1);
  text-align: center;
}
.fv-menu-downloads__prompt {
  font-family: var(--fv-font-display, inherit);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
}
.fv-menu-downloads__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.fv-menu-downloads .fv-btn {
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
@media (max-width: 480px) {
  .fv-menu-downloads__buttons { flex-direction: column; align-items: stretch; }
  .fv-menu-downloads .fv-btn { width: 100%; }
}

/* Primary menu lightbox — scoped to #primary-food-grid only (see
   primary.js). Native <button>/[hidden] throughout; toggled via the
   `hidden` attribute, never inline style.display, so nothing here fights
   the browser's own [hidden]{display:none} rule. */
.fv-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
/* .fv-lightbox and [hidden] are equal-specificity (0,1,0) selectors, and
   this stylesheet loads after the UA sheet — without this, `display:flex`
   above would win over the browser's own [hidden]{display:none} and the
   modal could never actually hide via the hidden attribute. */
.fv-lightbox[hidden] { display: none; }
.fv-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.86);
}
.fv-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(90vw, 640px);
  max-height: 90vh;
}
.fv-lightbox__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 76vh;
  border-radius: var(--fv-radius-2xl);
  overflow: hidden;
  background: rgba(255, 253, 248, 0.04);
}
.fv-lightbox__frame img {
  display: block;
  max-width: min(90vw, 640px);
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.fv-lightbox__title {
  margin: 0;
  font-family: var(--fv-font-display, inherit);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fv-paper);
  text-align: center;
}
.fv-lightbox__close,
.fv-lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  width: 2.75rem;
  border-radius: var(--fv-radius-full);
  border: 1px solid rgba(255, 253, 248, 0.25);
  background: rgba(20, 20, 20, 0.55);
  color: var(--fv-paper);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fv-lightbox__close:hover,
.fv-lightbox__nav:hover {
  background: rgba(20, 20, 20, 0.8);
  border-color: rgba(255, 253, 248, 0.5);
}
.fv-lightbox__close { top: -0.5rem; right: -0.5rem; }
.fv-lightbox__nav--prev { left: -1.25rem; top: 50%; transform: translateY(-50%); }
.fv-lightbox__nav--next { right: -1.25rem; top: 50%; transform: translateY(-50%); }
.fv-lightbox__nav[hidden] { display: none; }
@media (max-width: 640px) {
  .fv-lightbox { padding: 1rem; }
  .fv-lightbox__close { top: 0; right: 0; }
  .fv-lightbox__nav--prev { left: 0.25rem; }
  .fv-lightbox__nav--next { right: 0.25rem; }
  .fv-lightbox__nav { height: 2.25rem; width: 2.25rem; }
}

/* Primary header/nav and hero CTA layout. Loaded only on /primary/ from the
   Primary header template, under its own URL so browsers never reuse a
   cached primary.css. Reproduces the approved staging school.css rules. */
.fv-header__row { justify-content: flex-start; }
.fv-header__actions { margin-left: auto; }
.fv-header__sections .fv-navdrop__link { padding-left: 0.625rem; padding-right: 0.625rem; }
.fv-navdrop__toggle { width: 1.25rem; }
.fv-hero-tall__actions { align-items: center; }
@media (max-width: 639px) {
  .fv-hero-tall__actions > .fv-btn:nth-child(-n+2) { flex: 1 1 auto; }
}
