/* Single festival page (single-festival.php). Scoped to .whfp so it
   doesn't clash with the theme's global CSS. */
@font-face {
  font-family: "WHFP Miller Display";
  src: url('../fonts/MillerDisplay-Semibold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.whfp {
  --fp-maroon: #791e30;
  --fp-deep: #712822;
  --fp-gold: #eebc1d;
  --fp-gold-ink: #3a2a06;
  --fp-ink: #2b1c1d;
  --fp-soft: #6b5a58;
  --fp-ground: #ffffff;
  --fp-panel: #f6f1ec;
  --fp-rule: #e2d6cd;
  --fp-live: #1f7a4d;
  --fp-flag: #b4451f;
  --fp-display: "WHFP Miller Display", "Miller Display", Georgia, "Times New Roman", serif;
  --fp-body: "Merriweather Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fp-ground);
  color: var(--fp-ink);
  font-family: var(--fp-body);
  font-size: 16px;
  line-height: 1.65;
}
.whfp * { box-sizing: border-box; }
.whfp a { color: var(--fp-maroon); }
.whfp a:focus-visible, .whfp button:focus-visible { outline: 2px solid var(--fp-maroon); outline-offset: 2px; }
.whfp h1, .whfp h2, .whfp h3 { font-family: var(--fp-display); font-weight: 700; line-height: 1.12; margin: 0; text-wrap: balance; color: inherit; }
.whfp p { margin: 0; }
.whfp-wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* crumbs */
.whfp-crumbs { font-size: .82rem; color: var(--fp-soft); padding-block: 18px 0; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; text-align: left; }
.whfp-crumbs a { color: var(--fp-soft); text-decoration: none; }
.whfp-crumbs a:hover { text-decoration: underline; }

/* hero: title left, the date leaf right */
.whfp-hero { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; padding-block: 26px 34px; border-bottom: 2px solid var(--fp-maroon); }
.whfp-hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: -.015em; color: var(--fp-maroon); }
.whfp-place { margin-top: 14px !important; font-size: 1.02rem; color: var(--fp-soft); }
.whfp-lede { margin-top: 16px !important; max-width: 58ch; font-size: 1.08rem; }
.whfp-share { margin-top: 16px; }
.whfp-share, .whfp-share > div { text-align: left !important; }

.whfp-leaf { width: 230px; border: 1px solid var(--fp-rule); border-radius: 3px; overflow: hidden; background: var(--fp-ground); text-align: center; }
.whfp-leaf-top { background: var(--fp-maroon); color: #fff; font-size: .8rem; letter-spacing: .06em; padding: 7px 10px; }
.whfp-leaf-days { font-family: var(--fp-display); font-weight: 700; font-size: 3.3rem; line-height: 1; padding: 16px 8px 4px; color: var(--fp-ink); font-variant-numeric: tabular-nums; }
.whfp-leaf-month { font-size: .95rem; color: var(--fp-soft); padding-bottom: 12px; }
.whfp-leaf-status { border-top: 1px solid var(--fp-rule); padding: 10px; font-size: .84rem; font-weight: 700; }
.whfp-leaf-status.is-live { background: var(--fp-live); color: #fff; }
.whfp-leaf-status.is-soon { background: var(--fp-gold); color: var(--fp-gold-ink); }
.whfp-leaf-status.is-tbc { color: var(--fp-soft); font-weight: 400; }
.whfp-leaf-actions { display: flex; border-top: 1px solid var(--fp-rule); }
.whfp-leaf-actions a { flex: 1; padding: 9px 6px; font-size: .8rem; text-decoration: none; }
.whfp-leaf-actions a + a { border-left: 1px solid var(--fp-rule); }
.whfp-leaf-actions a:hover { background: var(--fp-panel); }

/* facts row */
.whfp-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; border-bottom: 1px solid var(--fp-rule); }
.whfp-facts-3 { grid-template-columns: repeat(3, 1fr); }
.whfp-facts-2 { grid-template-columns: repeat(2, 1fr); }
.whfp-facts-1 { grid-template-columns: 1fr; }
.whfp-fact { padding: 18px 18px 18px 0; }
.whfp-fact + .whfp-fact { padding-left: 18px; border-left: 1px solid var(--fp-rule); }
.whfp-fact dt { font-size: .78rem; color: var(--fp-soft); margin-bottom: 4px; font-weight: 400; }
.whfp-fact dd { margin: 0; font-size: .98rem; font-weight: 500; }

/* body grid */
.whfp-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding-block: 40px 60px; }
.whfp-main { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.whfp-section h2 { font-size: 1.75rem; margin-bottom: 16px; }
.whfp-prose { display: flex; flex-direction: column; gap: 14px; max-width: 66ch; }
.whfp-prose p { font-size: 1.02rem; }
.whfp-prose ul, .whfp-prose ol { margin: 0; padding-left: 1.3em; }
.whfp-prose img { max-width: 100%; height: auto; }

/* programme: a real sequence, so it is numbered by day */
.whfp-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.whfp-day { display: grid; grid-template-columns: 92px 1fr; gap: 20px; padding-block: 16px; border-top: 1px solid var(--fp-rule); }
.whfp-day:last-child { border-bottom: 1px solid var(--fp-rule); }
.whfp-day-label { font-family: var(--fp-display); font-weight: 700; font-size: 1.15rem; color: var(--fp-maroon); line-height: 1.2; }
.whfp-day-label small { display: block; font-family: var(--fp-body); font-size: .78rem; color: var(--fp-soft); margin-top: 3px; font-weight: 400; }
.whfp .whfp-day h3 { font-family: var(--fp-body); font-size: 1rem; margin-bottom: 4px; }
.whfp-day p { color: var(--fp-soft); font-size: .95rem; }
.whfp-day.is-today { background: linear-gradient(90deg, rgba(31, 122, 77, .09), transparent 70%); }
.whfp-today { display: inline-block; margin-left: 8px; font-family: var(--fp-body); font-size: .72rem; font-weight: 400; background: var(--fp-live); color: #fff; padding: 1px 8px; border-radius: 999px; vertical-align: 2px; }

/* before you go */
.whfp-tips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.whfp-tips li { padding-left: 18px; position: relative; font-size: .95rem; }
.whfp-tips li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--fp-gold); transform: rotate(45deg); }
.whfp-tips strong { display: block; }

