/* Ferienwohnungen Magdalena – Stylesheet
   Layout: eine ruhige Spalte (max 1120px), rote Akzente nur für Marke, Links und Buchungs-Buttons.
   Schriften werden selbst gehostet (fonts/), es wird nichts von Google geladen. Lizenz: SIL OFL 1.1 */

@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --red: #672525;        /* Markenrot der bisherigen Seite */
  --red-dark: #4c1a1a;
  --red-soft: #f3e9e8;   /* sehr helle Rot-Fläche */
  --bg: #faf8f7;
  --surface: #ffffff;
  --fg: #241b1a;
  --muted: #6c5f5d;
  --line: #e4dcda;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.3rem, 5vw, 3.4rem);

  --radius: 6px;
  --wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; max-width: 65ch; }

a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.muted { color: var(--muted); }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px; flex-wrap: wrap;
}
.brand {
  display: flex; flex-direction: column; text-decoration: none; color: var(--fg); line-height: 1.1;
}
.brand strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--red); }
.brand span { font-size: var(--step--1); color: var(--muted); letter-spacing: 0.04em; }
.nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; border: 1.5px solid var(--red);
  transition: background .15s, color .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--red); }
.btn-ghost:hover { background: var(--red-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Bild-Platzhalter (bis die Fotos da sind) ---------- */
.ph {
  position: relative; background: var(--red-soft);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(103,37,37,.05) 14px 15px);
  border-radius: var(--radius); overflow: hidden; max-width: 100%;
  display: flex; align-items: flex-end;
}
.ph::after {
  content: attr(data-label);
  margin: 12px; padding: 3px 8px; font-size: var(--step--1);
  background: var(--surface); color: var(--muted); border-radius: 4px;
}

/* ---------- Sections ---------- */
section { padding-block: clamp(48px, 8vw, 88px); }
.section-head { display: grid; gap: 10px; margin-bottom: 32px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* Hero */
.hero { padding-block: clamp(32px, 6vw, 64px) 0; }
.hero-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
.hero-text { display: grid; gap: 18px; align-content: start; min-width: 0; }
.hero-text .lead { font-size: var(--step-1); color: var(--muted); }
.hero .ph { aspect-ratio: 16 / 9; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 5fr 6fr; align-items: center; }
  .hero .ph { aspect-ratio: 4 / 3; }
}

/* Faktenleiste */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-top: 40px;
}
.facts div { background: var(--surface); padding: 16px 18px; display: grid; gap: 2px; }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 0; font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }

