
:root {
  --paper: #f5f1e7;
  --ink: #0b0b09;
  --red: #a91518;
  --yellow: #f5c400;
  --gold: #d9ad27;
  --max: 1536px;
}

/* HARD TYPOGRAPHY CONSTRAINTS:
   H1 56px Bold
   H2 36px Bold
   Body 18px Regular
   Navigation / button / kicker / label 14px Bold uppercase
*/
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
}
h1, h2, p, blockquote { margin-top: 0; }
h1 {
  font-size: 56px;
  line-height: 1.08;
  font-weight: 700;
  margin-bottom: 28px;
}
h2 {
  font-size: 36px;
  line-height: 1.14;
  font-weight: 700;
  margin-bottom: 26px;
}
p, blockquote {
  font-size: 18px;
  font-weight: 400;
}
strong { font-weight: 700; }
a { color: inherit; }
button, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 88px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 42px;
  display: flex;
  align-items: center;
  gap: 34px;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(11,11,9,.10);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand span,
.nav a,
.btn,
.kicker,
.text-link,
.footer-links a,
label {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.nav { display: flex; gap: 32px; }
.nav a, .footer-links a { text-decoration: none; }
.btn {
  border: 1px solid var(--ink);
  padding: 15px 22px;
  cursor: pointer;
  background: transparent;
}
.btn-primary, .btn-donate {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}
.viewport {
  min-height: calc(100vh - 88px);
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(480px, 46%) 1fr;
  overflow: hidden;
}
.copy {
  padding: clamp(64px, 7vw, 110px) clamp(44px, 6vw, 96px);
  align-self: center;
}
.visual {
  min-height: 620px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.hero-visual { background-image: url("assets/hero-real.jpg"); background-position: 55% center; }
.library-visual { background-image: url("assets/library-real.jpg"); background-position: center; background-size: contain; background-color:#191715; }
.museum-visual { background-image: url("assets/collection-real.jpg"); background-position: center; background-size: contain; background-color:#080806; }
.programs-visual { background-image: url("assets/programs-real.jpg"); background-position: center; }
.results-visual { background-image: url("assets/results-real.jpg"); background-position: center; background-size: contain; background-color: var(--paper); }

.hero .copy, .light .copy, .results .copy { background: var(--paper); }
.dark { background: #080806; color: #f6f1e6; }
.dark .copy { background: #080806; }

.accent { color: var(--red); }
.rule {
  width: 88px;
  height: 2px;
  background: var(--red);
  margin: 28px 0 34px;
}
.note {
  border-left: 2px solid var(--red);
  padding-left: 14px;
  margin-top: 34px;
  max-width: 540px;
}
.kicker { color: var(--red); margin-bottom: 26px; }
.text-link {
  display: inline-block;
  color: var(--red);
  margin-top: 22px;
  text-decoration: none;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
}
.text-link.gold { color: var(--gold); }
.followup { margin-top: -6px; }

.results {
  grid-template-columns: 39% 61%;
  min-height: 760px;
}
.results-visual { min-height: 760px; }

.closing {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 7vw;
  text-align: center;
  border-top: 1px solid rgba(11,11,9,.15);
}
.closing blockquote {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 22px;
}
.closing .btn { margin-top: 22px; }

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 42px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-top: 1px solid rgba(11,11,9,.15);
}
.footer-brand { margin-right: auto; }
.footer-brand img { width: 44px; height: 44px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

.donation-dialog {
  width: min(92vw, 620px);
  border: 0;
  padding: 0;
  background: transparent;
}
.donation-dialog::backdrop { background: rgba(0,0,0,.62); }
.donation-card {
  background: var(--paper);
  padding: 34px;
  border: 1px solid rgba(11,11,9,.22);
  position: relative;
}
.dialog-close {
  position: absolute;
  right: 18px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 34px;
  cursor: pointer;
}
.donation-card label {
  display: block;
  margin: 18px 0 10px;
}
.donation-card select {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(11,11,9,.3);
  background: white;
  font-size: 18px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.amount, .frequency-btn {
  border: 1px solid var(--ink);
  background: transparent;
  padding: 12px 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.amount.active, .frequency-btn.active { background: var(--yellow); }
.frequency { display: flex; gap: 8px; margin-bottom: 18px; }
.dialog-help { font-size: 18px; }
.full { width: 100%; }

@media (max-width: 900px) {
  .site-header {
    height: auto;
    padding: 14px 18px;
    flex-wrap: wrap;
  }
  .brand span { max-width: 190px; }
  .nav { display: none; }
  .btn-donate { margin-left: auto; }
  .viewport {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .copy { padding: 56px 26px; }
  .visual { min-height: 56vw; }
  .results { grid-template-columns: 1fr; }
  .results-visual { min-height: 72vw; }
  .footer { padding: 28px 20px; align-items: flex-start; flex-direction: column; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  h1 { font-size: 56px; } /* fixed by agreed system */
  h2 { font-size: 36px; } /* fixed by agreed system */
  body, p, blockquote, .dialog-help { font-size: 18px; }
  .brand span, .btn, .kicker, .text-link, .footer-links a, label { font-size: 14px; }
  .site-header .brand span { display: none; }
  .brand img { width: 46px; height: 46px; }
  .copy { padding: 48px 22px; }
  .visual { min-height: 72vw; }
}


/* v2.7 — original approved visual grammar, applied to the real photos.
   IMPORTANT: no typography, copy spacing, grid proportions, section heights,
   or DOM layout are changed here. Only photographic treatment. */

/* 1) HERO — the original worked because the photograph entered as one bold,
      clean diagonal field. No fade, no card frame. */
.hero-visual {
  background-size: cover !important;
  background-position: 54% 50% !important;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
  -webkit-clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
}

/* 2) LIBRARY — the approved design was not a boxed photo. It was a broad,
      quiet photographic field whose pale side visually belonged to the paper.
      Use a very wide alpha feather, not a visible color overlay. */
.library-visual {
  background-size: cover !important;
  background-position: 58% 50% !important;
  background-color: var(--paper) !important;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 8%, rgba(0,0,0,.72) 22%, #000 38%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 8%, rgba(0,0,0,.72) 22%, #000 38%);
}

/* 3) MYSTERY — the original museum section succeeded because it was a single
      dark visual world: copy and object lived on the same black field. */
.dark {
  position: relative;
}
.museum-visual {
  background-size: cover !important;
  background-position: 54% 50% !important;
  background-color: #080806 !important;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.30) 12%, #000 32%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.30) 12%, #000 32%);
}

/* 4) PROGRAMS — the original had the photograph as atmosphere, not a card:
      a broad scene that arrives gently from the text side. */
.programs-visual {
  background-size: cover !important;
  background-position: 54% 48% !important;
  background-color: var(--paper) !important;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 8%, rgba(0,0,0,.75) 24%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 8%, rgba(0,0,0,.75) 24%, #000 40%);
}

/* 5) RESULTS already followed the approved editorial-collage language.
      Leave its v2 treatment alone. */

.hero-visual::after,
.library-visual::after,
.museum-visual::after,
.programs-visual::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 900px) {
  /* On mobile, keep the same grammar but avoid losing too much image area. */
  .hero-visual {
    clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%);
  }
  .library-visual,
  .museum-visual,
  .programs-visual {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.50) 10%, #000 24%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.50) 10%, #000 24%);
  }
}

/* v2.8: final user-composed images — never crop/recompose in CSS */
.hero-visual,.library-visual,.museum-visual,.programs-visual{
 background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important;
 clip-path:none!important;-webkit-clip-path:none!important;-webkit-mask-image:none!important;mask-image:none!important;
}
.hero-visual,.library-visual,.programs-visual{background-color:#F6F1E6!important;}
.museum-visual{background-color:#080806!important;}
@media(max-width:900px){
 .hero-visual,.library-visual,.museum-visual,.programs-visual{
  background-size:contain!important;background-position:center!important;
  clip-path:none!important;-webkit-clip-path:none!important;-webkit-mask-image:none!important;mask-image:none!important;
 }
}


/* =========================================================
   v3.1 — MOCKUP LOCK
   A felhasználó látványtervének arányai.
   NINCS full-viewport section. NINCS negatív margin.
   A képek kompozíciója érintetlen.
   ========================================================= */

:root {
  --paper: #F6F1E6;
}

body {
  background: var(--paper);
}

/* The screenshot is content-driven, not 1 viewport = 1 forced height. */
.viewport {
  min-height: 0 !important;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%) !important;
  align-items: center;
  overflow: visible !important;
}

/* The visual column shows the user's baked 2000×1400 composition as-is. */
.visual,
.hero-visual,
.library-visual,
.museum-visual,
.programs-visual {
  min-height: 0 !important;
  width: 100% !important;
  aspect-ratio: 10 / 7;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

/* Exact rhythm from the supplied mockup: each section owns only the space it needs. */
.hero .copy {
  padding-top: 76px !important;
  padding-bottom: 34px !important;
}

#konyvtar .copy {
  padding-top: 30px !important;
  padding-bottom: 58px !important;
}

#gyujtemeny .copy {
  padding-top: 62px !important;
  padding-bottom: 62px !important;
}

#programok .copy {
  padding-top: 58px !important;
  padding-bottom: 52px !important;
}

#eredmenyek .copy {
  padding-top: 46px !important;
  padding-bottom: 46px !important;
}

/* Keep the image columns aligned with the copy, without enlarging them. */
.hero .visual { margin-top: 22px; margin-bottom: 12px; }
#konyvtar .visual { margin-top: 16px; margin-bottom: 24px; }
#gyujtemeny .visual { margin-top: 52px; margin-bottom: 52px; }
#programok .visual { margin-top: 48px; margin-bottom: 44px; }

/* Results is a compact editorial row in the mockup, not a tall viewport. */
.results {
  grid-template-columns: minmax(0, 55%) minmax(0, 45%) !important;
  min-height: 0 !important;
}
.results-visual {
  min-height: 0 !important;
  aspect-ratio: 10 / 7;
  margin-top: 34px;
  margin-bottom: 34px;
  background-size: contain !important;
}

/* All section actions are donation CTAs now. */
.section-cta {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
}

/* Dark section keeps the same yellow donation action for instant giving. */
.dark .section-cta {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

/* Quiet ending, visually close to Results like the mockup. */
.closing {
  padding-top: 54px !important;
  padding-bottom: 54px !important;
}

/* Avoid any old experimental spacing overrides. */
#konyvtar,
#eredmenyek,
.closing {
  margin-top: 0 !important;
}

/* Header donation remains permanently available. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Desktop: slightly tighter copy width so the 55/45 balance is felt, not just mathematical. */
@media (min-width: 901px) {
  .copy {
    padding-left: clamp(46px, 5.5vw, 84px) !important;
    padding-right: clamp(38px, 4.6vw, 70px) !important;
  }

  .hero .copy { padding-top: 76px !important; padding-bottom: 34px !important; }
  #konyvtar .copy { padding-top: 30px !important; padding-bottom: 58px !important; }
  #gyujtemeny .copy { padding-top: 62px !important; padding-bottom: 62px !important; }
  #programok .copy { padding-top: 58px !important; padding-bottom: 52px !important; }
  #eredmenyek .copy { padding-top: 46px !important; padding-bottom: 46px !important; }
}

/* Mobile: stack naturally; CTA remains in the header and inside every section. */
@media (max-width: 900px) {
  .viewport,
  .results {
    grid-template-columns: 1fr !important;
  }

  .copy,
  .hero .copy,
  #konyvtar .copy,
  #gyujtemeny .copy,
  #programok .copy,
  #eredmenyek .copy {
    padding: 46px 24px 30px !important;
  }

  .visual,
  .hero-visual,
  .library-visual,
  .museum-visual,
  .programs-visual,
  .results-visual {
    width: 100% !important;
    aspect-ratio: 10 / 7;
    margin: 0 0 30px !important;
  }

  #gyujtemeny .visual {
    margin-bottom: 38px !important;
  }
}


/* v3.2 — mobile navigation.
   Donation CTA remains separately visible; hamburger controls navigation only. */
.mobile-menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  .site-header .header-inner {
    position: relative;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
    padding: 9px;
    margin-left: auto;
    border: 0;
    background: transparent;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform .18s ease, opacity .18s ease;
  }

  .mobile-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  #main-nav.nav {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 18px 24px 22px;
    background: var(--paper);
    border-top: 1px solid rgba(20,18,15,.12);
    border-bottom: 1px solid rgba(20,18,15,.12);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }

  #main-nav.nav.is-open {
    display: flex !important;
  }

  #main-nav.nav a {
    width: 100%;
    padding: 12px 0;
  }

  /* Keep the always-visible donation action outside the hamburger. */
  .site-header .btn,
  .site-header [data-donate] {
    flex: 0 0 auto;
  }
}


