/* ============================================================
   ADVENTSKALENDER 2026 – Grundgerüst-Styling
   Bewusst zurückhaltend: die eigentlichen Inhalte (Grafiken/PDFs)
   bringen ihr Design selbst mit.
   ============================================================ */

:root {
  --cream: #F6F3EE;
  --taupe: #EEE3D5;
  --mokka: #463A2F;
  --mokka-light: #947A67;
  --navy: #234563;
  --navy-dark: #192F44;
  --markenblau: #1F5984;
  --apricot: #FDB190;
}

* { box-sizing: border-box; }

a:focus-visible, button:focus-visible, .door-tile:focus-visible, .door-nav-btn:focus-visible {
  outline: 3px solid var(--apricot);
  outline-offset: 2px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--mokka);
  font-family: "Lato", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

a { color: var(--navy); }

.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--markenblau) 100%);
  color: #fff;
  padding: 16px 20px 14px;
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(20px, 3.8vw, 27px);
  letter-spacing: .3px;
}

.site-header p {
  margin: 4px 0 0;
  font-family: "Lato", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  opacity: .92;
}

.site-header p.site-role {
  margin-top: 2px;
  font-size: 11px;
  font-style: italic;
  opacity: .8;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  position: relative;
  z-index: 1;
}

/* ---------- Weihnachtsfoto-Hintergrund (nur Kalenderübersicht) ---------- */
/* Eigenes Foto der Nutzerin. Eine cremefarbene, halbtransparente Ebene
   darüber sorgt für Lesbarkeit; die Türchen bleiben eigenständige,
   deckende Kacheln und sind damit immer gut lesbar. */

body.overview-page {
  background-image: url("winter-hintergrund.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

body.overview-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(246, 243, 238, 0.5);
  z-index: 0;
  pointer-events: none;
}

body.overview-page .site-header,
body.overview-page .site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- Übersicht ---------- */

.door-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px;
  margin-top: 70px;
  position: relative;
  z-index: 1;
}

.door-tile {
  /* Grid-Item-Grundregeln: min-width/min-height 0 verhindern, dass der
     Inhalt (Bild/Text) die Kachel breiter/höher macht als ihre
     Grid-Spalte und sie dadurch in die Nachbarspalte überlappt. */
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  aspect-ratio: 5 / 4;
  border-radius: 18px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--taupe);
  transition: transform .15s ease;
}

.door-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 0;
}

.door-tile-scrim {
  position: absolute;
  inset: 0;
  display: block;
}

.door-tile.unlocked .door-tile-scrim {
  background: linear-gradient(to top, rgba(25, 47, 68, 0.97) 0%, rgba(25, 47, 68, 0.95) 60%, rgba(25, 47, 68, 0.08) 88%, rgba(25, 47, 68, 0.03) 100%);
}

.door-tile.locked .door-tile-scrim {
  background: linear-gradient(to top, rgba(25, 47, 68, 0.95) 0%, rgba(25, 47, 68, 0.92) 60%, rgba(25, 47, 68, 0.08) 88%, rgba(25, 47, 68, 0.05) 100%);
}

.door-tile-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px;
  text-align: center;
}

.door-tile.unlocked {
  border-bottom-color: var(--apricot);
}

.door-tile.unlocked:hover,
.door-tile.unlocked:focus-visible {
  transform: translateY(-2px);
}

.door-nr {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}

.door-label {
  font-family: "Lato", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ---------- Türchen-Seite ---------- */

.door-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.door-page-header h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  margin: 0;
  font-size: 26px;
}

.back-link {
  text-decoration: none;
  font-family: "Lato", Arial, sans-serif;
  font-weight: 600;
  font-size: 15px;
}

#door-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.door-locked, .door-placeholder, .door-pdf {
  text-align: center;
  padding: 50px 20px;
  background: #fff;
  border-radius: 18px;
  width: 100%;
}

.door-message {
  font-size: 18px;
  color: var(--mokka);
  max-width: 440px;
  margin: 0 auto 18px;
}

.door-back-btn, .door-cta-btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-family: "Lato", Arial, sans-serif;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
}

.door-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* ---------- Mehrseiten-Pager (Canva-Türchen) ---------- */

.door-pager {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.door-pager .door-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.door-pager .door-image-link {
  display: block;
  width: 100%;
  line-height: 0;
}

/* Desktop/Tablet: Bild deutlich größer anzeigen (ca. 350–450px, je nach
   Bildschirmgröße) statt über die Höhe zu begrenzen – etwas Scrollen ist
   hier ausdrücklich in Ordnung, Lesbarkeit hat Vorrang. */
@media (min-width: 601px) {
  .door-pager .door-image,
  .door-pager .door-image-link {
    width: clamp(340px, 38vw, 460px);
  }
}

.door-pager-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
}

.door-nav-btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-family: "Lato", Arial, sans-serif;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.door-nav-btn--disabled {
  background: var(--taupe);
  color: var(--mokka-light);
  cursor: default;
}

.door-pager-status {
  font-size: 14px;
  color: var(--mokka-light);
  font-weight: 700;
  min-width: 70px;
  text-align: center;
  border-bottom: 2px solid var(--apricot);
  padding-bottom: 2px;
}

@media (max-width: 600px) {
  .door-pager { gap: 10px; }
  .door-pager-nav { gap: 10px; }
  .door-nav-btn { padding: 9px 14px; font-size: 13px; }
}

.site-footer {
  text-align: center;
  color: var(--mokka-light);
  font-size: 13px;
  padding: 30px 20px 40px;
}
