/* =====================================================================
   Berghaus Ricketschwändi – Stylesheet
   Farben abgeleitet von den Fensterläden (blau / weiss / grün) und dem
   Backstein-Braun des Hauses.
   ===================================================================== */

:root {
  --blue:       #1a6fb3;   /* Fensterladen-Blau, nahe BTV Process Blue (Kontrast ≥ 4.5:1 auf Weiss) */
  --blue-dark:  #155d95;
  --green:      #2f7a4e;   /* Fensterladen-Grün */
  --brown:      #5b3627;   /* Backstein */
  --cream:      #f7f4ee;
  --sand:       #ece6da;
  --ink:        #1f2429;
  --muted:      #5d666e;
  --white:      #ffffff;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
  --container: 1120px;
  --nav-h: 72px;
  --topbar-h: 0px;         /* Höhe der Leiste «Wichtige Mitteilung», wird per body.has-topbar und JS gesetzt */
}
body.has-topbar { --topbar-h: 44px; }

*, *::before, *::after { box-sizing: border-box; }
/* Kein automatisches sanftes Scrollen beim Laden mit #anker (z. B. nach dem Absenden des Formulars);
   sanftes Scrollen nur bei Klicks auf Sprunglinks, gesteuert per JS. */
section[id], [id="top"] { scroll-margin-top: calc(var(--nav-h) + var(--topbar-h)); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; margin-top: 1.2em; }
p  { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Sprunglink für Tastatur/Screenreader: erst bei Fokus sichtbar */
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: .6rem 1rem; border-radius: 8px;
  background: var(--white); color: var(--ink); font-weight: 600; text-decoration: none;
  box-shadow: var(--shadow);
}
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn--primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn--ghost { background: rgba(255,255,255,.12); color: var(--white); border-color: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,255,255,.25); }

/* ---------- Wichtige Mitteilung: Leiste über der Navigation (aus dem Admin-Bereich) ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: var(--blue-dark); color: var(--white);
  font-size: .92rem; line-height: 1.4;
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.topbar__inner {
  max-width: var(--container); margin: 0 auto; padding: .45rem 12px .45rem 20px;
  display: flex; align-items: center; gap: .6rem;
}
/* Marke + Text: auf einer Linie, wenn alles Platz hat; sonst springt der Text als Ganzes
   in die nächste Zeile unter die Marke (flex-wrap). Die Gruppe ist zum Schliessen-Knopf zentriert. */
.topbar__body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
.topbar__text { flex: 0 1 auto; min-width: 0; margin: 0; }
.topbar__tag {
  flex: none;
  padding: 0 .55rem; border-radius: 999px;
  background: #f5b400; color: #4a3300; font-size: .74rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
  line-height: calc(.92rem * 1.4); /* = Zeilenhöhe des Textes, damit beides auf gleicher Höhe steht */
}
.topbar__link { color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.topbar__link:hover { color: #ffe08a; }
.topbar__close {
  flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--white); font-size: 1.5rem; line-height: 1; cursor: pointer; opacity: .85;
}
.topbar__close:hover, .topbar__close:focus-visible { background: rgba(255,255,255,.18); opacity: 1; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  color: var(--white);
  transition: background .3s, color .3s, box-shadow .3s;
}
.nav__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; font-size: 1.05rem; letter-spacing: .01em; }
.brand strong { font-weight: 700; }
.brand__stripe {
  width: 14px; height: 34px; border-radius: 3px;
  background: linear-gradient(to bottom, var(--blue) 0 33%, var(--white) 33% 66%, var(--green) 66% 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.nav__menu { display: flex; align-items: center; gap: 1.4rem; }
.nav__menu a { color: inherit; text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .92; }
.nav__menu a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.nav__cta {
  padding: .45rem 1rem; border-radius: 999px;
  background: var(--blue); color: var(--white) !important; opacity: 1 !important;
}
.nav__cta:hover { background: var(--blue-dark); text-decoration: none !important; }
.nav__toggle { display: none; }

/* Nav nach dem Scrollen: weisser Balken */
.nav.is-scrolled { background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.nav.is-scrolled .brand__stripe { box-shadow: 0 0 0 1px rgba(0,0,0,.12); }

/* ---------- Hero mit Slideshow ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--white);
  background: var(--brown);
  overflow: hidden;
  isolation: isolate;
}
.hero__slides, .hero__slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.hero__slide { opacity: 0; transition: opacity 1.8s ease-in-out; z-index: 0; will-change: opacity; }
.hero__slide.is-active { opacity: 1; z-index: 1; }
/* Gleichmässiger Zoom (Ken-Burns) als Übergang statt Animation: läuft beim Ausblenden
   weiter und kehrt erst danach langsam zurück – kein Springen, kein Stocken.
   Dauer = Anzeigedauer (6 s) + Überblendung (1.8 s). */
.hero__slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02);
  transition: transform 8s linear;
  will-change: transform;
  backface-visibility: hidden;
}
/* is-zoom wird per JS gesetzt: beim Einblenden (auch für das erste Bild nach dem Laden)
   und bleibt während des Ausblendens erhalten, damit der Zoom weiterläuft */
.hero__slide.is-zoom img { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
  .hero__slide img { transition: none; transform: none; }
  .hero__slide.is-active img { transform: none; }
}

.hero__overlay {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to top, rgba(20,16,12,.82) 0%, rgba(20,16,12,.45) 40%, rgba(20,16,12,.05) 70%, rgba(20,16,12,.35) 100%);
}

