/* Stichting Feestcomité Eemnes, base styles (mobile-first) */

:root {
  /* Merk: wit, blauw, oranje, zwart; Oranje/Feestcomité Eemnes (zie ook .cursor/rules/brand-feestcomite.mdc) */
  --color-bg: #fffaf5;
  --color-text: #1a1a1a;
  --color-white: #ffffff;
  --color-black: #1a1a1a;
  --color-orange: #e85d04;
  --color-orange-dark: #c24a00;
  --color-brand-blue: #123b73;
  --color-brand-blue-dark: #0c284d;
  --color-border: #e8ddd4;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --shadow-header: 0 2px 14px rgba(0, 0, 0, 0.18);
  --focus-ring: 2px solid var(--color-orange);
  --header-height: 3.5rem;
  --max-width: 42rem;
  --max-width-wide: 56rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* Light theme only: voorkomt dat dark-mode browsers kleuren (o.a. headerblauw) automatisch donkerder trekken. */
  color-scheme: light;
  scroll-behavior: smooth;
  /* Voorkomt horizontale “sprong” van header bij paginawissel als de ene pagina wel/niet een verticale scrollbar heeft. */
  scrollbar-gutter: stable;
  /* Zelfde als body: voorkomt witte rand onder de footer (browser-default op html). */
  background: var(--color-bg);
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  /* Full-bleed .hero gebruikt 100vw; zonder dit kan op sommige pagina’s een horizontale scrollbar verschijnen → weer layoutverschuiving. */
  overflow-x: hidden;
}

#site-shell-header {
  flex-shrink: 0;
}

#site-shell-footer {
  flex-shrink: 0;
}

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

a {
  color: var(--color-orange-dark);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-orange);
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: #fff;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/*
 * Site shell: while `site-shell.js` fetches partials, the main column can paint first.
 * Busy placeholders reserve space and match header/footer colours so the layout does not “jump in” from a blank strip.
 */
#site-shell-header[aria-busy="true"] {
  display: block;
  width: 100%;
  min-height: var(--header-height);
  background: var(--color-brand-blue);
  box-shadow: var(--shadow-header);
  position: sticky;
  top: 0;
  z-index: 50;
}

#site-shell-footer[aria-busy="true"] {
  display: block;
  width: 100%;
  min-height: 10rem;
  margin-top: 2rem;
  background: var(--color-brand-blue-dark);
}

/*
 * With JS: hide main + footer slot until site-shell.js has injected partials (see html.js + .site-shell-ready).
 * Without JS: no html.js, so these rules never apply and content stays visible.
 */
html.js body:not(.site-shell-ready) #main {
  opacity: 0;
  pointer-events: none;
}

html.js body:not(.site-shell-ready) #site-shell-footer {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-brand-blue);
  color: var(--color-white);
  box-shadow: var(--shadow-header);
}

.site-header :focus-visible {
  outline-color: var(--color-white);
}

.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  /* Smalle viewport: logo rechts, hamburger links */
  margin-left: auto;
  line-height: 0;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand:hover img {
  opacity: 0.92;
}

/* PNG-logo (RGBA) uit WordPress-export; portrait: begrens hoogte, breedte volgt. */
.brand img {
  display: block;
  height: auto;
  max-height: 3rem;
  width: auto;
  max-width: min(2.85rem, 22vw);
  object-fit: contain;
}

.nav-toggle {
  order: -1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  color: var(--color-white);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-toggle-bar {
  position: relative;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  width: 100%;
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.site-nav.is-open {
  max-height: 40rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.25rem;
  color: var(--color-white);
  text-decoration: none;
  border-radius: 4px;
  /* Zelfde gewicht als actieve link: vet verschuift tekstbreedte en daarmee de hele header op smalle/brede viewports. */
  font-weight: 600;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
}

.site-nav a[aria-current="page"] {
  color: #ffcf99;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.12);
  /* Lichte “nadruk” zonder bredere glyphs dan bij andere items */
  box-shadow: inset 0 -2px 0 0 rgba(255, 207, 153, 0.85);
}

/* Logo-link bovenaan het mobiele menu (na .site-nav a zodat padding/gewicht niet worden overschreven). */
.site-nav > a.site-nav-brand {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.75rem 0.25rem 0.35rem;
  margin: 0;
  max-width: none;
  width: 100%;
  line-height: 0;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 400;
}

.site-nav > a.site-nav-brand:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
}

.site-nav > a.site-nav-brand img {
  display: block;
  height: auto;
  max-height: 4.25rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .brand {
    margin-left: 0;
    margin-right: 0;
  }

  .site-nav > a.site-nav-brand {
    display: none;
  }

  .header-inner {
    flex-wrap: nowrap;
    /* Logo + menu als één blok centreren; geen flex:1 op nav (dat duwde de links naar rechts en maakte een grote lege tussenruimte). */
    justify-content: center;
    gap: 1rem 1.25rem;
  }

  .site-nav {
    width: auto;
    flex: 0 0 auto;
    flex-basis: auto;
    max-height: none !important;
    overflow: visible;
  }

  .site-nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 0.15rem 0.75rem;
  }

  .site-nav a {
    padding: 0.35rem 0.5rem;
    font-size: 0.95rem;
  }
}

