/* Ferienwohnung Brigitte Liebel – Stylesheet */

@font-face {
    font-family: 'Lobster';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/lobster-latin.woff2') format('woff2');
}

:root {
    --dunkelblau: #004466;
    --blau: #00709e;        /* Kontrast auf Weiß 5,4:1 (WCAG AA) */
    --hellblau: #e6f4fa;
    --text: #2b2b2b;
    --grau: #5f5f5f;
    --linie: #d0d7dc;
    --frei: #c9ecc4;
    --belegt: #f3b9b4;
    --radius: 10px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
    background: #6a8fa8 url('../img/hintergrund.webp') no-repeat center top fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

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

a { color: var(--blau); }
a:hover { color: var(--dunkelblau); }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--dunkelblau); color: #fff; padding: .6rem 1rem; border-radius: 0 0 6px 6px;
}
.skip-link:focus { top: 0; color: #fff; }

/* Hauptcontainer */
.main-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    padding: 20px 28px 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin: 20px 0 0;
    max-width: 1200px;
    width: 95%;
}

/* Kopfbereich */
.header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}
.header-logo img { width: 70px; }
.header-content { display: flex; flex-direction: column; }
.header-title {
    font-family: 'Lobster', cursive;
    font-size: 2.5rem;
    line-height: 1.1;
    color: var(--dunkelblau);
}
.header-subtitle { font-size: .95rem; color: var(--grau); margin-top: 4px; }
.header-stars img { width: 100px; display: block; }