.hero__content {
  position: relative; z-index: 3;
  width: 100%; max-width: var(--container); margin: 0 auto;
  padding: calc(var(--nav-h) + var(--topbar-h) + 40px) 20px 110px;
}
.hero__eyebrow {
  margin: 0 0 .4rem;
  text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 600; opacity: .85;
}
.hero__title {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  font-weight: 800;
  margin: 0 0 .4em;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero__lead {
  max-width: 34rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
  margin-bottom: 1.6rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Hinweis-Banner (aus dem Admin-Bereich) */
.banner {
  display: block; width: fit-content; max-width: 40rem;
  margin: 0 0 1.2rem; padding: .7rem 1rem;
  border-radius: 8px; border-left: 5px solid #f5b400;
  background: rgba(255, 247, 224, .96); color: #4a3300;
  font-weight: 600; text-shadow: none;
}

/* Status-Badge */
.status {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0 0 1.4rem;
  padding: .4rem .9rem .4rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: .9rem; font-weight: 600;
}
.status__dot { width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; }
.status--open .status__dot { background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.25); }
.status--closed .status__dot { background: #f87171; box-shadow: 0 0 0 4px rgba(248,113,113,.25); }

/* Punkte zum Bildwechsel */
.hero__dots {
  position: absolute; right: 24px; bottom: 28px; z-index: 4;
  display: flex; gap: .25rem;
}
.hero__dot {
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; display: grid; place-items: center;
}
.hero__dot::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85); background: transparent;
  transition: background .2s, transform .2s;
}
.hero__dot:hover::before { transform: scale(1.15); }
.hero__dot:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.hero__dot.is-active::before { background: var(--white); }

/* Scroll-Hinweis */
.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; z-index: 4;
  width: 26px; height: 42px; margin-left: -13px;
  border: 2px solid rgba(255,255,255,.7); border-radius: 14px;
}
.hero__scroll::after {
  content: ""; position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--white);
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0%   { transform: translateY(0);   opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero__scroll::after { animation: none; } }

/* ---------- Sektionen ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--alt { background: var(--white); }
.kicker {
  margin: 0 0 .5rem;
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--blue);
}
.facts { padding-left: 1.2rem; margin: 0 0 1em; }
.facts li { margin: .25em 0; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--reverse .split__text { order: 2; }
.split__media { margin: 0; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.prices { width: 100%; border-collapse: collapse; background: var(--cream); border-radius: var(--radius); overflow: hidden; }
.prices caption { text-align: left; font-weight: 700; padding: 0 0 .6rem; }
.prices th, .prices td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--sand); }
.prices td { text-align: right; font-weight: 600; white-space: nowrap; }
.prices tr:last-child th, .prices tr:last-child td { border-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 1.6rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); border-top: 4px solid var(--green);
}
.card:nth-child(2) { border-top-color: var(--blue); }
.card:nth-child(3) { border-top-color: var(--brown); }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); }

.placeholder {
  display: grid; place-items: center; gap: 1rem;
  min-height: 260px; margin: 1.5rem 0;
  border: 2px dashed var(--sand); border-radius: var(--radius);
  color: var(--muted); font-weight: 600;
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(0,0,0,.02) 14px 28px);
}
/* Karte (Google Maps, erst nach Klick geladen) */
.map {
  position: relative; min-height: 340px; height: 100%;
  border-radius: var(--radius); overflow: hidden; background: var(--sand);
  box-shadow: var(--shadow);
}
.map__consent {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-content: center; gap: .8rem;
  text-align: center; padding: 1.5rem;
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(0,0,0,.03) 14px 28px);
}
.map__consent p { margin: 0; max-width: 26rem; color: var(--muted); }
.map__consent p strong { color: var(--ink); font-size: 1.1rem; }
.map__consent .btn { justify-self: center; }
.map__link { font-size: .9rem; }
.map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }

