/* =========================
   Variablen
   ========================= */
:root {
  --primary-color: #8DD0E0;        /* $style['primary_color'] */
  --secondary-color: #E03C3C;      /* optional für Akzente */
  --background-color: #f5f5f5;     /* $style['background_color'] */
  --font-family: 'Quicksand', sans-serif; /* $style['font_family'] */
  --font-size: 15px;               /* $style['font_size'] */

  /* Layout-Ergänzungen */
  --page-max: 1600px;
  --page-pad: 2rem;
  --surface: #ffffff;          /* Fläche hinter den Cards */
  --divider: rgba(0,0,0,0.06); /* zarter Trenner-Schatten */
}

/* =========================
   Global Body
   ========================= */
body {
  margin: 0;
  font-family: var(--font-family);
  color: #333;
  font-size: var(--font-size);
  line-height: 1.6;
  background: var(--background-color); /* KEIN globales Hintergrundbild */
}

.masthead{
  position: relative;
  width: 100%;
  height: 33vh;          /* oberes Drittel */
  min-height: 260px;
  display: grid;         /* einfacher als Flex für echtes Zentrieren */
  place-items: center;   /* horizontal + vertikal zentriert */
	font-size: 5rem;
}

.headline-date{
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65em 1.1em;              /* etwas mehr Luft zur größeren Schrift */
  background: rgba(255,255,255,.92);
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  width: max-content;
  max-width: min(90%, var(--page-max));
  text-align: center;

  font-weight: 800;
  font-size: clamp(1.4rem, 3.2vw + .2rem, 2.6rem); /* GRÖSSER */
  line-height: 1.15;
  letter-spacing: .2px;
}
.masthead .headline-date{
  display: inline-flex;        /* bleibt die „Pille“ */
  flex-direction: column;      /* Zeilenumbruch */
  align-items: center;
  justify-content: center;
  gap: .15em;                  /* kleiner Abstand zwischen den Zeilen */
  text-align: center;
}

/* Optional: minimale Zeilenhöhe für die einzelnen Zeilen */
.masthead .headline-date > *{
  line-height: 1.1;
}

@media (max-width: 480px){
  .headline-date{ font-size: clamp(1.25rem, 5.5vw + .2rem, 1.6rem); padding: .55em .95em; }
}

/* optional: auf sehr großen Screens noch etwas größer */
@media (min-width: 1600px){
  .headline-date{ font-size: 2.8rem; }
}

.hero-banner{
  position: absolute;
  inset: 0;
  background: url('../img/background.jpg') no-repeat center center;
  background-size: cover;
  filter: saturate(1.05) contrast(1.03);
}

/* Verlauf unten für Trennung zum Content */
.masthead::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.18));
  pointer-events:none;
}

/* =========================
   Content-Fläche (weiß) unter dem Banner
   ========================= */
.content-wrap {
  position: relative;
  background: var(--surface); /* Weiß hinter den Cards */
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  margin-top: -18px; /* leicht in das Banner „eintauchen“ */
  box-shadow: 0 -8px 20px -12px var(--divider), 0 1px 0 var(--divider) inset;
}

/* Optional: „Schattenlippe“ direkt unter dem Banner */
.content-wrap::before {
  content: "";
  position: absolute;
  top: -6px; left: 0; right: 0;
  height: 6px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -10px 25px -12px rgba(0,0,0,0.25);
}

/* =========================
   Hero-Block (falls genutzt)
   ========================= */
.hero {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}
.hero h1 { margin: 0; font-size: 2.5rem; }
.hero p { margin: 0.5rem 0 0; }

/* =========================
   Intro
   ========================= */
.intro {
  text-align: center;
  padding: 1rem;
  background: transparent; /* Content-Fläche ist bereits weiß */
  font-size: 1.1rem;
}

/* =========================
   Icon Menu
   ========================= */