/* gallery */
.whfp-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 150px; gap: 6px; }
.whfp-gallery.is-single { grid-template-columns: 1fr; grid-auto-rows: 360px; }
.whfp-gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 2px; background: var(--fp-panel); }
.whfp-gallery figure:first-child { grid-row: span 2; }
.whfp-gallery.is-single figure:first-child { grid-row: auto; }
.whfp-gallery.is-row { grid-auto-rows: 200px; }
.whfp-gallery.is-row-2 { grid-template-columns: repeat(2, 1fr); }
.whfp-gallery.is-row-3 { grid-template-columns: repeat(3, 1fr); }
.whfp-gallery.is-row-4 { grid-template-columns: repeat(4, 1fr); }
.whfp-gallery.is-row figure:first-child { grid-row: auto; }
.whfp-gallery a { display: block; width: 100%; height: 100%; }
.whfp-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.whfp-gallery a:hover img { transform: scale(1.04); }
.whfp-gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 7px; font-size: .78rem; color: #fff; background: linear-gradient(transparent, rgba(30, 10, 12, .72)); pointer-events: none; }

/* all dates */
.whfp-table-wrap { overflow-x: auto; }
.whfp-dates { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.whfp-dates th { text-align: left; font-size: .78rem; color: var(--fp-soft); font-weight: 400; padding: 0 12px 8px 0; border-bottom: 1px solid var(--fp-rule); background: none; }
.whfp-dates td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--fp-rule); vertical-align: top; }
.whfp-dates tr.is-past td { color: var(--fp-soft); }
.whfp-pill { display: inline-block; font-size: .74rem; border: 1px solid var(--fp-rule); padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.whfp-pill.confirmed { border-color: var(--fp-maroon); color: var(--fp-maroon); }
.whfp-pill.tentative { border-color: var(--fp-gold); color: var(--fp-soft); }
.whfp-pill.live { background: var(--fp-live); border-color: var(--fp-live); color: #fff; }
.whfp-pill.issue { border-color: var(--fp-flag); color: var(--fp-flag); cursor: help; }
.whfp-note { margin-top: 12px !important; font-size: .84rem; color: var(--fp-soft); max-width: 66ch; }
.whfp-editor-note { color: var(--fp-flag); }

/* sidebar */
.whfp-side { display: flex; flex-direction: column; gap: 28px; }
.whfp-sticky { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 28px; }
.whfp-ask { background: var(--fp-deep); color: #fff; padding: 22px; border-radius: 3px; }
.whfp-ask h2 { font-size: 1.35rem; color: #fff; margin-bottom: 8px; }
.whfp-ask p { font-size: .9rem; color: #f0ddd8; margin-bottom: 16px; }
.whfp-btn { display: block; text-align: center; background: var(--fp-gold); color: var(--fp-gold-ink) !important; text-decoration: none; font-weight: 700; padding: 11px 14px; border-radius: 2px; }
.whfp-btn:hover { filter: brightness(1.05); }
.whfp-ask .whfp-alt { display: block; text-align: center; margin-top: 10px; font-size: .84rem; color: #f0ddd8; }
.whfp-side h3 { font-size: 1.1rem; margin-bottom: 10px; }
.whfp-trips, .whfp-near { list-style: none; margin: 0; padding: 0; }
.whfp-trips li, .whfp-near li { padding-block: 10px; border-top: 1px solid var(--fp-rule); }
.whfp-trips li:last-child, .whfp-near li:last-child { border-bottom: 1px solid var(--fp-rule); }
.whfp-trips a, .whfp-near a { text-decoration: none; font-weight: 500; }
.whfp-trips a:hover, .whfp-near a:hover { text-decoration: underline; }
.whfp-trips span, .whfp-near span { display: block; font-size: .8rem; color: var(--fp-soft); }

@media (max-width: 860px) {
  .whfp-crumbs { padding-top: 34px; }
  .whfp-hero { grid-template-columns: 1fr; gap: 24px; }
  .whfp-leaf { width: 100%; max-width: 340px; }
  .whfp-body { grid-template-columns: 1fr; gap: 40px; }
  .whfp-sticky { position: static; }
  .whfp-facts, .whfp-facts-3 { grid-template-columns: 1fr 1fr; }
  .whfp-fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .whfp-fact:nth-child(n+3) { border-top: 1px solid var(--fp-rule); }
}
@media (max-width: 560px) {
  .whfp-tips { grid-template-columns: 1fr; }
  .whfp-day { grid-template-columns: 1fr; gap: 6px; }
  .whfp-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
  .whfp-gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
  .whfp-gallery.is-single { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .whfp-gallery.is-single figure:first-child { grid-column: auto; grid-row: auto; }
  .whfp-gallery.is-row { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .whfp-gallery.is-row figure:first-child { grid-column: auto; grid-row: auto; }
  .whfp-gallery.is-row-3 figure:first-child { grid-column: span 2; }
}