/* Iets compactere menuknoppen op smalle desktop/tablet landscape zodat alles op één regel blijft. */
@media (min-width: 768px) and (max-width: 959px) {
  .site-nav ul {
    gap: 0.1rem 0.45rem;
  }

  .site-nav a {
    padding: 0.35rem 0.35rem;
    font-size: 0.875rem;
  }
}

main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.hero {
  margin: -1.5rem -1rem 1.5rem;
  width: calc(100% + 2rem);
  max-width: none;
}

.hero img {
  width: 100%;
  max-height: min(52vh, 520px);
  object-fit: cover;
}

/*
 * Homepage: volledige collage + logo zichtbaar, niet bijsnijden om breedte te vullen.
 * Op smalle schermen schaalt mee (max 100% breed); op brede schermen blijft verhouding, eventueel marge links/rechts.
 */
.hero--home {
  display: flex;
  justify-content: center;
  background: var(--color-bg);
}

.hero--home img {
  width: auto;
  /* 25% kleiner dan volle breedte, rustige whitespace links en rechts */
  max-width: 75%;
  height: auto;
  max-height: none;
  min-height: unset;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
  }
}

h1 {
  font-size: clamp(1.65rem, 4vw, 2rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

h2:first-child {
  margin-top: 0;
}

.prose {
  max-width: var(--max-width);
}

.prose p {
  margin: 0 0 1rem;
}

.prose .lead {
  font-size: 1.1rem;
}

/* Feestweek: titel als FEESTWEEK (hoofdletters, leesbare spacing) */
.page-feestweek .prose > h1.page-title-caps {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
}

/* Koningsdag, feestkrant: iframe op breed scherm; op smal scherm link naar nieuw tabblad (PDF in iframe scrollt vaak niet op mobiel). */
.feestkrant-pdf-wrapper--embed {
  display: none;
}

.feestkrant-pdf-mobile {
  display: block;
  margin: 1rem 0 1rem;
}

.prose .feestkrant-pdf-mobile__hint {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #444;
}

.feestkrant-actions--mobile {
  margin: 0 0 0.75rem;
}

@media (min-width: 768px) {
  .feestkrant-pdf-wrapper--embed {
    display: block;
    margin: 1rem 0 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: #e8e8e8;
  }

  .feestkrant-pdf-mobile {
    display: none;
  }
}

.feestkrant-pdf-wrapper--embed .feestkrant-pdf-frame {
  display: block;
  width: 100%;
  /* Hoog genoeg om comfortabel te scrollen binnen de pagina; browser toont eigen PDF-scrollbalk */
  height: min(75vh, 900px);
  min-height: 50vh;
  border: 0;
}

.feestkrant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
  align-items: center;
}

/* Teamfoto bij “Foto feestcomité 2026”, licht afgeronde hoeken, breed panorama */
.wie-team-photo {
  margin: 0 0 1.35rem;
}

.wie-team-photo img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.team-block {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.team-block h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.team-names {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}

.btn {
  display: inline-block;
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 6px;
  background: var(--color-orange);
  color: #fff !important;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-orange-dark);
  color: #fff !important;
}

.btn-secondary {
  background: #fff;
  color: var(--color-orange-dark) !important;
  border: 2px solid var(--color-orange);
}

.btn-secondary:hover {
  background: rgba(232, 93, 4, 0.1);
}

.album-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 520px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .album-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.album-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  color: #fff !important;
  background: linear-gradient(135deg, var(--color-orange) 0%, #d9480f 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.album-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  color: #fff !important;
}

.album-card__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  flex-shrink: 0;
}

.album-card__title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  padding: 1rem 1.25rem 0;
}

.album-card__cta {
  display: block;
  margin-top: auto;
  padding: 0.75rem 1.25rem 1.25rem;
  font-weight: 500;
  opacity: 0.95;
  font-size: 0.85rem;
}

.prose .album-fb-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

.prose .album-fb-hint {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #444;
}

.prose .album-fb-error {
  margin: 1rem 0 0;
  padding: 1rem;
  border-radius: 8px;
  background: #fff3e6;
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  color: #333;
}

.prose .album-fb-error a {
  color: var(--color-orange-dark);
  font-weight: 600;
}

.site-footer {
  margin-top: 2rem;
  padding: 2rem 1rem;
  background: var(--color-brand-blue-dark);
  color: #f0f4fa;
  font-size: 0.95rem;
}

.site-footer a {
  color: #ffcc99;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer .footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  color: #f0f4fa;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.site-footer .footer-social-link:hover,
.site-footer .footer-social-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.site-footer .footer-social-icon {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.site-footer h2 {
  color: #fff;
  font-size: 1.1rem;
  margin-top: 0;
}

.footer-social {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-meta {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  opacity: 0.9;
  text-align: center;
}
