/* ========== Design Tokens ========== */
:root{
  --bg: #F7F3EE;
  --paper:#FFFFFF;
  --ink:#1F1F1F;
  --muted:#6B6B6B;
  --brand:#1F4D46;     /* Tannengrün */
  --accent:#7A2E2A;    /* Burgunder */
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1100px;
  --banner-h: 52px; /* grober Startwert; JS setzt die echte Höhe */
}

/* Base */
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background:var(--bg);
  line-height:1.6;
}

/* ========== Banner (einzeilig, sticky) ========== */
/* Sticky-Banner zentrieren + Link-Optik */
.site-banner .container{ display:flex; justify-content:center; }
#family-line{ margin:0; font-weight:700; color:var(--brand); text-align:center; }
#family-line .family-link{ color:var(--brand); text-decoration:none; }
#family-line .family-link:hover{ text-decoration:underline; }
#family-line .family-link:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }
#family-line{
  margin: 0;
  font-weight: 700;
  color: var(--brand);
}

/* ========== Hero (ohne Bild) ========== */
.hero{
  position: relative;
  min-height: 52vh;
  display: grid;
  place-items: center;
  padding: 64px 18px;
  background:
    radial-gradient(1200px 400px at 50% -20%, rgba(255,255,255,0.9), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7f3ee 100%);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.hero-inner{ text-align:center; max-width: 820px; }
.hero h1{
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  font-size: clamp(32px, 6vw, 56px);
  margin: 0 0 10px;
  color: #102c27;
}
.sub{ color:var(--muted); margin:0 0 22px; font-size: clamp(16px,2.4vw,20px); }
.hero-cta{ display:flex; gap:12px; justify-content:center; flex-wrap: wrap; }
.badge{
  display:inline-flex;
  flex-direction: column;
  align-items: center;
  gap:4px;
  margin-top:20px;
  background:rgba(0,0,0,.04);
  border:1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 10px 18px;
  font-size:14px;
  font-weight:600;
  color:#174039;
}
.badge span:first-child{
  font-size:16px;
}

/* ========== Sections & Headings ========== */
.section{ padding: 70px 18px; }
.section.alt{ background: #fff; }
.container{ max-width: var(--container); margin:0 auto; }

h2{
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(24px, 4vw, 36px);
  margin:0 0 10px;
  color:#133b34;
}
.lead{ color:var(--muted); margin:0 0 30px; }

/* ========== Buttons ========== */
.btn{
  display:inline-block; border-radius: 999px; padding: 10px 16px;
  text-decoration:none; font-weight:600; border:2px solid transparent;
  transition: transform .12s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.btn:hover{ transform: translateY(-1px); }
.btn.primary{ background: var(--brand); color:#fff; }
.btn.primary:hover{ background:#174039; }
.btn.ghost{ background: #fff; border-color: var(--brand); color: var(--brand); }
.btn.ghost:hover{ background: rgba(31,77,70,.08); }

/* ========== Timeline ========== */
.timeline{ position:relative; padding: 20px 0 20px 0; }
.timeline::before{
  content:""; position:absolute; left:calc(50% - 1px); top:0; bottom:0; width:2px;
  background: linear-gradient(#e6e0d8, #d9d2c7);
  display:none;
}
.t-row{ display:grid; gap:18px; grid-template-columns: 1fr; margin: 22px 0; }
.t-card{
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding:16px; display:flex; gap:14px; align-items:flex-start;
  border:1px solid rgba(0,0,0,.04);
}
.t-time{ font-weight:700; color:var(--brand); min-width:72px; }
.t-media{
  width:110px; height:86px; flex:0 0 110px; border-radius: var(--radius-sm); overflow:hidden; 
  transform: rotate(-1deg); border: 8px solid #fff; box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
.t-media img{ width:100%; height:100%; object-fit:cover; display:block; }
.t-body h3{ margin:2px 0 6px; font-size:18px; }
.t-body p{ margin:0; color:var(--muted); }

@media (min-width: 880px){
  .timeline::before{ display:block; }
  .t-row{ grid-template-columns: repeat(2, 1fr); }
  .t-row .t-card:nth-child(odd){ grid-column: 1 / 2; margin-right: 24px; }
  .t-row .t-card:nth-child(even){ grid-column: 2 / 3; margin-left: 24px; }
}

/* ========== Gallery ========== */
.filters{ display:flex; flex-wrap:wrap; gap:10px; margin: 10px 0 20px; }
.filter-chip{
  border:1px solid rgba(0,0,0,.1); border-radius:999px; padding:6px 12px; cursor:pointer;
  background:#fff; color:#333;
}
.filter-chip.active{ background: var(--brand); color:#fff; border-color: transparent; }
.gallery{ column-count: 1; column-gap: 14px; }
@media (min-width: 560px){ .gallery{ column-count: 2; } }
@media (min-width: 900px){ .gallery{ column-count: 3; } }

.photo{
  break-inside: avoid; display:block; margin:0 0 14px;
  background:#fff; border:1px solid rgba(0,0,0,.06); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow:hidden;
  transform: rotate(calc(var(--rot, 0) * 1deg));
}
.photo .frame{ padding: 10px 10px 14px; background:#fff; }
.photo img{ width:100%; height:auto; display:block; border-radius: 6px; aspect-ratio: 4/3; object-fit: cover; }
.photo .cap{
  margin-top:8px; font-family: "Caveat", "Comic Sans MS", cursive; font-size: 18px; color:#333;
  text-align:center;
}

/* Lightbox */
.lightbox{
  position: fixed; inset:0; background: rgba(15,15,15,.9);
  display:none; align-items:center; justify-content:center; z-index: 99;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.lightbox .close, .lightbox .prev, .lightbox .next{
  position:absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); color:#fff; border:none; padding:10px 12px; cursor:pointer;
  border-radius: 8px;
}
.lightbox .close{ top: 24px; right: 24px; transform:none; }
.lightbox .prev{ left: 24px; }
.lightbox .next{ right: 24px; }

/* Gate (Password) */
.gate{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius: var(--radius); padding:18px; box-shadow: var(--shadow);
  max-width: 520px; margin: 0 auto 24px;
}
.gate-form{ display:flex; gap:10px; flex-wrap: wrap; }
.gate-form input{ flex:1; padding:10px 12px; border-radius: 10px; border:1px solid rgba(0,0,0,.14); }
.gate .hint{ color: #7A2E2A; font-size: 14px; margin: 6px 2px 0; }
.visually-hidden{ position:absolute !important; clip:rect(1px,1px,1px,1px); padding:0 !important; border:0 !important; height:1px !important; width:1px !important; overflow:hidden; }

/* Footer & misc */
.site-footer{ padding: 24px 18px; border-top:1px solid rgba(0,0,0,.06); background:#fff; }
.site-footer .f-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; max-width: var(--container); margin:0 auto; }
.mini-nav a{ color:var(--muted); margin-left:12px; text-decoration:none; }
.mini-nav a:hover{ color:var(--brand); }

/* Back-to-top */
.to-top{
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display:none;
  border:none; padding:10px 12px; border-radius: 10px; box-shadow: var(--shadow); background:#fff; cursor:pointer;
}
.to-top.show{ display:block; }

.hero h1 { line-height: 1.1; }

.day-head{
  margin: 26px 0 8px;
  font-size: clamp(18px, 2.6vw, 22px);
  color: #174039;
  font-weight: 700;
}

/* --- Mobile Overflow-Fix für "Das war unser Wochenende" --- */
html, body { overflow-x: hidden; }                 /* harte Bremse */
.section, .container, .timeline, .t-row { overflow-x: clip; }

.t-row { grid-template-columns: minmax(0, 1fr); }  /* echte 1-Spalte ohne Überbreite */
.t-card { width: 100%; }                            /* keine extra Pixel durch Ränder/Gaps */
.t-media { width: 96px; height: 76px; }             /* etwas schmaler als vorher */

/* Extra kompakt auf sehr kleinen Screens */
@media (max-width: 420px){
  .t-card { padding: 12px; gap: 10px; }
  .t-media { width: 80px; height: 64px; border-width: 6px; }
  .t-time { min-width: 64px; }
}

/* (Optional) Stabiler Layout-Flow */
.t-card { display: grid; grid-template-columns: auto auto 1fr; align-items: start; }
.t-time { grid-column: 1; }
.t-media { grid-column: 2; }
.t-body  { grid-column: 3; }

@media (max-width: 375px) {
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Sticky-Filter unterhalb des Banners */
.filters{
  position: sticky;
  top: calc(var(--banner-h) + 8px); /* 8px Abstand unter dem Banner */
  z-index: 40;                      /* Banner hat z-index 50 */
  background: rgba(247,243,238,0.9);/* wie Banner */
  backdrop-filter: blur(8px);
  padding: 10px 12px;
  margin: 0 -12px 18px;             /* leicht breite Fläche wirken lassen */
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}

/* Disabled-Button Style */
.btn.disabled {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

/* Notification-Badge angedockt */
.badge-soon {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e63946;   /* rot wie Notification */
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 12px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

#family-line {
  padding: 0.5rem;        /* mehr Raum innen */
  margin: 0.5rem auto;    /* mehr Abstand außen */
  max-width: 900px;     /* optional, damit es nicht zu breit läuft */
  text-align: center;   /* wenn du den Text zentriert magst */
}

/* Badge-Variante: grün, angedockt oben rechts am Button */
.btn.has-badge{ position: relative; }
.badge-now{
  position:absolute;
  top:-8px; right:-8px;
  background:#d8f5e0;          /* leichtes Grün */
  color:#186a3b;               /* sattes Grün für Text */
  border:1px solid #b7e8c6;    /* zarte Linie */
  font-size:11px; font-weight:700;
  padding:2px 8px; border-radius:999px;
  line-height:1.2; white-space:nowrap;
  box-shadow:0 2px 6px rgba(0,0,0,.10);
}

/* optional: sanftes Puls-Highlight beim ersten Laden */
@keyframes badgePop { 0%{transform:scale(.9);opacity:.0} 60%{transform:scale(1.06);opacity:1} 100%{transform:scale(1)} }
.badge-now{ animation: badgePop .45s ease-out; }