/* ==========================================================
   Claudias Ferienapartment – Stylesheet
   Aufbau angelehnt an das Template "Hot Coffee",
   Farben, Schriften und Logo aus dem Flyer (Strindbergstraße)
   ========================================================== */

/* ---------- Schriften (lokal, DSGVO-konform) ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/montserrat-v31-latin_latin-ext-regular.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/montserrat-v31-latin_latin-ext-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/montserrat-v31-latin_latin-ext-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/montserrat-v31-latin_latin-ext-700.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/oswald-v57-latin_latin-ext-500.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/oswald-v57-latin_latin-ext-700.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/caveat-v23-latin_latin-ext-600.woff2") format("woff2"); }

/* ---------- Farben & Grundwerte (aus dem Flyer) ---------- */
:root {
  --blue: #1797c6;         /* Flyer-Blau (Logo, Flächen) */
  --blue-dark: #0e6f94;    /* für Text und Buttons auf Weiß */
  --blue-deep: #0f7aa5;    /* Flächen mit weißer Schrift (gut lesbar) */
  --ink: #34404a;          /* dunkles Schiefergrau */
  --ink-soft: #5d6f82;     /* Graublau wie "FERIENAPARTMENT" */
  --grey: #f6f6f6;         /* helle Flyer-Fläche */
  --line: #e3e7ea;
  --white: #ffffff;
  --dark: #22303a;
  --shadow: 0 10px 30px rgba(34, 48, 58, .14);
  --sans: "Montserrat", "Segoe UI", Arial, sans-serif;
  --condensed: "Oswald", "Arial Narrow", Arial, sans-serif;
  --script: "Caveat", "Segoe Print", cursive;   /* Handschrift, SIL Open Font License */
  --header-h: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }  /* <picture> nur als Hülle für WebP + JPG, beeinflusst das Layout nicht */
a { color: var(--blue-dark); }
h1, h2, h3 { font-family: var(--sans); color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.script { font-family: var(--script); font-weight: 600; color: var(--blue); line-height: 1.1; }
.small { font-size: .85rem; color: var(--ink-soft); }
/* Eigener Hintergrund (WebP, mit JPG als Rückfall) */
.texture {
  background-color: var(--grey);
  background-image: url("../img/hintergrund.jpg");   /* Rückfall für sehr alte Browser */
  background-image: image-set(url("../img/hintergrund.webp") type("image/webp"), url("../img/hintergrund.jpg") type("image/jpeg"));
  background-position: center; background-size: cover;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .9em 1.9em;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--blue-dark);
  border: 2px solid var(--blue-dark);
  border-radius: 3px;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover, .btn:focus-visible { background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--white); }
.btn-light { background: var(--white); border-color: var(--white); color: var(--blue-deep); text-transform: none; letter-spacing: .02em; font-size: 1.05rem; }
.btn-light:hover, .btn-light:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--white); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .06); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

/* Logo wie im Flyer: Dach + CLAUDIAS + FERIENAPARTMENT */
.logo {
  display: flex; flex-direction: column; align-items: center;
  width: 138px;
  text-decoration: none;
  line-height: 1;
  transition: transform .3s, width .3s;
}
.logo-dach { width: 100%; height: auto; margin-bottom: 1px; }
.logo-name {
  font-family: var(--condensed); font-weight: 700;
  font-size: 1.95rem; letter-spacing: .06em;
  color: var(--blue); text-transform: uppercase;
  margin-top: -2px;
}
.logo-sub {
  font-family: var(--condensed); font-weight: 500;
  font-size: .98rem; letter-spacing: .03em;
  color: var(--ink-soft); text-transform: uppercase;
  margin-top: 2px;
}
.logo:hover { transform: translateY(-2px); }
.site-header.scrolled .logo { width: 116px; }
.site-header.scrolled .logo-name { font-size: 1.62rem; }
.site-header.scrolled .logo-sub { font-size: .82rem; }

.main-nav { display: flex; align-items: center; gap: 2.2rem; }
.main-nav a {
  position: relative;
  font-size: .82rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  padding: .3em 0;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--blue); transform: scaleX(0); transition: transform .25s;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav .nav-cta { padding: .6em 1.3em; background: var(--blue-dark); color: var(--white); border-radius: 3px; }
