/* ============================================================
   FESTIVAL OF THE TARTANS — stylesheet
   Tartan-inspired theme. Colours and fonts are defined as
   variables below so the whole site can be re-skinned by
   editing this one block.
   ============================================================ */

:root {
  /* Scottish palette
     Brand order: RED is primary, blue + green secondary, gold complementary. */
  --red:         #a4262c;   /* PRIMARY — tartan red      */
  --red-deep:    #7c1c22;   /* darker red (hovers)       */
  --red-soft:    #d9575c;   /* bright red for dark bgs   */
  --green-deep:  #1d3c34;   /* forest / hunting green   */
  --green:       #2f5d4e;
  --navy:        #15263b;   /* deep Caledonian blue     */
  /* Retired for the strict Red / Navy / Green system (client directive).
     Kept as aliases so every existing reference still resolves:
       gold  -> red    (was the accent; red is now primary)
       gold-soft -> cream (soft text on navy)
       thistle -> navy  (fold the stray purple into structural blue)
     A few spots are re-pointed to green (tickets, form + focus accents) in their own rules. */
  --thistle:     var(--navy);
  --gold:        var(--red);
  --gold-soft:   var(--cream);
  --cream:       #f6f2e7;   /* parchment background     */
  --paper:       #ffffff;
  --ink:         #20211f;   /* body text                */
  --ink-soft:    #4a4d48;
  --line:        #e0dac8;

  --font-head: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, serif;

  --maxw: 1140px;
  --radius: 6px;
  --shadow: 0 6px 24px rgba(21,38,59,0.10);
}

/* ----------------------- Reset ------------------------ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-deep); }

img { max-width: 100%; display: block; }

/* --------------------- Tartan band -------------------- */
/* A woven plaid stripe built purely from CSS gradients.   */
.tartan-band {
  height: 20px;
  /* The tartan image (images/tartan-band.png) sits on top. If that file is
     missing, the woven CSS pattern below shows through as a fallback. */
  background:
    url("../images/tartan-band.png") repeat-x left center / auto 100%,
    repeating-linear-gradient(90deg,
      var(--green-deep) 0 22px,
      var(--navy) 22px 30px,
      var(--green-deep) 30px 52px,
      var(--gold) 52px 56px,
      var(--green-deep) 56px 78px),
    var(--green-deep);
  border-bottom: 2px solid var(--gold);
}
.site-footer .tartan-band { border-bottom: none; border-top: 2px solid var(--gold); }

/* ----------------------- Layout ----------------------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }

.section { padding: 4.5rem 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { margin-bottom: 2.5rem; }
.section-head h2 { font-size: 2.1rem; color: var(--green); }
.section-head p { color: var(--ink-soft); margin-top: .5rem; }
/* Left-aligned variant with a red rule under the title (committee / executive). */
.section-head.ruled { text-align: left; margin-bottom: 1rem; }
.section-head.ruled h2 { border-bottom: 2px solid var(--red); padding-bottom: .5rem; }
/* Society page: gap between the member groups (Executives / Directors / …). */
.people-section + .people-section { margin-top: 3.5rem; }

.kicker {
  display: inline-block;
  font-family: var(--font-head);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--green);
  margin-bottom: .6rem;
}

