/* ============================================================
   Ferienhaus – zentrales Stylesheet
   Farben & Abstände zentral über CSS-Variablen steuerbar.
   ============================================================ */

:root {
  --color-bg: #fbf9f5;
  --color-surface: #ffffff;
  --color-text: #2b2b28;
  --color-text-soft: #5f5c55;
  --color-accent: #4a7c6f;      /* ruhiges Waldgrün */
  --color-accent-dark: #35594f;
  --color-border: #e6e1d8;

  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(43, 43, 40, 0.08);
  --shadow-hover: 0 10px 34px rgba(43, 43, 40, 0.16);

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }

p { margin: 0 0 1em; color: var(--color-text-soft); }

a { color: var(--color-accent-dark); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }

.text-center { text-align: center; }

.lead {
  font-size: 1.15rem;
  max-width: 60ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background .2s ease, transform .2s ease;
}

.btn:hover { background: var(--color-accent-dark); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--color-accent-dark);
  border: 1.5px solid var(--color-accent);
}

.btn--ghost:hover { background: var(--color-accent); color: #fff; }

/* ---------- Header / Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 245, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
}

.brand span { color: var(--color-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--color-text-soft);
  font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-text);
  border-color: var(--color-accent);
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: .5rem 1.25rem 1rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .7rem 0; width: 100%; border-bottom: 1px solid var(--color-border); }
}

/* ---------- Slideshow (eigenständige Bild-Sektion) ---------- */

.slideshow-section {
  position: relative;
  height: min(68vh, 560px);
  overflow: hidden;
  background: #f5f0e6;
  border-bottom: 1px solid var(--color-border);
}

.slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slide.is-active { opacity: 1; }

/* Logo-Slide: Logo vollständig zeigen statt beschneiden */
.slide--logo {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.slideshow-dots {
  position: absolute;
  z-index: 2;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
}

.slideshow-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .65);
  box-shadow: 0 0 4px rgba(0, 0, 0, .35);
  cursor: pointer;
  padding: 0;
}

.slideshow-dots button.is-active { background: #fff; }

@media (max-width: 640px) {
  .slideshow-section { height: 52vh; }
}

/* ---------- Karten-Kacheln ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card__img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #cdd8d2, #9db5ac);
  background-size: cover;
  background-position: center;
}

.card__body { padding: 1.2rem 1.3rem 1.4rem; }

.card__body h3 { margin-bottom: .25rem; }
.card__body p { margin: 0; font-size: .95rem; }

.card__arrow {
  margin-top: .8rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

/* ---------- Besitzerin-Vorstellung ---------- */

.owner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.owner__photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 55%;
  background: linear-gradient(135deg, #d9c7b3, #c2a883);
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .owner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* ---------- Info-Listen (Ausstattung etc.) ---------- */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  /* auto-fill (statt auto-fit) haelt leere Spalten -> alle Listen im Ausstattungs-
     block haben dieselbe Spaltenzahl, die Haekchen stehen exakt untereinander */
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: start;
  gap: .75rem 1.5rem;
}

.feature-list li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--color-text-soft);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  line-height: inherit;
  color: var(--color-accent);
  font-weight: 700;
}

/* ---------- Galerie ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.gallery img:hover,
.gallery img:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  outline: none;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: clamp(.5rem, 3vw, 2rem);
  background: rgba(20, 20, 18, .92);
}

.lightbox[aria-hidden="true"] { display: none; }

.lightbox__stage {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  background: #000;
}

.lightbox__caption {
  color: rgba(255, 255, 255, .85);
  font-size: .95rem;
  text-align: center;
}

.lightbox__btn {
  flex: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}

.lightbox__btn:hover { background: rgba(255, 255, 255, .28); }

.lightbox__close {
  position: absolute;
  top: clamp(.5rem, 2vw, 1.25rem);
  right: clamp(.5rem, 2vw, 1.25rem);
}

.lightbox__count {
  position: absolute;
  bottom: clamp(.5rem, 2vw, 1.25rem);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .7);
  font-size: .85rem;
  letter-spacing: .05em;
}

@media (max-width: 560px) {
  .lightbox__prev { left: .4rem; }
  .lightbox__next { right: .4rem; }
  .lightbox__prev,
  .lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* ---------- Video-Rundgang ---------- */

.video-tour {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #000;
  overflow: hidden;
}

.video-tour iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Preistabelle ---------- */

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-table th,
.price-table td {
  padding: .9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.price-table th { background: #f1ede4; font-family: var(--font-head); }
.price-table tr:last-child td { border-bottom: 0; }
.price-table td:first-child { font-weight: 600; width: 45%; }

/* ---------- Belegungskalender ---------- */

.calendar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  max-width: 720px;
}

.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.calendar__title { font-family: var(--font-head); font-size: 1.2rem; }

.calendar__nav {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
}

.calendar__nav:hover { background: #f1ede4; }

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar__weekday {
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-soft);
  padding: .3rem 0;
}

.calendar__day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .9rem;
  background: #f4f1ea;
}

.calendar__day--empty { background: transparent; }

/* frei – leichtes Grün */
.calendar__day--free { background: #e7f3ea; color: #2f6b46; }

/* gebucht – leichtes Rot */
.calendar__day--booked { background: #fbe3df; color: #b23c2b; }

/* nicht verfügbar – grau, durchgestrichen */
.calendar__day--unavailable {
  background: #e9e7e2;
  color: #8a867d;
  text-decoration: line-through;
}

.calendar__day--past { opacity: .4; }

.calendar__legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--color-text-soft);
}

.calendar__legend span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.calendar__legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.swatch-free { background: #e7f3ea; }
.swatch-booked { background: #fbe3df; }
.swatch-unavailable { background: #e9e7e2; }

/* ---------- Footer ---------- */

.site-footer {
  background: #2b2b28;
  color: #cfccc4;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.site-footer a { color: #e7e3d9; }

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.site-footer h3 { color: #fff; font-size: 1rem; }

.site-footer .footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #444039;
  font-size: .85rem;
  width: 100%;
}

/* ---------- Hilfsklassen ---------- */

.stack > * + * { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