.main-nav .nav-cta::after { display: none; }
.main-nav .nav-cta:hover { background: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 6px 0; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Nur für Bildschirmleser, unsichtbar */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Sprachauswahl (Flagge + Ausklappliste) ---------- */
.main-nav { margin-left: auto; }
.lang-switch { position: relative; margin-left: 1.6rem; }
.lang-current {
  display: none; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 10px;
  font: 600 .8rem var(--sans); letter-spacing: .08em; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 3px; cursor: pointer;
}
.lang-current:hover { border-color: var(--ink); }
.lang-current img, .lang-list img { width: 24px; height: 16px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.lang-caret { font-size: .7rem; transition: transform .2s; }
.lang-switch.open .lang-caret { transform: rotate(180deg); }
/* ohne JavaScript: Flaggen nebeneinander */
.lang-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.lang-list a { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; }
/* mit JavaScript: Knopf mit Ausklappliste */
.js .lang-current { display: flex; }
.js .lang-list {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 180px; padding: 6px 0;
  background: var(--white); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow);
}
.js .lang-switch.open .lang-list { display: block; }
.js .lang-list a { padding: .6em 1.1em; }
.js .lang-list a:hover, .js .lang-list a:focus-visible { background: var(--grey); outline-offset: -3px; }
.lang-list a[aria-current] { font-weight: 700; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 70px 0 0; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.hero-pre { font-size: clamp(2.2rem, 3.8vw, 2.9rem); margin: 0 0 .15em; }
.hero h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.08;
}
.hero-post { font-size: clamp(2rem, 3.4vw, 2.6rem); margin: .25em 0 .8em; }
.hero-lead { font-size: 1.05rem; font-weight: 500; color: var(--ink); max-width: 32em; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }

/* Foto mit blauer Fläche dahinter, wie die Farbflächen im Flyer */
.hero-photo { position: relative; z-index: 0; }
.hero-photo::before {
  content: ""; position: absolute; right: -24px; top: -24px; width: 45%; height: 60%;
  background: var(--blue); z-index: -1;
}
.polaroid {
  margin: 0;
  background: var(--white);
  padding: 14px 14px 10px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}
.polaroid figcaption { text-align: center; font-size: 1.6rem; padding-top: 8px; }
.polaroid-right { transform: rotate(-2deg); }

/* "Hereinspaziert!" mittig zwischen Foto und blauer Leiste (gleicher Abstand oben und unten) */
.hero-hint {
  display: flex; align-items: flex-end; justify-content: center; gap: 12px;
  width: max-content; margin: 0 auto;
  padding: 54px 0 44px;   /* oben +10 px: das schräge Foto ragt unten etwas heraus */
  text-decoration: none;
}
.hero-hint .script { font-size: 2.6rem; color: var(--blue); line-height: 1; }
.hero-hint img { width: 40px; transition: transform .3s; }
.hero-hint:hover img { transform: translateY(5px); }

/* ---------- Fakten ---------- */
.facts { background: var(--blue-deep); color: var(--white); }
.facts-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.fact { display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 26px 10px; border-right: 1px solid rgba(255, 255, 255, .25); }
.fact:last-child { border-right: 0; }
.fact strong { display: block; font-family: var(--condensed); font-weight: 700; font-size: 2rem; letter-spacing: .03em; line-height: 1.2; }
.fact span { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.45; text-wrap: balance; }

/* ---------- Sektionen ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--grey); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-pre { font-size: 2.2rem; margin: 0; }
.section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  margin: .3em 0 1.2em;
}
.section-head .section-title { margin-bottom: 0; }
.section-head .section-title::after,
.split-text .section-title::after {
  content: ""; display: block; width: 46px; height: 3px; background: var(--blue); margin: 16px auto 0;
}
.split-text .section-title::after { margin-left: 0; }
.lead { font-size: 1.2rem; font-weight: 500; color: var(--ink); line-height: 1.6; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.split-reverse .split-text { order: 2; }

.photo-stack { position: relative; margin: 0; padding: 0 0 70px 60px; }
.photo-stack img { box-shadow: var(--shadow); border: 10px solid var(--white); }
.stack-back { width: 78%; margin-left: auto; transform: rotate(3deg); }
.stack-front { position: absolute; left: 0; bottom: 0; width: 64%; transform: rotate(-3deg); }

/* ---------- Ausstattung ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature {
  background: var(--white);
  padding: 34px 24px 28px;
  text-align: center;
  border-radius: 4px;
  border-top: 3px solid var(--blue);
  box-shadow: 0 2px 0 var(--line);
  transition: transform .3s, box-shadow .3s;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.icon { width: 50px; height: 50px; margin: 0 auto 16px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1rem; font-weight: 700; margin-bottom: .6em; }
.feature p { font-size: .92rem; margin: 0; line-height: 1.65; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item { position: relative; display: block; overflow: hidden; border-radius: 3px; aspect-ratio: 3 / 2; background: var(--grey); }
.gallery-item.wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery-item.span2 { grid-column: span 2; aspect-ratio: auto; }
.gallery-item.wide img, .gallery-item.span2 img { position: absolute; inset: 0; }  /* Zeilenhöhe kommt von den Nachbarbildern */
.gallery-item.span2 img { object-position: center 62%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-item::after {
  content: "+"; position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 3rem; font-weight: 300; color: var(--white);
  background: rgba(23, 151, 198, .45);
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; }

/* ---------- Lage ---------- */
.distances { list-style: none; padding: 0; margin: 1.6em 0 .6em; }
.distances li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: .65em 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}
.distances li { flex-wrap: wrap; }  /* lange Angaben rutschen auf schmalen Handys in eine eigene Zeile */
.distances strong { font-weight: 700; color: var(--blue-dark); white-space: nowrap; margin-left: auto; }

/* ---------- Kontakt ---------- */
.contact { background: var(--blue-deep); color: var(--white); padding: 110px 0; text-align: center; }
.contact-inner { max-width: 680px; }
.contact-pre { font-size: clamp(2.3rem, 5vw, 3.2rem); color: var(--white); margin: 0; }
.contact .section-title { color: var(--white); }
.contact p { font-weight: 500; }
.contact-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: .6em; }
.btn-outline-light { background: transparent; border-color: var(--white); color: var(--white); text-transform: none; letter-spacing: .02em; font-size: 1.05rem; }
.btn-outline-light span { color: #ffd54a; }
.btn-outline-light:hover, .btn-outline-light:focus-visible { background: var(--white); border-color: var(--white); color: var(--blue-deep); }
.contact-name { margin-top: 1.6em; font-family: var(--script); font-weight: 600; font-size: 2rem; color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255, 255, 255, .6); font-size: .85rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 26px 0; }
.footer-inner p { margin: 0; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 28, 34, .94);
  padding: 50px 70px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); margin: 0 auto; box-shadow: 0 10px 50px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: rgba(255, 255, 255, .8); margin-top: 12px; font-size: .9rem; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--white);
  font-size: 3rem; line-height: 1; cursor: pointer; padding: 10px 16px; opacity: .75;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 10px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); font-size: 4rem !important; }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); font-size: 4rem !important; }

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.page-head { padding: 70px 0 60px; text-align: center; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.legal { padding: 70px 0 100px; }
.legal .container { max-width: 800px; }
.legal h2 { font-size: 1.15rem; margin: 2em 0 .6em; }
.legal h3 { font-size: 1rem; margin: 1.6em 0 .4em; }
.legal address { font-style: normal; color: var(--ink); }
.back-link { margin-top: 3em; }

/* ---------- Einblend-Animation ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(3, 1fr); }
  .fact:nth-child(3) { border-right: 0; }
  .fact:nth-child(-n+3) { border-bottom: 1px solid rgba(255, 255, 255, .25); }
  .split { gap: 50px; }
  .main-nav { gap: 1.5rem; }
}

@media (max-width: 860px) {
  :root { --header-h: 76px; }
  .logo, .site-header.scrolled .logo { width: 104px; }
  .logo-name, .site-header.scrolled .logo-name { font-size: 1.45rem; }
  .logo-sub, .site-header.scrolled .logo-sub { font-size: .74rem; }

  .nav-toggle { display: block; order: 3; }
  .lang-switch { order: 2; margin-left: auto; margin-right: 6px; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .08);
    padding: 8px 16px 20px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; text-align: center; padding: .9em 0; font-size: .9rem; }
  .main-nav a::after { display: none; }
  .main-nav .nav-cta { margin-top: 10px; width: auto; padding: .7em 2em; }

  .hero { padding: 40px 0 0; }
  .hero-hint { padding: 42px 0 36px; }
  .hero-hint .script { font-size: 2.2rem; }
  .hero-hint img { width: 34px; }
  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero-text { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-photo { max-width: 560px; margin: 0 auto; width: 100%; }
  .hero-photo::before { right: -12px; top: -12px; }
  .split-reverse .split-text { order: 0; }
  .split-text .section-title::after { margin-left: auto; }
  .split-text { text-align: center; }
  .distances { text-align: left; }
  .split-media { max-width: 560px; margin: 0 auto; width: 100%; }
  .section { padding: 80px 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: .95rem; }
  .hero h1 { font-size: 2rem; }
  .features { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact { border-right: 1px solid rgba(255, 255, 255, .25) !important; border-bottom: 1px solid rgba(255, 255, 255, .25); padding: 20px 8px; }
  .fact:nth-child(2n) { border-right: 0 !important; }
  .fact strong { font-size: 1.65rem; }
  .fact:nth-last-child(-n+2) { border-bottom: 0; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item.wide, .gallery-item.span2 { grid-column: auto; grid-row: auto; aspect-ratio: 3 / 2; }
  .photo-stack { padding: 0 0 50px 20px; }
  .lightbox { padding: 50px 10px; }
  .lb-prev, .lb-next { top: auto !important; bottom: 4px; transform: none !important; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* Sehr schmale Handys: lange Wörter in der Faktenleiste (z. B. „Parcheggio“) passen sicher */
@media (max-width: 380px) {
  .fact strong { font-size: 1.4rem; }
}