/* v3.3 — mobile header: hamburger | logo | CTA in one clean row */
@media (max-width: 900px) {
  .site-header .header-inner {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 62px;
    padding: 8px 14px !important;
  }

  .mobile-menu-toggle {
    grid-column: 1;
    grid-row: 1;
    margin: 0 !important;
    justify-self: start;
  }

  .site-header .brand {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    justify-self: start;
    display: flex;
    align-items: center;
  }

  .site-header .brand img {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px;
  }

  .site-header .brand-text {
    font-size: 10px !important;
    line-height: 1.15 !important;
    white-space: nowrap;
  }

  /* Header donation button stays compact but fully visible. */
  .site-header .header-inner > .btn,
  .site-header .header-inner > [data-donate] {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin: 0 !important;
    padding: 11px 12px !important;
    white-space: nowrap;
    font-size: 11px !important;
  }

  #main-nav.nav {
    top: 100%;
  }
}

/* Very narrow phones: preserve one row by hiding only the long organization name,
   never the logo, menu or donation CTA. */
@media (max-width: 430px) {
  .site-header .brand-text {
    display: none !important;
  }

  .site-header .header-inner {
    grid-template-columns: 42px 40px minmax(0, 1fr) !important;
  }
}


/* v3.4 — mobile header EXACTLY from supplied reference:
   [ hamburger ] [ flower logo ] [ ÉLETBEN TARTOM ]
   No organization-name text on mobile. */
