/* Ferienwohnung & Zimmer Hersbruck – statische Version
   Schriften lokal eingebunden (keine Verbindung zu Google Fonts) */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/raleway-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/raleway-latin-700-normal.woff2") format("woff2"); }

:root {
  --aubergine: #442244;
  --footer: #312f38;
  --text: #424753;
  --link: #2f8586;        /* dunkler als Original #4db2b3 – Kontrast auf Weiß ≥ 4,5:1 */
  --link-footer: #4db2b3; /* Original-Türkis, auf dunklem Footer ausreichend Kontrast */
  --white: #fff;
  --maxw: 1200px;
  --font-text: "Raleway", Helvetica, Tahoma, Geneva, Arial, sans-serif;
  --font-head: "Lato", Helvetica, Tahoma, Geneva, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.2rem;           /* 19,2 px wie im Original */
  line-height: 2;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; }

a { color: var(--link); }
a:hover, a:focus-visible { color: var(--aubergine); }
:focus-visible { outline: 3px solid #e0a800; outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); color: var(--aubergine);
  padding: .5rem 1rem; z-index: 100; font-family: var(--font-head); font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Kopf / Navigation ---------- */
.site-nav {
  background: var(--aubergine);
  color: var(--white);
  text-align: center;
  padding: 1.25rem 0 .9rem;
}
.site-title {
  display: block;
  margin: 0 0 1.4rem;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  line-height: 1.4;
  color: var(--white);
  text-decoration: none;
}
.site-title:hover, .site-title:focus-visible { color: var(--white); }

.main-menu {
  list-style: none; margin: 0 auto; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .2rem 1.1rem;
  max-width: var(--maxw);
}
.main-menu a {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 2;
  color: var(--white); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.main-menu a:hover, .main-menu a:focus-visible, .main-menu a[aria-current="page"] {
  color: var(--white); border-bottom-color: var(--white);
}
@media (max-width: 700px) {
  .main-menu { justify-content: center; }
}

.page-header img {
  display: block; width: 100%;
  height: clamp(180px, 34vw, 530px);
  object-fit: cover;
}

/* ---------- Inhalt ---------- */
main { padding: 3rem 0 4rem; }
main .container { max-width: calc(var(--maxw) - 280px); }

h1, h2, h3 { font-family: var(--font-head); color: var(--text); line-height: 1.5; margin: 1.6rem 0 .8rem; }
h1 { font-size: 2.25rem; font-weight: 700; margin-top: 0; }
h2 { font-size: 1.9rem; font-weight: 400; }
h3 { font-size: 1.5rem; font-weight: 700; }
main > .container > h1:first-child, main > .container > h2:first-child { margin-top: 0; }
h2.sub { font-size: 1.9rem; font-weight: 400; margin-top: 0; }
/* Rechtstexte: Abschnittsüberschriften einheitlich */
.legal h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.2rem; }
.legal h1 + h2 { margin-top: 1rem; }

p { margin: 1rem 0; }
ul { padding-left: 1.3rem; }
strong, b { font-weight: 700; }

.clearfix::after { content: ""; display: table; clear: both; }

.float-right {
  float: right; width: 48%; max-width: 500px;
  margin: .4rem 0 1.5rem 2rem;
}
.room { clear: both; margin: 0 0 2.5rem; }
.room::after { content: ""; display: table; clear: both; }
@media (max-width: 760px) {
  .float-right { float: none; width: 100%; max-width: 100%; margin: .5rem 0 1rem; display: block; }
}

.lageplan { display: block; margin-top: 1.5rem; }

table.bewertung { border-collapse: collapse; width: 100%; max-width: 760px; margin: 1rem 0; }
table.bewertung th, table.bewertung td { border: 1px solid #d7d9de; padding: .4rem .8rem; text-align: left; vertical-align: top; }
table.bewertung th { background: #f4f0f4; font-family: var(--font-head); }
table.bewertung td:last-child { white-space: nowrap; }

.address { font-style: normal; }

/* ---------- Galerie ---------- */
.gallery {
  display: flex; flex-wrap: wrap; gap: 2px;
  list-style: none; margin: 1.5rem 0; padding: 0;
}
.gallery li { flex: 1 1 260px; height: 200px; margin: 0; } /* JS setzt Breite nach Seitenverhältnis */
.gallery::after { content: ""; flex-grow: 999; } /* letzte Reihe nicht aufziehen */
.gallery a { display: block; height: 100%; }
.gallery img {
  display: block; height: 100%; width: 100%; min-width: 120px;
  object-fit: cover;
  transition: opacity .2s;
}
.gallery a:hover img, .gallery a:focus-visible img { opacity: .85; }
@media (max-width: 600px) { .gallery li { height: 120px; } }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; margin: 0;
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  background: rgba(20, 16, 22, .94); color: var(--white);
}
.lightbox::backdrop { background: rgba(20, 16, 22, .94); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 92vw; }
.lightbox img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; box-shadow: 0 4px 30px rgba(0,0,0,.5); }
.lightbox figcaption { font-family: var(--font-head); font-size: 1rem; margin-top: .6rem; }
.lb-btn {
  position: absolute; background: rgba(0,0,0,.35); color: var(--white);
  border: 0; border-radius: 50%; width: 3rem; height: 3rem;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255,255,255,.2); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Fuß ---------- */
.site-footer {
  background: var(--footer); color: var(--white);
  padding: 2.5rem 0 2rem; font-size: 1rem; line-height: 2;
}
.footer-grid {
  display: grid; gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: start;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--link-footer); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--white); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.to-top { color: var(--white) !important; font-family: var(--font-head); font-weight: 700; font-size: .85rem; text-decoration: none; }
.to-top:hover, .to-top:focus-visible { text-decoration: underline; }

/* Unterseiten: Seitenüberschrift wie im Original (Lato, normal) */
main h1:not(.start) { font-size: 1.9rem; font-weight: 400; }