/* Wohnungskarten */
.apartments { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.apt {
  display: grid; gap: 12px; text-decoration: none; color: var(--fg);
  grid-template-rows: auto 1fr;
}
.apt .ph { aspect-ratio: 4 / 3; transition: transform .2s; }
.apt:hover .ph { transform: translateY(-3px); }
.apt-body { display: grid; gap: 4px; align-content: start; }
.apt h3 { color: var(--red); }
.apt-meta { color: var(--muted); }
.apt-price { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Zwei Spalten Text */
.split { display: grid; gap: 32px; }
.split > * { min-width: 0; display: grid; gap: 14px; align-content: start; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { padding-left: 26px; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .55em;
  width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

/* Saison-Kacheln */
.seasons { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.season { display: grid; gap: 14px; align-content: start; }
.season .ph { aspect-ratio: 3 / 2; }

/* Kontakt-Block */
.contact { background: var(--red); color: #fff; }
.contact a { color: #fff; }
.contact .eyebrow { color: #f0d4d2; }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 3fr 2fr; align-items: end; } }
.contact-lines { display: grid; gap: 6px; font-size: var(--step-1); }
.contact .btn-primary { background: #fff; color: var(--red); border-color: #fff; }
.contact .btn-primary:hover { background: var(--red-soft); color: var(--red-dark); }
.contact .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.contact .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Footer */
.site-footer { padding-block: 48px; font-size: var(--step--1); color: var(--muted); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h2 { font-size: var(--step-0); color: var(--fg); margin-bottom: 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--red); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Wohnungs-Detailseite ---------- */
.breadcrumb { font-size: var(--step--1); color: var(--muted); padding-top: 24px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { color: var(--muted); }

.apt-head { display: grid; gap: 12px; padding-block: 20px 28px; }
.apt-head .lead { font-size: var(--step-1); color: var(--muted); }

.gallery { display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(90px, 14vw, 170px); }
.gallery .ph:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
}

.detail { display: grid; gap: 48px; padding-block: 48px 72px; }
.detail-main { display: grid; gap: 56px; min-width: 0; }
.detail-main > section { padding: 0; display: grid; gap: 18px; }
@media (min-width: 960px) {
  .detail { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}

.aside-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: grid; gap: 14px;
}
@media (min-width: 960px) { .aside-card { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); } }
.aside-card .price { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; color: var(--red); }
.aside-card .btn { justify-content: center; }
.aside-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.aside-card dt { color: var(--muted); }
.aside-card dd { margin: 0; text-align: right; font-weight: 600; }

.feature-groups { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature-groups > div { display: grid; gap: 8px; align-content: start; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: var(--step--1); color: var(--muted); font-weight: 600; background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.peak td { background: var(--red-soft); }
caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: var(--step--1); color: var(--muted); }

.notes { display: grid; gap: 6px; font-size: var(--step--1); color: var(--muted); padding-left: 18px; margin: 0; }

.packages { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.package { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; align-content: start; background: var(--surface); }
.package .when { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }

.other-apts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.other-apts a {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  text-decoration: none; display: grid; gap: 2px; background: var(--surface);
}
.other-apts a span { color: var(--muted); font-size: var(--step--1); }
.other-apts a:hover { border-color: var(--red); }

/* Rechtstexte */
.legal { display: grid; gap: 16px; padding-block: 48px 72px; hyphens: auto; overflow-wrap: break-word; }
.legal h2 { font-size: var(--step-2); margin-top: 16px; }
.legal h4 { font-size: var(--step-1); margin: 8px 0 0; font-family: var(--font-display); }

/* ---------- Bilder ---------- */
.media { display: block; width: 100%; height: auto; max-width: 100%; object-fit: cover; border-radius: var(--radius); background: var(--red-soft); }
.hero .media { aspect-ratio: 16 / 9; }
@media (min-width: 860px) { .hero .media { aspect-ratio: 4 / 3; } }
.apt .media { aspect-ratio: 4 / 3; transition: transform .2s; }
.apt:hover .media { transform: translateY(-3px); }
.season .media { aspect-ratio: 3 / 2; }
.ratio-43 { aspect-ratio: 4 / 3; }
@media (prefers-reduced-motion: reduce) { .apt .media, .apt:hover .media { transition: none; transform: none; } }

.award { display: flex; align-items: center; gap: 14px; }
.award img { width: 56px; height: auto; border-radius: 4px; }
.award p { font-size: var(--step--1); color: var(--muted); line-height: 1.4; }
.award strong { display: block; color: var(--fg); font-size: var(--step-0); }

/* Galerie auf der Wohnungsseite */
.gallery a { display: block; position: relative; border-radius: var(--radius); overflow: hidden; }
.gallery a:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery a:nth-child(n+6) { display: none; }
.gallery .more::after {
  content: attr(data-more); position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(36, 27, 26, .55); color: #fff; font-weight: 600; font-size: var(--step-1);
}
@media (max-width: 600px) {
  .gallery a:first-child { grid-column: span 2; grid-row: span 2; }
  .gallery a:nth-child(n+4) { display: none; }
  .gallery a:nth-child(3)::after {
    content: attr(data-more-mobile); position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(36, 27, 26, .55); color: #fff; font-weight: 600;
  }
  .gallery .more::after { content: none; }
}
.floorplan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(20, 14, 13, .92); }
.lightbox figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.lightbox figcaption { color: #eee; padding-top: 10px; font-size: var(--step--1); }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%;
  width: 44px; height: 44px; font-size: 22px; cursor: pointer; line-height: 1;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(16px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(16px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }

/* Fixes */
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; }
.detail-main > section, .detail-main > section > * { min-width: 0; }
.feature-groups { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.packages { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.other-apts { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.apartments { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.seasons { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.legal > * { min-width: 0; }
.legal h1 { font-size: clamp(1.75rem, 7.5vw, 3.4rem); }
h1, h2 { hyphens: auto; overflow-wrap: break-word; }
.hero-text > * { min-width: 0; }
@media (max-width: 360px) { h1 { font-size: 2rem; } }
.brand img { display: block; width: 152px; height: auto; }
@media (max-width: 400px) { .brand img { width: 128px; } }
.impressions { display: grid; gap: 16px; margin-top: 48px; }

/* Header am Handy: Logo oben, Navigation einzeilig und seitlich wischbar */
@media (max-width: 700px) {
  .site-header .wrap { padding-block: 8px; row-gap: 6px; }
  .brand img { width: 120px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 18px; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; }
  .nav .btn { padding: 6px 14px; }
}
.book-mobile { display: none; }
@media (max-width: 700px) {
  .book-mobile { display: inline-flex; padding: 7px 14px; color: #fff; }
  .book-mobile:hover { color: #fff; }
  .nav .btn { display: none; }
}