.icon-menu {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem var(--page-pad);
  background: transparent; /* Content-Fläche ist bereits weiß */
  max-width: var(--page-max);
  margin: 0 auto;
  box-sizing: border-box;
}
.icon-tile {
  flex: 0 0 auto;
  background: var(--primary-color);
  color: #fff;
  padding: 1rem;
  border-radius: 12px;
  min-width: 120px;
  text-align: center;
  font-weight: 600;
  transition: transform 0.2s;
}
.icon-tile:hover { transform: scale(1.05); }

/* =========================
   Cards-Container (Mehrspaltig)
   ========================= */
.cards {
  column-count: 3;
  column-gap: 1.5rem;
  padding: var(--page-pad);
  max-width: var(--page-max);
  margin: 0 auto;
  box-sizing: border-box;
}

/* =========================
   Card-Grundstil
   ========================= */
.card {
  background: rgba(255, 255, 255, 0.9);  /* klarer Kontrast auf weißer Fläche */
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
  width: 100%;
  margin: 0 0 1.5rem;
  box-sizing: border-box;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.card h2 {
  display: inline-block;
  background: var(--secondary-color); /* roter Balken */
  color: #fff;                        /* weiße Schrift */
  padding: 0.4rem 0.8rem;
  margin: 0 0 1rem -1.5rem;           /* nach links über Card-Padding hinaus */
  border-top-right-radius: 6px;       /* optisch abgerundet rechts */
  border-bottom-right-radius: 6px;
}

.card h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.0rem;
}

/* =========================
   Responsive Anpassungen für Cards
   ========================= */
@media (min-width: 1024px) {
  .cards { column-count: 3; }
}
@media (max-width: 1024px) {
  .cards { column-count: 2; }
}
@media (max-width: 600px) {
  .cards { column-count: 1; }
}

/* =========================
   Footer
   ========================= */
.footer {
  text-align: center;
  padding: 1rem;
  background: var(--background-color);
  margin-top: 2rem;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* =========================
   Daybox – Card-Optik, Breite wie eine Spalte
   ========================= */
.day-box {
  /* Sicherheitsnetz: alte max-width entfernen */
  max-width: none !important;
}

.cards .day-box {
  column-span: all;                 /* bricht die Multi-Column-Zeile */
  display: block;
  margin: 0 auto 1.5rem;
  /* Desktop: 3 Spalten, column-gap: 1.5rem -> (count-1)*gap = 3rem */
  width: calc((100% - 3rem) / 3);
}

@media (max-width: 1024px) {
  .cards .day-box {
    width: calc((100% - 1.5rem) / 2);
  }
}
@media (max-width: 600px) {
  .cards .day-box {
    width: 100%;
  }
}

/* Inhalte in der Daybox */
.day-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}
.day-content p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
}
.day-text { white-space: pre-line; }

/* Wetter-Grid (falls verwendet) */
.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0.5rem 1rem;
}

/* =========================
   Tour Carousel
   ========================= */
.tour-carousel {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column; /* Stapelt Slides + Navigation */
  height: 100%; /* volle Höhe der Card */
}
.tour-slide {
  display: none;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  flex-grow: 1; /* Slides nehmen den verfügbaren Raum ein */
}
#slide-0:checked ~ .tour-slide:nth-of-type(1),
#slide-1:checked ~ .tour-slide:nth-of-type(2),
#slide-2:checked ~ .tour-slide:nth-of-type(3) {
  display: block;
}
.slide-text {
  max-height: 150px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  word-break: break-word;
}
.toggle-more:checked + .slide-text { max-height: 1000px; }
.show-more {
  display: inline-block;
  margin-top: 5px;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
}
.show-more:hover { text-decoration: underline; }
.carousel-nav {
  text-align: center;
  margin-top: auto;
}
.nav-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}
.nav-dot:hover { background-color: var(--primary-color); }
#slide-0:checked ~ .carousel-nav label[for="slide-0"],
#slide-1:checked ~ .carousel-nav label[for="slide-1"],
#slide-2:checked ~ .carousel-nav label[for="slide-2"] { background-color: var(--primary-color); }