@media (max-width: 900px) {
  .site-header .header-inner {
    display: grid !important;
    grid-template-columns: 46px 54px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 16px !important;
    width: 100% !important;
    min-height: 78px !important;
    padding: 10px 18px !important;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 46px !important;
    height: 46px !important;
    padding: 10px 7px !important;
    margin: 0 !important;
    justify-self: start !important;
  }

  .mobile-menu-toggle span {
    width: 28px !important;
    height: 2px !important;
  }

  .site-header .brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 54px !important;
    min-width: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-self: center !important;
  }

  .site-header .brand img {
    display: block !important;
    width: 54px !important;
    height: 54px !important;
    max-width: none !important;
    object-fit: contain !important;
  }

  .site-header .brand-text {
    display: none !important;
  }

  /* The yellow CTA owns the remaining header width, like the screenshot. */
  .site-header .header-inner > .btn,
  .site-header .header-inner > [data-donate] {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    line-height: 1 !important;
  }

  #main-nav.nav {
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
  }
}

/* On very narrow phones keep the same three-item composition;
   only reduce gaps/button type slightly instead of rearranging it. */
@media (max-width: 380px) {
  .site-header .header-inner {
    grid-template-columns: 40px 46px minmax(0, 1fr) !important;
    column-gap: 10px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .site-header .brand,
  .site-header .brand img {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
  }

  .site-header .header-inner > .btn,
  .site-header .header-inner > [data-donate] {
    font-size: 12px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}


/* v3.5 — DOM FIX, not another visual override.
   Mobile header has exactly three direct grid items:
   hamburger | flower | CTA.
   The nav is absolute and therefore cannot consume a grid cell or force wrapping. */
@media (max-width: 900px) {
  .site-header .header-inner {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 44px 54px minmax(0, 1fr) !important;
    grid-template-rows: 58px !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 8px 16px !important;
    min-height: 74px !important;
  }

  .mobile-menu-toggle {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    margin: 0 !important;
    width: 44px !important;
    height: 44px !important;
    justify-self: start !important;
    order: unset !important;
  }

  .site-header .brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: block !important;
    width: 54px !important;
    min-width: 54px !important;
    margin: 0 !important;
    order: unset !important;
  }

  .site-header .brand img {
    display: block !important;
    width: 54px !important;
    height: 54px !important;
    object-fit: contain !important;
  }

  .site-header .brand-text {
    display: none !important;
  }

  .header-donate {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    order: unset !important;
  }

  #main-nav.nav {
    position: absolute !important;
    display: none !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  #main-nav.nav.is-open {
    display: flex !important;
  }
}

