/* Fonts: Montserrat (body) + Playfair Display (headings).
   Tip: for faster loading you can move this to a <link> in base.html <head>. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700;800&display=swap');

/* =========================================================================
   Facilities > Meal Menu   (same design system as the other facilities pages)
   ONE colour only: dark blue. Everything is scoped under .menu-page so it
   cannot leak into other pages.
   ========================================================================= */

.menu-page {
  --mm-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mm-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --mm-navy: #0B2F5B;          /* the one dark blue */
  --mm-navy-2: #0F4C8A;        /* lighter end of the ribbon gradient */
  --mm-navy-dark: #061E3D;
  --mm-tint: #F4F8FD;
  --mm-edge: #D6E2F0;
  --mm-soft: var(--ink-soft, #555);
  background: #fff;
  font-family: var(--mm-body);
}

/* body font everywhere (icons keep their own font because they are <i>) */
.menu-page p,
.menu-page li,
.menu-page a,
.menu-page span,
.menu-page button,
.menu-page td,
.menu-page th,
.menu-page b { font-family: var(--mm-body); }

/* headings font */
.menu-page h1,
.menu-page h2,
.menu-page h3 { font-family: var(--mm-head); }

/* ---------- Banner (1920 x 600) — hides itself if the image is missing ---------- */
.menu-page .mm-hero {
  position: relative;
  width: 100%;
  height: clamp(260px, 31.25vw, 600px);
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0B2F5B 0%, #0F4C8A 100%);
}
.mm-hero-img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  display: block;
}

/* =========================================================================
   RIBBON HEADING — used for every section heading
   (notched right end + folded corner, same as the Transport page)
   ========================================================================= */
.menu-page .ribbon-head {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0 0 30px;
  padding: 0;
  font-size: clamp(1.35rem, 2.7vw, 2.05rem);
  font-weight: 700; line-height: 1.2; letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
  color: #fff;
  border: 0;
}
.menu-page .ribbon-head::before {                 /* ribbon body, V-notch on the right */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, var(--mm-navy) 0%, var(--mm-navy-2) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 50%, 100% 100%, 0 100%);
  transform-origin: left center;
}
.menu-page .ribbon-head::after {                  /* folded corner under the left edge */
  content: ""; position: absolute; left: 0; top: 100%;
  width: 24px; height: 18px;
  background: var(--mm-navy-dark);
  clip-path: polygon(0 0, 100% 0, 100% 100%);     /* right angle at top-right */
}
.menu-page .ribbon-head span {
  position: relative; z-index: 1;
  display: block;
  padding: 14px 70px 14px 30px;
  font-family: inherit;
}

/* ---------- Shared section heading wrapper ---------- */
.menu-page .section-head { max-width: 900px; margin: 0 auto 34px; text-align: center; }
.menu-page .section-head .ribbon-head { margin-bottom: 0; }

/* ---------- Intro: "Weekly Meal Menu" in one rectangular box ---------- */
.menu-page .mm-intro { padding: 38px 0 50px; text-align: center; }
.mm-crumbs {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 600; color: var(--mm-soft);
  margin: 0 0 18px;
}
.mm-crumbs a:hover { color: var(--mm-navy); }
.mm-crumbs i { font-size: 0.6rem; }
.mm-crumbs span { color: var(--mm-navy); font-weight: 700; }

.mm-box {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, var(--mm-tint) 100%);
  border: 1px solid var(--mm-edge);
  border-bottom: 8px solid var(--mm-navy);
  border-radius: 14px;
  padding: 44px 36px 46px;
  box-shadow: 0 40px 70px -44px rgba(11, 47, 91, 0.6);
}
.menu-page .mm-title {
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.01em;
  color: var(--mm-navy);
  margin: 0;
}
.mm-tagline {
  margin: 18px auto 0; max-width: 760px;
  font-size: 1.25rem; font-weight: 600; line-height: 1.7;
  color: var(--mm-navy);
}

/* ---------- Weekly menu table ---------- */
.menu-page .mm-week { padding: 52px 0 56px; background: var(--mm-tint); }

