/* ==============================
   style.css – Agentur am Meer Wetterseite
   ============================== */

:root{
  --brand:#006e9c;
  --bg:#eef4f6;
  --text:#222;
  --card:#fff;
  --muted:#667085;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
}

body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* Header & Footer */
header, footer{
  background:var(--brand);
  color:#fff;
  padding:12px 16px;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:center; /* Logo + Titel zentriert */
  gap:12px;
}

header .logo{
  height:120px; /* dezent */
  width:auto;
  display:block;
}

footer{
  text-align:center;
}

/* Layout */
main{
  max-width:1100px;
  margin:0 auto;
  padding:16px;
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

@media (min-width: 980px){
  main{
    grid-template-columns: 1fr 1fr; /* zwei Spalten auf Desktop */
  }
}

/* Karten-Optik */
.card{
  background:var(--card);
  border-radius:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  padding:16px;
}

/* Wetterkarte */
.weather .top-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:8px;
}

.temp-highlight{
  line-height:1;
  display:flex;
  align-items:baseline;
  gap:6px;
  font-weight:800;
  font-size: clamp(54px, 9vw, 92px); /* Hervorhebung Temperatur */
  background: linear-gradient(90deg, #00a2ff, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -1px;
}

.temp-highlight .unit{
  font-size:.35em;
  color:#0b4a6f;
  background:transparent;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.meta{ text-align:right; }

.muted{ color:var(--muted); }

.grid{ margin-top:8px; }

.kv{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap:8px 14px;
}

.kv > div{
  padding:8px 0;
  border-bottom:1px solid #ecf0f4;
}

@media (max-width: 520px){
  .kv{
    grid-template-columns: minmax(120px, 40%) 1fr;
  }
}

/* Webcam */
.webcam-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

button{
  border:0;
  background:var(--brand);
  color:#fff;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
}

button:hover{ filter:brightness(.95); }

.webcam-figure{ margin:10px 0 0 0; }

.webcam img{
  width:100%;
  height:auto;
  display:block;
  border-radius:10px;
  border:1px solid #e6eef4;
  margin-top:8px;
  background:#f8fbfe;
}

figcaption{
  margin-top:8px;
  font-size:.95rem;
}

/* Gezeiten */
.tides-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.tides-open{
  text-decoration:none;
  background:#e6f4ff;
  color:#0b4a6f;
  padding:6px 10px;
  border-radius:999px;
  font-size:.95rem;
}

.tides-open:hover{ filter:brightness(.96); }

.iframe-wrap{
  width:100%;
  border:1px solid #e6eef4;
  border-radius:10px;
  overflow:hidden;
  background:#f8fbfe;
}

.iframe-wrap iframe{
  width:100%;
  height:400px; /* Startwert, wird per JS dynamisch gesetzt */
  display:block;
  border:0;
}

/* Feinheiten */
a{ color:inherit; }
strong{ font-weight:600; }

/* ---- Sticky-CTA unten ---- */
:root{
  --cta-z: 9999;
}

/* Platz nach unten einkalkulieren, damit nichts verdeckt wird */
main{
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* Sticky-Layer */
.cta.sticky{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--cta-z);
  /* zentriert & etwas Luft für Safe-Area (iOS) */
  display: flex;
  justify-content: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  /* dezente Glas-Optik über dem Inhalt */
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 25%, rgba(255,255,255,.95) 100%);
  backdrop-filter: blur(6px);
  border: 0;
  box-shadow: none;
  /* Card-Layout neutralisieren */
  grid-column: 1 / -1;
  pointer-events: none; /* nur der Button soll klickbar sein */
}

/* ---- Sticky-CTA unten (sichtbarer & zentriert) ---- */
:root{ --cta-z: 99999; }

main{
  /* Platz, damit nichts vom Sticky-CTA verdeckt wird */
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

.cta.sticky{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--cta-z);
  display: flex;
  justify-content: center;   /* horizontal zentriert */
  align-items: center;       /* vertikal zentriert */
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%,
                           rgba(255,255,255,.65) 30%,
                           rgba(255,255,255,.98) 100%);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0,0,0,.06);
  pointer-events: none; /* nur der Button klickbar */
}

.cta.sticky .book-btn{
  pointer-events: auto;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(1.06rem, 2.6vw, 1.28rem);
  line-height: 1;
  padding: clamp(14px, 3.2vw, 18px) clamp(24px, 5.2vw, 36px);
  border-radius: 999px;
  color: #fff;

  /* Sichtbarkeit: starker Kontrast, Glow & Innenring */
  background: linear-gradient(135deg, #00a2ff 0%, #006e9c 60%, #004d73 100%);
  border: 2px solid rgba(255,255,255,.9);
  box-shadow:
    0 12px 24px rgba(0,110,156,.35),
    0 2px 0 rgba(0,0,0,.05) inset,
    0 0 0 2px rgba(255,255,255,.85) inset;

  /* leichte Aufmerksamkeit (Pulse) */
  animation: ctaGlow 2.6s ease-in-out infinite;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  min-width: min(320px, 92vw);
}

.cta.sticky .book-btn:hover{
  filter: brightness(.98);
  transform: translateY(-1px);
  box-shadow:
    0 16px 28px rgba(0,110,156,.40),
    0 0 0 2px rgba(255,255,255,1) inset;
}

.cta.sticky .book-btn:active{
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(0,110,156,.32);
}

.cta.sticky .book-btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 4px rgba(255,255,255,.95),
    0 0 0 7px #006e9c,
    0 12px 24px rgba(0,110,156,.35);
}

/* sanfter Glow */
@keyframes ctaGlow{
  0%,100%{
    transform: translateY(0);
    box-shadow:
      0 12px 24px rgba(0,110,156,.35),
      0 0 0 2px rgba(255,255,255,.85) inset;
  }
  50%{
    transform: translateY(-1px);
    box-shadow:
      0 18px 30px rgba(0,110,156,.42),
      0 0 0 2px rgba(255,255,255,1) inset;
  }
}

/* Bewegungen für Nutzer mit Reduzierter Bewegung aus */
@media (prefers-reduced-motion: reduce){
  .cta.sticky .book-btn{ animation: none; }
}

/* Desktop: Button nicht zu breit wirken lassen */
@media (min-width: 980px){
  .cta.sticky .book-btn{ min-width: 320px; }
}