@media (max-width: 380px) {
  .site-header .header-inner {
    grid-template-columns: 40px 46px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .site-header .brand, .site-header .brand img {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
  }
  .header-donate {
    font-size: 11px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* =========================================================
   v3.6 — DIGITÁLIS KÖNYVTÁR
   A könyvek adatai kizárólag a library/books.js fájlban vannak.
   ========================================================= */
.library-page {
  max-width: var(--max);
  margin: 0 auto;
}

.library-intro {
  padding: 76px clamp(44px, 6vw, 96px) 52px;
  max-width: 920px;
}

.library-intro p {
  max-width: 650px;
}

.book-list {
  padding: 0 clamp(44px, 6vw, 96px) 48px;
}

.book-item {
  display: grid;
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 82px);
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid rgba(11,11,9,.16);
}

.book-item:last-child {
  border-bottom: 1px solid rgba(11,11,9,.16);
}

.book-cover {
  display: block;
  background: rgba(11,11,9,.04);
  text-decoration: none;
}

.book-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 9;
  object-fit: contain;
  background: #fff;
}

.book-info {
  max-width: 680px;
}

.book-info h2 {
  margin-bottom: 12px;
}

.book-info p {
  margin-bottom: 24px;
}

.book-open {
  display: inline-block;
  text-decoration: none;
  background: transparent;
}

.nav a[aria-current="page"] {
  border-bottom: 1px solid currentColor;
}

.library-support {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .library-intro {
    padding: 52px 24px 26px;
  }

  .library-intro h1 {
    font-size: 56px;
  }

  .book-list {
    padding: 0 24px 28px;
  }

  .book-item {
    grid-template-columns: 38% minmax(0, 1fr);
    gap: 20px;
    padding: 30px 0;
    align-items: start;
  }

  .book-info .kicker {
    margin-bottom: 14px;
  }

  .book-info h2 {
    font-size: 36px;
  }

  .book-open {
    padding: 12px 14px;
  }
}

@media (max-width: 560px) {
  .book-item {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .book-cover {
    width: min(68vw, 320px);
  }
}


/* v3.7 — HEADER LOCK.
   Desktop: logo/brand | nav | CTA in ONE row.
   Mobile remains the known-good v3.5 hamburger | flower | CTA row. */
@media (min-width: 901px) {
  .site-header .header-inner {
    display: grid !important;
    grid-template-columns: minmax(250px, 1fr) auto auto !important;
    align-items: center !important;
    gap: 28px !important;
    width: 100% !important;
    max-width: var(--max) !important;
    margin: 0 auto !important;
    padding: 0 28px !important;
    min-height: 88px !important;
  }

  .mobile-menu-toggle {
    display: none !important;
  }

  .site-header .brand {
    grid-column: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .site-header .brand img {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
  }

  .site-header .brand-text {
    display: inline !important;
    white-space: nowrap !important;
  }

  #main-nav.nav {
    grid-column: 2 !important;
    display: flex !important;
    position: static !important;
    width: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    white-space: nowrap !important;
  }

  #main-nav.nav a {
    width: auto !important;
    padding: 0 !important;
  }

  .header-donate {
    grid-column: 3 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 168px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    white-space: nowrap !important;
  }
}

/* v3.8 — MYSTERY collection page */
.collection-page { max-width: var(--max); margin: 0 auto; }
.collection-hero {
  display: grid;
  grid-template-columns: 48% 52%;
  min-height: 690px;
  background: var(--paper);
}
.collection-hero-copy,
.collection-about-copy,
.kolonics-copy,
.future-copy {
  padding: clamp(64px, 7vw, 110px) clamp(44px, 6vw, 96px);
  align-self: center;
}
.collection-hero-copy .btn { margin-top: 22px; }
.collection-hero-image {
  min-height: 690px;
  background: url("assets/collection-hero.jpg") center / cover no-repeat;
}
.collection-about {
  display: grid;
  grid-template-columns: 43% 57%;
  border-top: 1px solid rgba(11,11,9,.12);
}
.collection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 720px;
  background: #080806;
  gap: 2px;
}
.collection-grid img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }
.kolonics-section {
  display: grid;
  grid-template-columns: 31% 38% 31%;
  min-height: 690px;
}
.kolonics-portrait { background: url("assets/kolonics-portrait.jpg") center / cover no-repeat; min-height: 690px; }
.kolonics-work { background: url("assets/kolonics-masonic.jpg") center / cover no-repeat; min-height: 690px; }
.kolonics-copy { background: #080806; }
.future-section {
  min-height: 500px;
  display: grid;
  place-items: center;
  text-align: center;
  border-bottom: 1px solid rgba(11,11,9,.12);
}
.future-copy { max-width: 900px; }
.future-copy .rule { margin-left: auto; margin-right: auto; }
.collection-support {
  padding: 82px 7vw 92px;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.collection-support .btn { margin-top: 24px; }

@media (max-width: 900px) {
  .collection-hero,
  .collection-about,
  .kolonics-section { grid-template-columns: 1fr; }
  .collection-hero-copy,
  .collection-about-copy,
  .kolonics-copy,
  .future-copy { padding: 52px 24px; }
  .collection-hero-image { min-height: 58vw; }
  .collection-grid { min-height: 110vw; }
  .kolonics-section { display: grid; }
  .kolonics-portrait { min-height: 120vw; background-position: center top; }
  .kolonics-work { min-height: 118vw; background-size: contain; background-color: #f5f1e7; }
  .future-section { min-height: 0; }
  .collection-support { padding: 58px 24px 68px; }
}

@media (max-width: 560px) {
  .collection-grid { grid-template-columns: 1fr; grid-template-rows: none; min-height: 0; }
  .collection-grid img { height: auto; aspect-ratio: 4 / 3; }
}

/* v3.9 — MOBILE FOOTER REBUILD.
   Keep the desktop footer unchanged; on phones the footer becomes a deliberate
   editorial block instead of inheriting header/brand flex rules. */
@media (max-width: 900px) {
  footer.footer {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 28px !important;
    width: 100% !important;
    max-width: var(--max) !important;
    margin: 0 auto !important;
    padding: 32px 24px 36px !important;
  }

  footer.footer .footer-brand {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    margin: 0 !important;
    text-decoration: none !important;
  }

  footer.footer .footer-brand img {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
  }

  footer.footer .footer-brand span {
    display: block !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
  }

  footer.footer .footer-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    width: 100% !important;
    border-top: 1px solid rgba(11,11,9,.15) !important;
  }

  footer.footer .footer-links a {
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 11px 8px 10px 0 !important;
    border-bottom: 1px solid rgba(11,11,9,.15) !important;
    text-decoration: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  footer.footer .footer-links a:nth-child(even) {
    padding-left: 14px !important;
    padding-right: 0 !important;
    border-left: 1px solid rgba(11,11,9,.15) !important;
  }
}

@media (max-width: 380px) {
  footer.footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  footer.footer .footer-brand {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  footer.footer .footer-brand img {
    width: 44px !important;
    height: 44px !important;
  }
}

/* v4.1 — PROGRAMOK PAGE */
.program-page-hero,
.festival-section,
.pub-section,
.learning-section {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48% 52%;
}
.program-page-copy,
.program-detail-copy {
  padding: clamp(64px, 7vw, 110px) clamp(44px, 6vw, 96px);
  align-self: center;
}
.program-page-copy .btn { margin-top: 22px; }
.program-page-hero-image {
  min-height: 690px;
  background: var(--paper) url("assets/programs-real.jpg") center / contain no-repeat;
}
.festival-section { background: #080806; }
.festival-image {
  min-height: 650px;
  background: #080806 url("assets/program-festival.jpg") center / cover no-repeat;
}
.pub-section { grid-template-columns: 48% 52%; border-bottom: 1px solid rgba(11,11,9,.12); }
.pub-image {
  min-height: 620px;
  background: url("assets/mystery-pub.jpg") center / cover no-repeat;
}
.learning-section { grid-template-columns: 52% 48%; border-bottom: 1px solid rgba(11,11,9,.12); }
.learning-image {
  min-height: 650px;
  background: #e7e1d5 url("assets/program-talk.jpg") center / contain no-repeat;
}
.program-support {
  max-width: 960px;
  margin: 0 auto;
  padding: 82px 7vw 92px;
  text-align: center;
}
.program-support .btn { margin-top: 24px; }

@media (max-width: 900px) {
  .program-page-hero,
  .festival-section,
  .pub-section,
  .learning-section { grid-template-columns: 1fr; }
  .program-page-copy,
  .program-detail-copy { padding: 52px 24px; }
  .program-page-hero-image { min-height: 68vw; order: 2; }
  .festival-image { min-height: 68vw; }
  .pub-image { min-height: 62vw; }
  .learning-image { min-height: 90vw; background-size: cover; background-position: center top; }
  .program-support { padding: 58px 24px 68px; }
}

/* v4.3 — PROGRAMOK: final 2000×1400 images, no crop / no letterbox bars */
.program-page-hero-image,
.festival-image,
.pub-image,
.learning-image {
  width: 100%;
  min-height: 0 !important;
  aspect-ratio: 10 / 7;
  align-self: center;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

/* Keep the image cells from showing a separate matte above/below the photo. */
.program-page-hero-image,
.learning-image {
  background-color: transparent !important;
}

@media (max-width: 900px) {
  .program-page-hero-image,
  .festival-image,
  .pub-image,
  .learning-image {
    min-height: 0 !important;
    aspect-ratio: 10 / 7;
    background-size: contain !important;
    background-position: center !important;
  }
}


/* v4.4 — HÍRLEVÉL / Kit integration */
.newsletter-section {
  background: #080806;
  color: var(--paper);
  border-top: 1px solid rgba(246,241,230,.16);
}
.newsletter-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 7vw 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 72px;
  align-items: end;
}
.newsletter-copy h2 { margin: 10px 0 18px; }
.newsletter-copy p { margin: 0; max-width: 620px; }
.newsletter-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.newsletter-fields input {
  min-width: 0;
  border: 1px solid rgba(246,241,230,.48);
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 18px;
  padding: 14px 16px;
  border-radius: 0;
  outline: none;
}
.newsletter-fields input::placeholder { color: rgba(246,241,230,.64); }
.newsletter-fields input:focus { border-color: #F2C94C; }
.newsletter-legal,
.newsletter-status { font-size: 18px; margin: 14px 0 0; }
.newsletter-legal { color: rgba(246,241,230,.72); }
.newsletter-status { min-height: 1.4em; }
.newsletter-status.is-success { color: #F2C94C; }
.newsletter-status.is-error { color: var(--paper); }
.newsletter-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 900px) {
  .newsletter-inner { grid-template-columns: 1fr; gap: 34px; padding: 56px 24px 62px; }
}
@media (max-width: 620px) {
  .newsletter-fields { grid-template-columns: 1fr; }
  .newsletter-fields .btn { width: 100%; }
}


/* v4.6 — Stripe donation checkout + confirmation pages */
.donation-privacy {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 14px 0 8px !important;
  font-size: 18px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
.donation-privacy input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--yellow); }
.checkout-status { min-height: 1.4em; margin: 8px 0 12px; font-size: 18px; }
[data-checkout]:disabled { opacity: .62; cursor: wait; }

.status-page { min-height: calc(100vh - 180px); display: grid; place-items: center; padding: 72px 24px; }
.status-card { width: min(760px, 100%); border-top: 1px solid rgba(11,11,9,.22); border-bottom: 1px solid rgba(11,11,9,.22); padding: 54px 0; }
.status-card h1 { margin: 8px 0 24px; }
.status-card p { max-width: 660px; }
.status-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.status-meta { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(11,11,9,.16); }
@media (max-width: 900px) {
  .status-page { padding: 46px 24px; }
  .status-card { padding: 38px 0; }
  .status-actions .btn { width: 100%; text-align: center; }
}

/* v5.2 — Beszámolók, Kapcsolat, Adatkezelés */
.editorial-hero,
.legal-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 92px 7vw 72px;
}
.editorial-hero p { max-width: 760px; }
.report-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(11,11,9,.16);
  border-bottom: 1px solid rgba(11,11,9,.16);
}
.report-grid article { padding: 62px 4.5vw 68px; }
.report-grid article + article { border-left: 1px solid rgba(11,11,9,.16); }
.report-grid .text-link { display: inline-block; margin-top: 14px; }
.editorial-callout { max-width: 900px; margin: 0 auto; padding: 82px 7vw 88px; text-align: center; }
.contact-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 7vw 92px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 84px;
}
.contact-social { margin-top: 44px; padding-top: 34px; border-top: 1px solid rgba(11,11,9,.16); }
.contact-form { display: grid; gap: 12px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input:not([type]), .contact-form textarea {
  width: 100%; border: 1px solid rgba(11,11,9,.32); background: rgba(255,255,255,.2); padding: 14px 16px; border-radius: 0; font: inherit; font-size: 18px; color: var(--ink);
}
.contact-form textarea { resize: vertical; min-height: 190px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 1px solid var(--ink); border-color: var(--ink); }
.consent-row { display: grid !important; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin-top: 10px; text-transform: none; letter-spacing: normal; font-size: 18px; font-weight: 400; }
.consent-row input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--yellow); }
.form-legal, .contact-status { font-size: 18px; }
.contact-status { min-height: 1.4em; margin: 0; }
.contact-status.is-success { font-weight: 700; }
.legal-page { max-width: 980px; }
.legal-page h2 { margin-top: 52px; }
.legal-page p { max-width: 850px; }
.legal-lead { opacity: .7; }
.legal-note { margin-top: 56px; padding: 24px; border: 1px solid var(--red); font-size: 18px; }
.donation-privacy a, .newsletter-legal a, .form-legal a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .editorial-hero, .legal-page { padding: 58px 24px 52px; }
  .report-grid { grid-template-columns: 1fr; }
  .report-grid article { padding: 46px 24px 50px; }
  .report-grid article + article { border-left: 0; border-top: 1px solid rgba(11,11,9,.16); }
  .editorial-callout { padding: 58px 24px 64px; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; padding: 0 24px 68px; }
}

/* V5.3 — compact association details */
.about-strip { padding: 54px clamp(24px, 6vw, 96px); border-top: 1px solid rgba(11,11,9,.18); border-bottom: 1px solid rgba(11,11,9,.18); }
.about-strip h2 { margin: 8px 0 10px; }
.about-strip > p:not(.org-details) { max-width: 760px; margin: 0; }
.about-strip .org-details { margin: 20px 0 0; font-size: 14px; font-weight: 700; line-height: 1.7; letter-spacing: .02em; }
@media (max-width: 700px) { .about-strip { padding: 42px 24px; } .about-strip .org-details { max-width: 36rem; } }