.mm-table-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--mm-edge);
  box-shadow: 0 30px 60px -36px rgba(11, 47, 91, 0.55);
}
.mm-table { width: 100%; border-collapse: collapse; }
.mm-table thead th {
  text-align: left; padding: 20px 22px;
  background: var(--mm-navy); color: #fff;
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.02em;
  white-space: nowrap;
}
.mm-table thead th i { margin-right: 8px; color: #fff; opacity: 0.85; }
.mm-table tbody td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--mm-edge);
  font-size: 1.08rem; font-weight: 600; line-height: 1.55; color: var(--ink, #1a1a1a);
  vertical-align: middle;
}
.mm-table tbody tr:last-child td { border-bottom: none; }
.mm-table tbody tr:nth-child(even) { background: var(--mm-tint); }
.mm-table tbody tr { transition: background 0.2s ease; }
.mm-table tbody tr:hover { background: #E6EFFA; }

.mm-day {
  display: inline-block; min-width: 124px; text-align: center;
  padding: 9px 18px; border-radius: 8px;
  background: var(--mm-navy); color: #fff;
  font-weight: 700; font-size: 1.02rem;
  box-shadow: 0 10px 20px -12px rgba(11, 47, 91, 0.7);
}

/* =========================================================================
   ANIMATIONS (only when JS is running; reduced-motion users see no motion)
   ========================================================================= */
@keyframes mm-rise {
  from { opacity: 0; transform: perspective(1400px) rotateX(12deg) translateY(36px); }
  to   { opacity: 1; transform: perspective(1400px) rotateX(0) translateY(0); }
}
@keyframes mm-drop {
  from { opacity: 0; transform: perspective(800px) rotateX(-50deg) translateY(22px); }
  to   { opacity: 1; transform: perspective(800px) rotateX(0) translateY(0); }
}
@keyframes mm-row {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mm-unroll { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mm-slide  { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes mm-fold   { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* hidden until revealed */
.menu-page.js .mm-box:not(.in),
.menu-page.js .mm-title:not(.in),
.menu-page.js .mm-table-wrap:not(.in) { opacity: 0; }
.menu-page.js .ribbon-head:not(.in)::before { transform: scaleX(0); }
.menu-page.js .ribbon-head:not(.in)::after,
.menu-page.js .ribbon-head:not(.in) span { opacity: 0; }

/* play */
.menu-page.js .mm-box.in        { animation: mm-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.menu-page.js .mm-title.in      { animation: mm-drop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s backwards; transform-origin: 50% 100%; }
.menu-page.js .mm-table-wrap.in { animation: mm-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.menu-page.js .mm-table-wrap.in tbody tr {
  animation: mm-row 0.5s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.08s + 0.35s);
}
.mm-table tbody tr:nth-child(1) { --i: 0; }
.mm-table tbody tr:nth-child(2) { --i: 1; }
.mm-table tbody tr:nth-child(3) { --i: 2; }
.mm-table tbody tr:nth-child(4) { --i: 3; }
.mm-table tbody tr:nth-child(5) { --i: 4; }
.mm-table tbody tr:nth-child(6) { --i: 5; }
.mm-table tbody tr:nth-child(7) { --i: 6; }
.menu-page.js .ribbon-head.in::before { animation: mm-unroll 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.menu-page.js .ribbon-head.in span    { animation: mm-slide 0.6s ease 0.25s backwards; }
.menu-page.js .ribbon-head.in::after  { animation: mm-fold 0.4s ease 0.6s backwards; }

@media (prefers-reduced-motion: reduce) {
  .menu-page *, .menu-page *::before, .menu-page *::after {
    animation: none !important; transition: none !important;
  }
}

/* ---------- Responsive: each day becomes a card ---------- */
@media (max-width: 900px) {
  .mm-table-wrap { border: 0; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
  .mm-table, .mm-table tbody, .mm-table tr, .mm-table td { display: block; width: 100%; }
  .mm-table thead { display: none; }
  .mm-table tbody tr,
  .mm-table tbody tr:nth-child(even) {
    background: #fff;
    margin-bottom: 20px;
    border: 1px solid var(--mm-edge);
    border-bottom: 6px solid var(--mm-navy);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 36px -26px rgba(11, 47, 91, 0.5);
  }
  .mm-table tbody td {
    display: flex; gap: 14px; align-items: baseline;
    padding: 14px 18px;
  }
  .mm-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 96px;
    font-weight: 700; color: var(--mm-navy);
  }
  .mm-table tbody td[data-label="Day"] { background: var(--mm-tint); justify-content: flex-start; }
  .mm-table tbody td[data-label="Day"]::before { display: none; }
}
@media (max-width: 700px) {
  .menu-page .mm-intro { padding: 28px 0 34px; }
  .mm-box { padding: 32px 18px 34px; }
  .menu-page .mm-week { padding: 36px 0 40px; }
  .menu-page .section-head { margin-bottom: 26px; }
  .menu-page .ribbon-head span { padding: 12px 52px 12px 22px; }
  .mm-tagline { font-size: 1.1rem; }
}