/* Meldungen (Kontaktformular) */
.alert { padding: .8rem 1rem; border-radius: 8px; font-weight: 500; margin: 0; }
.alert--success { background: #e6f6ec; color: #1d6b3a; border: 1px solid #b9e3c8; }
.alert--error { background: #fdecea; color: #922b21; border: 1px solid #f5c2bd; }

.contact { font-style: normal; line-height: 1.8; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form input, .form textarea {
  font: inherit; padding: .7rem .9rem; border: 1px solid #cfd6dc; border-radius: 8px; background: var(--white);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form .btn { justify-self: start; }
.form__captcha input { max-width: 8rem; }
.form__note { font-size: .85rem; color: var(--muted); margin: 0; }
/* Honeypot-Feld: für Menschen unsichtbar */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Unterseiten (Impressum) */
.page__main { padding-top: calc(var(--nav-h) + var(--topbar-h) + 2rem); }
.page__narrow { max-width: 760px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c9d1d9; padding: 3.5rem 0 2rem; }
.footer a { color: var(--white); }
.footer__inner { display: grid; grid-template-columns: 1fr auto auto; gap: 2.5rem; align-items: center; }
.footer__btv { display: flex; align-items: center; gap: 1.4rem; }
.footer__btv img { background: var(--white); padding: .6rem; border-radius: 8px; width: 150px; height: auto; }
.footer__btv p { margin: 0; max-width: 28rem; }
.footer__sponsor { display: flex; flex-direction: column; gap: .4rem; font-size: .8rem; color: #8b949e; }
.footer__sponsor img { width: 120px; height: auto; border-radius: 6px; }
.footer__links { display: flex; flex-direction: column; gap: .4rem; text-align: right; }
.footer__copy { grid-column: 1 / -1; margin: 1.5rem 0 0; font-size: .85rem; color: #8b949e; border-top: 1px solid #30363d; padding-top: 1.2rem; }

/* ---------- Mobile ---------- */
/* Navigation: Burger-Menü schon unter 1100 px, weil Marke, sechs Menüpunkte und
   Telefon-Knopf nebeneinander erst ab ca. 1000 px Platz haben; 100 px Reserve für Scrollbalken und Schriftgrösse. */
@media (max-width: 1100px) {
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer;
  }
  .nav__toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 0 auto; transition: transform .2s, opacity .2s; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__menu {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); color: var(--ink);
    box-shadow: 0 10px 20px rgba(0,0,0,.1);
    display: none;
  }
  .nav.is-open .nav__menu { display: flex; }
  .nav.is-open { background: var(--white); color: var(--ink); }
  .nav__menu a { padding: .9rem 20px; border-top: 1px solid var(--sand); }
  .nav__cta { margin: .8rem 20px 1rem; text-align: center; }
}

@media (max-width: 860px) {

  .hero { min-height: 92vh; min-height: 92svh; }
  .topbar__link { white-space: normal; }
  .hero__content { padding-bottom: 90px; }
  .hero__dots { right: auto; left: 20px; }
  .hero__scroll { display: none; }

  .split, .cols, .cards, .footer__inner { grid-template-columns: 1fr; }
  .split--reverse .split__text { order: 0; }
  .footer__links { text-align: left; }
  .map { min-height: 300px; }
  .footer__btv { flex-direction: column; align-items: flex-start; }
}

/* ---------- Belegungskalender (Wochenansicht) ---------- */
.week { margin: 1.5rem 0; }
.week__bar { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.week__nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.week__title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.week__jump { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; }
.week__jump input { font: inherit; padding: .45rem .6rem; border: 1px solid var(--sand); border-radius: 7px; background: var(--white); color: var(--ink); }
.week__jump input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.week__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.day {
  display: grid; align-content: start; gap: .1rem; width: 100%; min-height: 150px; padding: .7rem .6rem;
  background: var(--cream); border: 1px solid var(--sand); border-radius: var(--radius);
  text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.day:hover { border-color: var(--blue); }
.day:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.day[disabled] { cursor: default; opacity: .55; }
.day[disabled]:hover { border-color: var(--sand); }
.day.is-today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.day.is-selected { background: var(--white); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,111,179,.25); }
.day__name { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day__num { font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.day__num small { font-size: .8rem; font-weight: 600; color: var(--muted); margin-left: .25rem; }
.day__chips { display: grid; gap: .3rem; margin-top: .5rem; }
.chip { display: inline-block; padding: .18rem .5rem; border-radius: 6px; font-size: .76rem; font-weight: 600; line-height: 1.3; background: #e8ecf0; color: #4a5560; }
.chip--free { background: transparent; color: var(--green); border: 1px dashed rgba(47,122,78,.5); }
.chip--belegt { background: #fdecea; color: #922b21; }
.chip--geschlossen { background: #e8ecf0; color: #4a5560; }
.chip--anlass { background: #e2eefc; color: #1a4f8a; }
.week__legend { display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.week__selected { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 1rem 0 0; padding: .8rem 1rem; background: var(--cream); border-radius: var(--radius); }
.week__selected[hidden] { display: none; }
.week__selected span { font-weight: 600; }
.week + .btn { margin-top: .5rem; }
.btn--outline { background: transparent; color: var(--blue-dark); border-color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: var(--white); }
.btn--outline[disabled] { opacity: .4; cursor: default; }
.btn--outline[disabled]:hover { background: transparent; color: var(--blue-dark); }
.btn--small { padding: .5rem 1rem; font-size: .9rem; }
@media (max-width: 860px) {
  .week__bar { justify-content: flex-start; }
  .week__grid { grid-template-columns: 1fr; gap: .4rem; }
  .day { grid-template-columns: 4.8rem 1fr; align-items: center; min-height: 0; padding: .6rem .8rem; }
  .day__name, .day__num { grid-column: 1; }
  .day__chips { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; margin: 0; }
}