/* ----------------------- Header ----------------------- */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  border-bottom: 3px solid var(--red);
}
.header-inner {
  /* Wider than the page container (--maxw): the full-size logo, the six menu
     links and the tickets button need ~1150px, and 1140 minus padding can't
     hold them — which is what was squeezing the logo. */
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .35rem 1.5rem;
}
/* flex:none on both — the logo must never be squeezed to make room for the
   menu or the tickets button; the menu collapses to the ☰ instead. */
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: .6rem; color: var(--cream); }
.brand:hover { color: var(--cream); }
.brand-logo { flex: none; height: 85px; width: auto; display: block; }
.brand-year { font-family: var(--font-head); color: var(--gold-soft); font-size: .85rem; letter-spacing: .22em; align-self: flex-end; padding-bottom: 12px; }
@media (max-width: 600px) { .brand-logo { height: 71px; } .brand-year { font-size: .72rem; padding-bottom: 7px; } }
.brand-mark { font-size: 1.7rem; color: var(--green); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand-sub  { font-family: var(--font-head); color: var(--gold-soft); font-size: .8rem; letter-spacing: .25em; }

.site-nav ul { list-style: none; display: flex; gap: .15rem; align-items: center; }
.site-nav a {
  display: block; color: var(--cream); padding: .55rem .8rem; white-space: nowrap;
  font-size: 1rem; letter-spacing: .01em; border-radius: var(--radius);
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: rgba(255,255,255,.08); color: var(--gold-soft); }
.site-nav a.active { color: var(--gold-soft); box-shadow: inset 0 -3px 0 var(--red); border-radius: var(--radius) var(--radius) 0 0; }

/* Mobile nav toggle (CSS-only, no JavaScript) */
.nav-toggle, .nav-toggle-label { display: none; }
.nav-toggle-label { cursor: pointer; }
.nav-toggle-label span {
  display: block; width: 26px; height: 3px; margin: 5px 0;
  background: var(--cream); border-radius: 2px; transition: .3s;
}

/* ------------------------ Hero ------------------------ */
.hero {
  position: relative; color: #fff; text-align: center;
  padding: 6.5rem 1.25rem 6rem;
  /* Primary red banner — the dominant surface, per the Red-first brief. */
  background:
    linear-gradient(135deg, rgba(164,38,44,.96), rgba(108,20,26,.97)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 24px),
    var(--red-deep);
}
.hero-content { position: relative; max-width: 820px; margin: 0 auto; }
.hero-eyebrow { font-family: var(--font-head); letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; color: var(--cream); opacity: .92; }

/* On the red banners, a solid red button would disappear — use a cream button
   with red text so the primary CTA stays high-contrast and on-brand. */
.hero .btn-primary, .page-hero .btn-primary { background: #fff; color: var(--green); }
.hero .btn-primary:hover, .page-hero .btn-primary:hover { background: var(--cream); color: var(--red-deep); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: .4rem 0 1rem; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.hero-dates { font-family: var(--font-head); font-size: clamp(1.2rem,3vw,1.7rem); color: var(--gold-soft); }
.hero-location { font-style: italic; opacity: .9; margin-top: .25rem; }
.hero-actions { margin-top: 2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-ticket-note { margin-top: 1.1rem; font-size: .92rem; color: var(--gold-soft); font-style: italic; }

/* Tickets CTA — its own slot at the far right of the header, separate from the
   menu. The nav is pushed right and never shrinks to make room for it. */
.site-nav { margin-left: auto; }
.header-tickets { flex: 0 0 auto; display: flex; align-items: center; margin-left: .25rem; }
.header-tickets .nav-tickets { white-space: nowrap; }
/* Reserves the button's exact footprint while it's switched off. */
.header-tickets .is-placeholder { visibility: hidden; pointer-events: none; }
.nav-tickets {
  display: inline-block; font-family: var(--font-head); font-size: .85rem; letter-spacing: .04em;
  padding: .5rem .9rem; border-radius: var(--radius); background: var(--red); color: #fff !important;
  transition: background .15s;
}
.nav-tickets:hover { background: var(--red-deep); color: #fff !important; }
.nav-tickets.soon { background: transparent; color: #cfe3d8 !important; border: 1px solid rgba(47,93,78,.6); cursor: default; }

/* Newsletter band */
.newsletter { background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.08); }
.newsletter-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 2rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.newsletter-text h3 { color: #fff; font-size: 1.3rem; }
.newsletter-text p { color: #cdd6df; font-size: .95rem; margin-top: .2rem; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; max-width: 520px; }
.newsletter-form input[type="email"] {
  flex: 1 1 220px; padding: .7rem .9rem; border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius); background: rgba(255,255,255,.95); font-family: var(--font-body); font-size: .95rem;
}
.newsletter-consent { flex: 1 1 100%; display: flex; gap: .5rem; align-items: flex-start; color: #b9c3cd; font-size: .8rem; }
.newsletter-consent input { margin-top: .2rem; }
.newsletter-soon { display: flex; align-items: center; gap: .8rem; color: #cdd6df; }
.newsletter-badge {
  background: var(--thistle); color: #fff; font-family: var(--font-head); font-size: .75rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .35rem .75rem; border-radius: 999px;
}
.newsletter-soon p { font-size: .92rem; font-style: italic; }
@media (max-width: 620px) { .newsletter-inner { flex-direction: column; align-items: flex-start; } }

/* ----------------------- Buttons ---------------------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 500;
  padding: .8rem 1.6rem; border-radius: var(--radius); font-size: .95rem;
  letter-spacing: .04em; transition: transform .15s, background .2s, color .2s; cursor: pointer;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-light { background: #fff; color: var(--green); }
.btn-light:hover { background: var(--cream); color: var(--green); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy); filter: brightness(1.35); color: #fff; }
.btn-custom:hover { filter: brightness(1.08); }

/* ----------------------- Welcome ---------------------- */
.welcome h2 { font-size: 2.3rem; color: var(--green); margin-bottom: 1rem; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }
.note-edit { margin-top: 1.25rem; font-size: .9rem; color: var(--thistle); }

/* --------------------- Card grid ---------------------- */
.card-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.5rem; text-align: center; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { font-size: 2.4rem; display: block; margin-bottom: .6rem; }
.card h3 { color: var(--green); font-size: 1.2rem; margin-bottom: .4rem; }
.card p { color: var(--ink-soft); font-size: .97rem; }
.card-desc ul, .card-desc ol { margin: .3rem auto .4rem; padding-left: 1.2rem; color: var(--ink-soft); font-size: .97rem; text-align: left; display: inline-block; }
.card-desc a { color: var(--green); }

/* ------------------------ Strip ----------------------- */
.strip {
  padding: 3.5rem 1.25rem; text-align: center; color: #fff;
  background: var(--navy);
}
.strip-title { font-size: 2.2rem; }
.strip-dates { color: var(--gold-soft); font-family: var(--font-head); margin: .5rem 0 1.5rem; letter-spacing: .04em; }

/* --------------------- Link cards --------------------- */
.link-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.link-card {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: var(--radius); padding: 1.6rem; color: var(--ink); transition: transform .2s, box-shadow .2s;
}
.link-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.link-card h3 { color: var(--green); margin-bottom: .5rem; }
.link-card p { color: var(--ink-soft); font-size: .97rem; }
.link-arrow { display: inline-block; margin-top: .8rem; color: var(--green); font-family: var(--font-head); font-size: .9rem; }

/* ----------------------- Footer ----------------------- */
.site-footer { background: var(--navy); color: #cdd6df; margin-top: 0; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.25rem 2rem;
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
}
.footer-col h3 { color: #fff; font-size: 1.1rem; margin-bottom: .8rem; }
.footer-meta { font-size: .9rem; opacity: .8; margin-top: .6rem; }
.footer-links { list-style: none; }
.footer-links a, .footer-social a, .footer-col a { color: var(--gold-soft); }
.footer-links a:hover, .footer-social a:hover { color: #fff; }
.footer-links li { margin-bottom: .35rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.2rem; text-align: center; font-size: .85rem; opacity: .85; }
.footer-legal-links { margin-bottom: .4rem; }
.footer-legal-links a { color: var(--gold-soft); }
.footer-legal-links a:hover { color: #fff; }

/* Legal pages */
.legal h3 { font-size: 1.25rem; margin-top: 1.8rem; }
.legal-updated { color: var(--thistle); font-size: .92rem; margin-bottom: 1.5rem; }

/* --------------------- Responsive --------------------- */
/* Was 1024px. The full-size logo (169px) + menu (~770px) + tickets button
   (~161px) + gaps need roughly 1200px, so the menu collapses to ☰ below 1250
   rather than squeezing the logo. */
@media (max-width: 1250px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 1rem 1rem; }
  .site-nav a { padding: .8rem .5rem; border-bottom: 1px solid rgba(255,255,255,.08); white-space: normal; }
  .site-nav a.active { box-shadow: inset 4px 0 0 var(--red); border-radius: 0; }
  .nav-toggle:checked ~ .site-nav { max-height: 460px; }
  /* Tickets stays in the bar (not inside the collapsed menu), with the
     hamburger last: brand … [Buy Tickets] [☰] */
  .header-tickets { order: 2; margin-left: auto; }
  .nav-toggle-label { order: 3; }
}
@media (max-width: 600px) {
  .header-inner { gap: .6rem; }
  .header-tickets .nav-tickets { font-size: .75rem; padding: .45rem .6rem; }
}

/* ============================================================
   INTERIOR PAGES  (About, Schedule, Sponsors, Community, Society)
   ============================================================ */

/* ---------------- Page banner ---------------- */
.page-hero {
  color: #fff; text-align: center; padding: 3.5rem 1.25rem;
  /* Primary red banner (matches the home hero). */
  background:
    linear-gradient(135deg, rgba(164,38,44,.96), rgba(108,20,26,.97)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 24px),
    var(--red-deep);
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-hero p { color: var(--gold-soft); font-style: italic; margin-top: .4rem; }

/* Generic prose block */
.prose p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.prose h3 { color: var(--green); margin: 2rem 0 .8rem; font-size: 1.4rem; }
.prose ul { margin: 0 0 1.1rem 1.3rem; color: var(--ink-soft); }
.prose li { margin-bottom: .4rem; }

/* Editor note callout */
.editor-note {
  background: #faf6ec; border: 1px dashed var(--thistle); border-radius: var(--radius);
  padding: 1rem 1.2rem; color: var(--thistle); font-size: .92rem; margin: 1.5rem 0;
}

/* ---------------- Committee / executive bios ---------------- */
/* One row per member: name / role / bio on the left, photo (if any) on the
   right. Rows are separated by a rule; long bios collapse behind "Read more"
   (js/people.js). */
.bio-list { display: flex; flex-direction: column; }
.bio-row {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 2rem 0; border-bottom: 1px solid var(--line);
}
.bio-row:first-child { padding-top: .5rem; }
.bio-row:last-child { border-bottom: none; padding-bottom: 0; }
.bio-photo { flex: 0 0 auto; }
.bio-photo img {
  width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.bio-body { flex: 1 1 auto; min-width: 0; }
.bio-body h3 { color: var(--green); font-size: 1.45rem; margin-bottom: .15rem; }
@media (min-width: 720px) {
  .bio-row { flex-direction: row; align-items: flex-start; gap: 2.5rem; }
  /* Photo comes first in the DOM (so it tops the stack on mobile) but sits
     on the right on wider screens. */
  .bio-photo { order: 2; width: 280px; max-width: 35%; }
  .bio-body { order: 1; }
}
.bio-role { color: var(--green); font-family: var(--font-head); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .7rem; }
.bio-body p { color: var(--ink-soft); font-size: .95rem; }
.bio-text, .bio-text p { color: var(--ink-soft); font-size: .95rem; }
.bio-text p { margin-bottom: .6rem; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-text ul, .bio-text ol { margin: .4rem 0 .6rem 1.2rem; color: var(--ink-soft); font-size: .95rem; }
.bio-text a { color: var(--green); }
/* Read more / read less on long bios (toggled by js/people.js). */
.bio-text.is-collapsible { position: relative; overflow: hidden; }
.bio-text.is-collapsed { max-height: 170px; }
.bio-text.is-collapsed::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3em;
  /* Fade to the section background: cream by default, white inside .section.alt. */
  background: linear-gradient(to bottom, transparent, var(--cream)); pointer-events: none;
}
.section.alt .bio-text.is-collapsed::after {
  background: linear-gradient(to bottom, transparent, var(--paper));
}
.bio-toggle {
  display: inline-block; margin-top: .5rem; padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--green); font-family: var(--font-head); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em;
}
.bio-toggle:hover { text-decoration: underline; }

/* ---------------- Schedule ---------------- */
.day-block { margin-bottom: 2.5rem; }
.day-head {
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  border-bottom: 2px solid var(--red); padding-bottom: .5rem; margin-bottom: 1rem;
}
.day-head h3 { color: var(--green); font-size: 1.5rem; }
.day-head .day-date { color: var(--thistle); font-style: italic; }
.sched-row { display: flex; gap: 1.2rem; padding: 1rem 0; }
.sched-time { flex: 0 0 190px; font-family: var(--font-head); color: var(--navy); font-size: .92rem; }
.sched-date { display: block; font-size: .82rem; color: var(--ink-soft); line-height: 1.35; }
.sched-clock { display: block; }
/* Rule between events on the same day — never after the last one. */
.sched-sep { border: 0; border-top: 1px solid var(--line); margin: .25rem 0; }
.sched-event { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; justify-content: space-between; }
.sched-text { flex: 1 1 0; min-width: 0; text-align: left; }
.sched-event h4 { color: var(--ink); font-family: var(--font-body); font-weight: 600; }
.sched-event p { color: var(--ink-soft); font-size: .9rem; }
.sched-loc { color: var(--green); font-family: var(--font-head); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; margin: .15rem 0 .1rem; }
.sched-desc { margin-top: .2rem; }
.sched-desc p { color: var(--ink-soft); font-size: .9rem; margin-bottom: .4rem; }
.sched-desc p:last-child { margin-bottom: 0; }
.sched-desc ul, .sched-desc ol { margin: .3rem 0 .4rem 1.2rem; color: var(--ink-soft); font-size: .9rem; }
.sched-desc a { color: var(--green); }
/* The event's main photo — constrained by width only, so it keeps whatever
   shape it was uploaded (or cropped) in; the height follows naturally. */
.sched-photo { flex: 0 0 38%; width: 38%; max-width: 38%; height: auto;
  border-radius: var(--radius); }
/* Additional event photos: full-width row beneath the event, up to 5 across,
   each capped at the main photo's size. */
/* Image + text blocks: full width, image left / text right, stacked. */
.sched-blocks { flex: 0 0 100%; display: flex; flex-direction: column; gap: 1rem; }
.sched-block { display: flex; gap: 1.2rem; align-items: flex-start; }   /* photo aligned to the top of its text */
/* Short divider between stacked photo+text rows — never after the last one. */
.sched-block-sep { border: 0; border-top: 1px solid var(--line); width: 40%; max-width: 260px; margin: .1rem auto; }
/* Same footprint as the additional photos below, so the two rows line up.
   Cropped to 4:3 on save; aspect-ratio keeps older uncropped images in line. */
.sched-block-img { flex: 0 0 calc(20% - .5rem); width: calc(20% - .5rem); max-width: 180px;
  aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.sched-block-text { flex: 1 1 0; min-width: 0; text-align: left; }
.sched-block-text p { color: var(--ink-soft); font-size: .9rem; margin-bottom: .4rem; }
.sched-block-text p:last-child { margin-bottom: 0; }
.sched-block-text ul, .sched-block-text ol { margin: .3rem 0 .4rem 1.2rem; color: var(--ink-soft); font-size: .9rem; }
.sched-block-text a { color: var(--green); }
.sched-extra { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: .6rem; }
.sched-extra-photo { flex: 0 0 auto; width: calc(20% - .5rem); max-width: 180px;
  aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
/* A bottom photo that links to a PDF: the link takes the photo's slot. */
.sched-extra-link { flex: 0 0 auto; width: calc(20% - .5rem); max-width: 180px;
  display: block; line-height: 0; border-radius: var(--radius); transition: opacity .15s, box-shadow .15s; }
.sched-extra-link .sched-extra-photo { width: 100%; max-width: 100%; }
.sched-extra-link:hover { opacity: .9; box-shadow: 0 0 0 3px var(--red); }
.sched-extra-link:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
/* A PDF with no photo: a document tile the same size as the photos beside it. */
.sched-pdf-tile { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .3rem; text-align: center; line-height: 1.2; padding: .5rem;
  background: var(--paper); border: 1px solid var(--line); color: var(--green); }
.sched-pdf-tile:hover { color: var(--green-deep); }
.sched-pdf-icon { font-size: 1.6rem; line-height: 1; }
.sched-pdf-name { font-size: .72rem; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* All-day group sits at the top of a day, visually distinct */
.allday-group { background: #faf6ec; border-left: 3px solid var(--red); border-radius: var(--radius); padding: 0 1rem; margin-bottom: .5rem; }
.allday-row .sched-time { color: var(--thistle); font-style: italic; }

/* ---------------- Gallery ---------------- */
.gallery-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); }
.gallery-item {
  aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6);
  font-family: var(--font-head); font-size: .85rem; text-align: center; padding: .5rem;
}
.gallery-item { position: relative; margin: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(21,38,59,.82), rgba(21,38,59,0));
  color: #fff; font-size: .8rem; font-family: var(--font-body); text-align: left;
  padding: 1.2rem .6rem .5rem;
}
.gallery-item { cursor: pointer; }
.gallery-item img { transition: transform .25s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,18,28,.93); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
/* The image shows at its natural size, only shrinking to fit the screen — never enlarged. */
.lb-stage { display: flex; align-items: center; justify-content: center; }
.lb-img { max-width: 92vw; max-height: 78vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 10px 50px rgba(0,0,0,.55); }
.lb-caption { color: #fff; margin-top: .9rem; font-size: .95rem; text-align: center; max-width: 80vw; }
.lb-counter { color: rgba(255,255,255,.6); font-family: var(--font-head); font-size: .8rem; margin-top: .4rem; }
.lb-close, .lb-prev, .lb-next { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none;
  cursor: pointer; border-radius: 50%; width: 50px; height: 50px; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) {
  .lb-img { max-width: 94vw; max-height: 70vh; }
  .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 1.2rem; }
  .lb-prev { left: .5rem; } .lb-next { right: .5rem; } .lb-close { top: .6rem; right: .6rem; }
}

/* ---------------- Forms / downloads ---------------- */
.form-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.form-card {
  display: flex; align-items: center; gap: 1rem; background: var(--paper);
  border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.form-card .form-icon { font-size: 1.8rem; }
.form-card h4 { color: var(--green); font-family: var(--font-body); }
.form-card p { font-size: .88rem; color: var(--ink-soft); }

/* ---------------- Contact form fields ---------------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-family: var(--font-head); font-size: .85rem; color: var(--navy); margin-bottom: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem; background: #fff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }

/* Honeypot — kept off-screen; real visitors never see or fill it */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Form success / error banners */
.form-banner { padding: .85rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-size: .95rem; }
.form-banner.ok  { background: #e3f3e8; border: 1px solid #acd6bb; color: #2f7d4f; }
.form-banner.bad { background: #fbe6e4; border: 1px solid #e3a9a4; color: #a8322b; }

/* Contact forms (sponsor / membership) */
.contact-form { text-align: left; }
.contact-form .form-grid { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .contact-form .form-grid { grid-template-columns: 1fr; } }

/* ---------------- Sponsor tiers ---------------- */
.tier { margin-bottom: 2.5rem; }
.tier-title { text-align: center; color: var(--green); margin-bottom: 1.2rem; position: relative; }
.tier-title span { background: var(--cream); padding: 0 1rem; position: relative; z-index: 1; }
.tier-title::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.section.alt .tier-title span { background: var(--paper); }
.sponsor-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); }
.sponsor-logo {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  aspect-ratio: 3/2; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-family: var(--font-head); font-size: .9rem; text-align: center; padding: 1rem;
  text-decoration: none; transition: box-shadow .2s, transform .2s;
}
a.sponsor-logo:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--green); }
.sponsor-logo img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }

/* Feature cards (Presenting & Gold tiers) */
.sponsor-feature-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sponsor-card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red);
  border-radius: var(--radius); padding: 1.6rem; text-align: center; text-decoration: none;
  color: var(--ink); display: flex; flex-direction: column; align-items: center;
  transition: transform .2s, box-shadow .2s;
}
a.sponsor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.sponsor-card-logo { height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.sponsor-card-logo img { max-height: 90px; max-width: 100%; object-fit: contain; }
.sponsor-card-noname { font-family: var(--font-head); color: var(--green); font-size: 1.1rem; }
.sponsor-card h4 { color: var(--green); font-size: 1.2rem; margin-bottom: .4rem; }
.sponsor-card p { color: var(--ink-soft); font-size: .95rem; }
.sponsor-desc ul, .sponsor-desc ol { margin: .3rem 0 .4rem; padding-left: 1.2rem; color: var(--ink-soft); font-size: .95rem; text-align: left; }
.sponsor-desc a { color: var(--green); }
.sponsor-cta { background: #faf6ec; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; text-align: center; }

/* ---------------- FAQ (no-JS accordion) ---------------- */
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: .8rem; padding: 0 1.2rem;
}
.faq summary {
  cursor: pointer; padding: 1rem 0; font-family: var(--font-head); color: var(--green);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 1.4rem; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-answer { padding: 1rem 0; color: var(--ink-soft); }

/* ---------------- Info / membership two-col ---------------- */
.two-col { display: grid; gap: 2.5rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
.info-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.info-box h3 { color: var(--green); margin-bottom: .8rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .sched-row { flex-direction: column; gap: .2rem; } .sched-time { flex: none; } .sched-event { flex-direction: column; gap: .6rem; } .sched-photo { width: 100%; max-width: 100%; margin-top: .3rem; } .sched-extra { flex: 0 0 auto; width: 100%; } .sched-extra-photo { width: calc(33.333% - .4rem); max-width: none; }
  .sched-extra-link { width: calc(33.333% - .4rem); max-width: none; }
  .sched-extra-link .sched-extra-photo { width: 100%; }
  /* Inline images stay beside their text on mobile — they're small enough. */
  .sched-blocks { flex: 0 0 auto; width: 100%; } .sched-block { gap: .8rem; }
  .sched-block-img { flex: 0 0 33%; width: 33%; max-width: 33%; } }

/* ============================================================
   SPONSORS PAGE — admin-built content blocks
   Text, image and two-column sponsor-list blocks arranged in the
   admin (admin/sponsors.php) and rendered by sponsors.php.
   ============================================================ */
.sb-text,
.sb-list-blurb { max-width: 760px; margin-left: auto; margin-right: auto; }
.sb-text { margin-bottom: 2.5rem; }
.sb-text:last-child,
.sb-listblock:last-child,
.sb-image:last-child { margin-bottom: 0; }

/* Image block — centred, with selectable size. */
.sb-image { margin: 0 auto 2.5rem; text-align: center; }
.sb-image img {
  max-width: 100%; height: auto; border-radius: var(--radius, 6px);
  box-shadow: var(--shadow, 0 6px 22px rgba(0,0,0,.10));
}
.sb-image-full   { max-width: 100%; }
.sb-image-medium { max-width: 620px; }
.sb-image-small  { max-width: 380px; }
.sb-image figcaption {
  margin-top: .7rem; font-size: .9rem; color: var(--ink-soft); font-style: italic;
}

/* Sponsor / partner / patron list — heading, optional blurb, two columns. */
.sb-listblock { margin: 0 auto 2.75rem; max-width: 900px; }
.sb-list-blurb { text-align: center; margin-bottom: 1.4rem; }
.sb-list-blurb p { color: var(--ink-soft); }
.sb-name-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 760px;
  columns: 2; column-gap: 3rem;
}
.sb-name-list li {
  break-inside: avoid; padding: .5rem 0; text-align: center;
  color: var(--ink); border-bottom: 1px solid var(--line);
}
@media (max-width: 620px) {
  .sb-name-list { columns: 1; }
  .sb-name-list li { text-align: left; }
}

/* ============================================================
   SCHEDULE — rack card "Program at a Glance"
   Hidden behind a "View the Program Card" button; revealed on
   click as one compact card that flips front<->back (image swap)
   with an "Open full size" link. Keeps the page clean on mobile.
   ============================================================ */
.rackcard-section { border-bottom: 1px solid var(--line); }
/* Program-card button sits under the schedule heading; space it from the events. */
.rackcard-wrap { text-align: center; margin: 0 auto 2.75rem; }
.rackcard-viewer { max-width: 300px; margin: 0 auto; }
.rackcard-img {
  width: 100%; height: auto; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.rackcard-controls {
  margin-top: .9rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
}

/* ============================================================
   SCHEDULE — "The Pipes, the Pipes Are Calling" pipe-bands showcase
   Intro + photo/bio cards for each band and solo performer.
   ============================================================ */
.pipebands-intro { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; color: var(--ink-soft); }
.pipebands-sub { text-align: center; color: var(--green); font-size: 1.5rem; margin: 2.2rem 0 1.4rem; }
.band-card { display: flex; gap: 1.3rem; align-items: flex-start; max-width: 780px; margin: 0 auto 1.8rem; }
.band-card img {
  flex: 0 0 200px; width: 200px; height: auto;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.band-card-body { flex: 1 1 0; min-width: 0; }
.band-card-body h4 { color: var(--green); font-size: 1.15rem; margin-bottom: .15rem; }
.band-card-body .band-loc { color: var(--ink-soft); font-style: italic; font-size: .88rem; margin-bottom: .5rem; }
.band-card-body p { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 620px) {
  .band-card { flex-direction: column; align-items: center; text-align: center; }
  .band-card img { width: 100%; max-width: 280px; flex-basis: auto; }
}

/* ---------- Gallery pagination ---------- */
.gallery-pager {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .4rem; margin-top: 2rem;
}
.gallery-page-btn {
  min-width: 2.4rem; padding: .45rem .7rem; cursor: pointer;
  font-family: var(--font-body); font-size: .95rem; color: var(--green);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.gallery-page-btn:hover:not(:disabled) { background: var(--cream); border-color: var(--green); }
.gallery-page-btn.is-active { background: var(--green); color: #fff; border-color: var(--green); cursor: default; }
.gallery-page-btn:disabled { opacity: .4; cursor: default; }
.gallery-page-ellipsis { padding: 0 .2rem; color: var(--ink-soft); }

/* Registration & Forms cards that link somewhere get a hover lift. */
a.form-card { color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.form-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-left-color: var(--red); color: inherit; }
a.form-card:hover h4 { color: var(--green-deep); }