/* iframe volle Breite/Höhe */
.webcam-frame {
  width: 100%;
  aspect-ratio: 16 / 9; /* oder 4/3 je nach Webcam-Format */
  border-radius: 3px;
  border: 0;
}

/* =========================
   Wochenliste Events
   ========================= */
.week-events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.week-events-list .event-item {
  background: rgba(0, 74, 173, 0.1); /* leichtes Blau für Kontrast */
  padding: 0.8rem 1rem;
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
}
.week-events-list .event-item:hover {
  background: rgba(0, 74, 173, 0.2);
}
.week-events-list .event-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}

/* Mehr anzeigen Funktion */
.week-events-list .slide-text {
  max-height: 80px; /* gekürzte Vorschau */
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #333;
}
.week-events-list .toggle-more:checked + .slide-text {
  max-height: 1000px; /* zeigt alles */
}
.week-events-list .show-more {
  display: inline-block;
  margin-top: 4px;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.week-events-list .show-more:hover {
  text-decoration: underline;
}

/* =========================
   Quiz Carousel
   ========================= */
.quiz-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.quiz-slides-wrapper {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}
.quiz-slide {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.quiz-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
/* Navigation Dots */
.quiz-carousel-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.quiz-nav-dot {
  width: 12px;
  height: 12px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

/* =========================
   Tide-Card spezifisch
   ========================= */
.tide-card .tide-table {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tide-card .tide-day {
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tide-card .tide-date {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #222;
}
.tide-card .tide-times {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}
.tide-card .tide-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}
.tide-card .tide-item i { opacity: 0.9; }
.tide-card .tide-item.hw i { color: var(--primary-color); }   /* Hochwasser */
.tide-card .tide-item.lw i { color: var(--secondary-color); } /* Niedrigwasser */
.tide-card .tide-recommendation {
  font-weight: 700;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: #e8f7f0;  /* „gut“ als Default */
  color: #0b6b3a;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== Burger-Button (rechts oben) ===== */
.burger-btn{
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .8rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.burger-btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.burger-btn:active{ transform: translateY(0); }
.burger-btn .fa-bars{ font-size: 1.1rem; }
.burger-btn .burger-label{ font-size: .95rem; }

/* Keine Scrollbars im Body wenn Sidebar offen */
.no-scroll{ overflow: hidden; }

/* ===== Sidebar (rechts, volle Höhe) ===== */
.site-sidebar{
  position: fixed;
  inset: 0 0 0 auto;       /* top:0 right:0 bottom:0 */
  width: clamp(280px, 30vw, 360px);
  background: #fff;
  color: #222;
  z-index: 1099;
  box-shadow: -2px 0 24px rgba(0,0,0,.18);
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.site-sidebar.is-open{ transform: translateX(0); }

.sidebar-header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.sidebar-close{
  appearance: none;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  color: #222;
  padding: .4rem .6rem;
  border-radius: 10px;
  cursor: pointer;
}
.sidebar-close:hover{ box-shadow: 0 6px 16px rgba(0,0,0,.1); }

.sidebar-nav{
  padding: .75rem 1rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.sidebar-link{
  display: block;
  padding: .6rem .5rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  border: 1px solid transparent;
}
.sidebar-link:hover{
  background: rgba(0,0,0,.035);
  border-color: rgba(0,0,0,.06);
}

.sidebar-foot{
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(0,0,0,.06);
  color: #666;
  font-size: .9rem;
}

/* ===== Overlay ===== */
.sidebar-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.38);
  z-index: 1098;
  opacity: 0;
  transition: opacity .28s ease;
}
.site-sidebar.is-open ~ .sidebar-overlay{ opacity: 1; }

/* Motion-Respect */
@media (prefers-reduced-motion: reduce){
  .site-sidebar{ transition: none; }
  .sidebar-overlay{ transition: none; }
  .burger-btn{ transition: none; }
}