/* Navigation */
.nav { border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.nav-bar {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 4px;
}
.nav-bar a {
    display: block;
    text-decoration: none;
    color: var(--blau);
    padding: 6px 10px;
    border-radius: 5px;
    transition: color .2s, background-color .2s;
}
.nav-bar a:hover { background: var(--dunkelblau); color: #fff; }
.nav-bar a.active { background: var(--blau); color: #fff; font-weight: bold; }

.menu-toggle {
    display: none;
    width: 100%;
    margin: 10px 0;
    padding: 10px 15px;
    border: 0;
    border-radius: 5px;
    background: var(--blau);
    color: #fff;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}
.menu-toggle::before { content: '☰  '; }
.menu-toggle[aria-expanded="true"]::before { content: '✕  '; }

/* Inhalt */
.content { padding-top: 20px; }
.content h1, .content h2 {
    font-family: 'Lobster', cursive;
    font-weight: normal;
    color: var(--dunkelblau);
    line-height: 1.2;
}
.content h1 { font-size: 2.2rem; margin: 0 0 .6em; }
.content h2 { font-size: 1.7rem; margin: 1.4em 0 .5em; }
.content h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; color: var(--dunkelblau); }
.content p { margin: 0 0 1em; }
.content section + section { margin-top: .5em; }
.klein { font-size: .9rem; color: var(--grau); }
.hinweis { background: var(--hellblau); padding: 1rem; border-radius: 6px; }

.liste { padding-left: 1.3em; margin: 0 0 1em; }
.liste li { margin: .25em 0; }

.fakten {
    list-style: none;
    padding: 0;
    margin: 1.5em 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}
.fakten li {
    background: var(--hellblau);
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
}
.fakten strong { display: block; color: var(--dunkelblau); font-size: 1.15rem; }

.button {
    display: inline-block;
    background: var(--blau);
    color: #fff;
    border: 2px solid var(--blau);
    border-radius: 6px;
    padding: .6em 1.2em;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--dunkelblau); border-color: var(--dunkelblau); color: #fff; }
.button-zweit { background: #fff; color: var(--blau); }
.aktion { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.5em 0; }

/* Tabellen */
.tabelle { border-collapse: collapse; width: 100%; max-width: 640px; margin: 0 0 1em; }
.tabelle th, .tabelle td { text-align: left; padding: .55em .8em; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-weight: normal; }
.tabelle td { white-space: nowrap; font-weight: bold; text-align: right; }

/* Slider */
.slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto 28px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
    background: #ddd;
}
.slides { display: grid; aspect-ratio: 3 / 2; }
.slide {
    grid-area: 1 / 1;
    margin: 0;
    opacity: 0;
    transition: opacity .8s ease-in-out;
}
.slide.aktiv { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider-steuerung {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 6px;
}
.slider-steuerung button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.slider-steuerung .slider-pause { font-size: .8rem; }
.slider-steuerung button:hover { background: rgba(0, 0, 0, .8); }

/* Wohnung */
.wohnung-container { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.wohnung-image { flex: 1 1 340px; margin: 0; }
.wohnung-image img { display: block; width: 100%; border: 1px solid var(--linie); }
.wohnung-image figcaption { font-size: .9rem; color: var(--grau); margin-top: 6px; }
.wohnung-text { flex: 1 1 420px; }

/* Galerie */
.galerie {
    list-style: none;
    padding: 0;
    margin: 0 0 1em;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.galerie-breit { grid-template-columns: 1fr; }
.galerie a { display: block; border-radius: 6px; overflow: hidden; }
.galerie img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform .3s;
}
.galerie-breit img { aspect-ratio: auto; }
.galerie a:hover img { transform: scale(1.04); }
.panorama { margin: 1em 0; }
.panorama img { border-radius: 6px; display: block; }

/* Lightbox */
.lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox-inhalt {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 60px;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox button {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .35); }
.lightbox .lb-schliessen { top: 10px; right: 10px; }
.lightbox .lb-zurueck { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-weiter { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-zaehler { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #ddd; font-size: .9rem; }

/* Belegungskalender */
.kalender {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin: 0 0 1em;
}
.kalender-monat { border-collapse: collapse; width: 100%; font-size: .9rem; }
.kalender-monat caption { font-weight: bold; color: var(--dunkelblau); padding-bottom: 4px; }
.kalender-monat th { font-weight: normal; color: var(--grau); padding: 2px 0; }
.kalender-monat abbr { text-decoration: none; }
.kalender-monat td { text-align: center; padding: 4px 0; border: 2px solid #fff; }
.kalender-monat td.frei { background: var(--frei); }
.kalender-monat td.belegt { background: var(--belegt); }
.kalender-monat td.anreise { background: linear-gradient(135deg, var(--frei) 50%, var(--belegt) 50%); }
.kalender-monat td.abreise { background: linear-gradient(135deg, var(--belegt) 50%, var(--frei) 50%); }
.kalender-monat td.vergangen { color: #aaa; background: #f3f3f3; }
.kalender-legende { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; }
.kalender-legende span { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; border: 1px solid #bbb; }
.kalender-legende .frei { background: var(--frei); }
.kalender-legende .belegt { background: var(--belegt); }
.kalender-legende .anreise { background: linear-gradient(135deg, var(--frei) 50%, var(--belegt) 50%); }
.kalender-legende .abreise { background: linear-gradient(135deg, var(--belegt) 50%, var(--frei) 50%); }

/* Klassifizierung */
.klassifizierung { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.klassifizierung img { flex: 0 1 360px; border-radius: 6px; }
.klassifizierung div { flex: 1 1 320px; }

/* Eingebettete Inhalte (Karte, Veranstaltungen) – erst nach Klick laden */
.einbettung {
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    background: var(--hellblau);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.einbettung-hinweis { max-width: 560px; padding: 24px; text-align: center; }
.einbettung iframe { width: 100%; border: 0; display: block; }
.karte iframe { height: 480px; }
.karte-statisch { margin: 1.2em 0 .4em; }
.karte-statisch .einbettung { min-height: 0; background: #f2efe9; }
.karte-statisch img { display: block; width: 100%; height: auto; }
.karte-statisch figcaption { font-size: .85rem; color: var(--grau); margin-top: 6px; text-align: right; }

/* Datenschutz-Fenster vor dem Laden externer Inhalte */
.datenschutz-dialog {
    max-width: 520px;
    width: calc(100% - 32px);
    border: 0;
    border-radius: var(--radius);
    padding: 24px 26px 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    color: var(--text);
}
.datenschutz-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.datenschutz-dialog h2 { font-family: 'Lobster', cursive; font-weight: normal; color: var(--dunkelblau); margin: 0 0 .6em; font-size: 1.6rem; }
.datenschutz-dialog .aktion { margin: 1.2em 0 .8em; }
.veranstaltungen iframe { height: 700px; }

/* Formular */
.formular { max-width: 720px; }
.feldgruppe { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; border: 0; padding: 0; margin: 0; }
fieldset.feldgruppe legend { font-weight: bold; padding: 0; margin-bottom: 6px; }
.feld { margin-bottom: 16px; }
.feld label { display: block; font-weight: bold; margin-bottom: 4px; }
.feld input, .feld select, .feld textarea {
    width: 100%;
    font: inherit;
    padding: .55em .7em;
    border: 1px solid #8a959c;
    border-radius: 5px;
    background: #fff;
}
.feld [aria-invalid="true"] { border-color: #b3261e; border-width: 2px; }
.feld-fehler { display: block; color: #b3261e; font-size: .9rem; margin-top: 4px; }
.feld-checkbox { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.feld-checkbox input { width: 20px; height: 20px; margin-top: 3px; }
.feld-checkbox label { font-weight: normal; }
.feld-checkbox .feld-fehler { grid-column: 2; }
.optional { font-weight: normal; color: var(--grau); }
.honigtopf { position: absolute; left: -9999px; }
.meldung { padding: 1rem 1.2rem; border-radius: 6px; margin-bottom: 1.2rem; }
.meldung.erfolg { background: #e3f4df; border: 1px solid #7bbf72; }
.meldung.fehler { background: #fbe6e4; border: 1px solid #d9827a; }

/* Fußzeile */
.footer {
    text-align: center;
    margin: 16px 0 24px;
    font-size: .9rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.footer p { margin: 4px 0; }
.footer a { color: #fff; }

/* Mittlere Bildschirme */
@media (max-width: 1100px) {
    .nav-bar a { padding: 5px 7px; font-size: .95rem; }
}

/* Kleine Bildschirme */
@media (max-width: 860px) {
    body { background-attachment: scroll; }
    .main-container { width: 100%; margin: 0; border-radius: 0; padding: 14px 16px 24px; }
    .header-title { font-size: 1.8rem; }
    .header-logo img { width: 54px; }
    .header-stars img { width: 80px; }
    .menu-toggle { display: block; }
    .nav { border: 0; }
    .nav-bar { display: none; flex-direction: column; padding: 0 0 10px; }
    .nav-bar.offen { display: flex; }
    .nav-bar a { padding: 10px 14px; border-bottom: 1px solid var(--linie); border-radius: 0; }
    .content h1 { font-size: 1.8rem; }
    .content h2 { font-size: 1.45rem; }
    .lightbox-inhalt { padding: 56px 8px; }
    .lightbox .lb-zurueck, .lightbox .lb-weiter { top: auto; bottom: 6px; transform: none; }
}

@media print {
    body { background: none; }
    .nav, .slider, .skip-link, .einbettung, .footer a { display: none; }
    .main-container { box-shadow: none; width: 100%; }
}

/* Hinweis-Kasten (z. B. Veranstaltungen) */
.hinweis-kasten {
    background: var(--hellblau);
    border-left: 5px solid var(--blau);
    border-radius: 6px;
    padding: 18px 22px 6px;
    margin: 1.5em 0;
    max-width: 760px;
}
.content .hinweis-kasten h2 { margin-top: 0; }
