/* =========================================================
   Gasthaus Zur Guten Quelle – ein Stylesheet für alle Seiten
   ========================================================= */


/* ---------- 1. Farben ---------- */
:root {
    --paper:  #ffffff;
    --ink:    #293d32;
    --muted:  #576157;
    --accent: #95613f;
    --line:   #d9ddd1;
    --wash:   #edf0e7;
}


/* ---------- 2. Grundlagen ---------- */
* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 18px/1.65 Arial, Helvetica, sans-serif;
}

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

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 18px;
    hyphens: auto;
    overflow-wrap: break-word;
}
h1 { font-size: clamp(34px, 3.8vw, 48px); }

p { margin: 0 0 18px; }
em { color: var(--accent); }
address { font-style: normal; }
dl, dd { margin: 0; }

a { color: inherit; text-underline-offset: 5px; }

button { font: inherit; color: inherit; cursor: pointer; }

a:hover,
button:hover { color: var(--accent); }

a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }


/* ---------- 3. Wiederverwendbare Bausteine ---------- */
.container { width: min(1240px, 100% - 80px); margin-inline: auto; }

.skip-link { position: absolute; left: 20px; top: -100px; padding: 12px; background: #fff; }
.skip-link:focus { top: 10px; }

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.lead { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.button {
    display: inline-block;
    padding: 12px 16px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
.button-outline { background: transparent; color: var(--ink); }
.button:hover { background: #405445; color: #fff; }

.link { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 5px; }


/* ---------- 4. Kopfbereich und Navigation ---------- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    padding-block: 23px;
    border-bottom: 1px solid var(--line);
}
.logo img { width: 142px; }

.nav { position: relative; }
.nav summary {
    padding: 10px 16px;
    border: 1px solid var(--line);
    cursor: pointer;
    list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav nav {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 10;
    width: 260px;
    padding: 10px;
    background: var(--paper);
    border: 1px solid var(--line);
}
.nav a,
.nav button {
    display: block;
    width: 100%;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    text-align: left;
    text-decoration: none;
}
.nav nav > :last-child { border-bottom: 0; }
.nav a[aria-current] { font-weight: 700; }

@supports selector(::details-content) {
    @media (min-width: 801px) {
        .nav summary,
        .kategorien summary { display: none; }
        .nav::details-content,
        .kategorien::details-content { content-visibility: visible; }
        .nav nav { position: static; display: flex; align-items: flex-start; gap: 22px; width: auto; padding: 0; background: none; border: 0; }
        .nav a,
        .nav button { width: auto; padding: 12px 0; border: 0; font-size: 14px; }
        .nav a[aria-current] { font-weight: 400; border-bottom: 2px solid var(--accent); }
    }
}


/* ---------- 5. Startseite: Begrüßung (Hero) ---------- */
.hero { display: grid; min-height: 430px; margin-block: 30px; }
.hero > * { grid-area: 1 / 1; }

.hero img {
    width: 100%;
    height: 0;
    min-height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

.hero-text {
    align-self: center;
    max-width: 585px;
    margin: 32px;
    padding: 30px;
    background: var(--paper);
    border-left: 3px solid var(--accent);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }


/* ---------- 6. Startseite: Aktuelle Hinweise ---------- */
.hinweise { padding-block: 22px 38px; border-top: 1px solid var(--line); }
.hinweise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 40px; }
.hinweise h2 { font-size: 14px; }
.hinweise h3 { font-size: 17px; margin-bottom: 7px; }
.hinweise p,
.hinweise ul { margin: 0 0 10px; color: var(--muted); font-size: 16px; }
.hinweise ul,
.page ul { padding-left: 20px; }

.hinweise h2,
.hinweise h3,
.site-footer h2 { font-family: Arial, Helvetica, sans-serif; font-weight: 700; }


/* ---------- 7. Fußbereich ---------- */
.site-footer {
    padding-bottom: 20px;
    background: var(--wash);
    font-size: 15px;
}

.infoleiste {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 36px;
    margin: 0 auto 30px;
    padding: 18px 0 14px;
    list-style: none;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}
.infoleiste li::before { content: "•"; margin-right: 8px; color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px 48px; }
.site-footer h2 { font-size: 16px; margin-bottom: 13px; }
.site-footer p,
.site-footer address { margin: 0 0 10px; }
.site-footer a { overflow-wrap: anywhere; }

.hours div { display: flex; justify-content: space-between; gap: 15px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.hours div:first-child { padding-top: 0; }
.hours div:last-child { border-bottom: 0; }
.hours dd { text-align: right; }

.phone { display: inline-block; font-size: 22px; font-weight: 700; line-height: 1.35; text-decoration: none; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}
.footer-bottom nav { display: flex; gap: 25px; }


/* ---------- 8. Reservierungsdialog ---------- */
.dialog {
    width: min(760px, 100% - 24px);
    padding: 30px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
}
.dialog::backdrop { background: rgb(20 30 24 / .6); }
html:has(.dialog[open]) { overflow: hidden; }

.dialog h2 { font-size: 33px; }

.dialog-close {
    display: block;
    margin-left: auto;
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: none;
    font-size: 14px;
}

.dialog iframe { display: block; width: 100%; height: 450px; border: 1px solid var(--line); }

.dish-start {
    display: grid;
    place-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--wash);
    text-align: center;
}
.dish-start p { max-width: 460px; }


/* ---------- 9. Unterseiten (Impressum, Datenschutz) ---------- */
.page { padding-block: 45px 60px; }
.page section { max-width: 760px; margin-top: 36px; }
.page h2 { font-size: 26px; }


/* ---------- 10. Gasthaus-Seite ---------- */
.gasthaus { padding-block: 45px 60px; }
.gasthaus section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.gasthaus h2 { font-size: 32px; }
.gasthaus h3 { font-size: 21px; margin-bottom: 8px; }

.zweispaltig {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 40px;
    align-items: center;
}

.zweispaltig + .karten { margin-top: 40px; }
.karten > div { padding-top: 16px; border-top: 3px solid var(--accent); }
.karten p { margin: 0; color: var(--muted); font-size: 16px; }

.raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 24px;
}
.raster + p { margin-top: 24px; }

/* Muss NACH .raster stehen: gleich spezifisch → die spätere Regel gewinnt */
.karten { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

figure { margin: 0; }
.raster img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }


/* ---------- 11. Speisekarte ---------- */
.seitenkopf { padding-block: 60px 45px; border-bottom: 1px solid var(--line); }
.seitenkopf .lead { max-width: 660px; }
.seitenkopf .lead:last-child { margin-bottom: 0; }

.karte { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 65px; padding-block: 30px 90px; }

.kategorien { position: sticky; top: 20px; align-self: start; scroll-margin-top: 20px; }
.kategorien nav { max-height: calc(100vh - 100px); overflow-y: auto; }
.kategorien summary { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; cursor: pointer; }
.kategorien nav { display: flex; flex-direction: column; }
.kategorien a { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.3; text-decoration: none; hyphens: auto; }
.kategorien span { min-width: 20px; color: var(--accent); font-size: 11px; }
.kategorien p { margin-top: 20px; }

.kategorie { margin-bottom: 65px; scroll-margin-top: 20px; }
.kategorie > header { display: flex; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.nummer { padding-top: 24px; color: var(--accent); font: italic 30px Georgia, serif; }
.kategorie .eyebrow { margin-bottom: 8px; font-size: 10px; }
.kategorie h2 { margin: 0; font-size: 36px; }
.hinweis { margin: 15px 0 0; color: var(--muted); font-size: 15px; }

.gerichte {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    column-gap: 35px;
}
.gericht {
    display: grid;
    grid-template-rows: auto auto 1fr;
    padding-block: 26px;
    border-bottom: 1px solid var(--line);
}
.gericht h3 { margin-bottom: 10px; font-size: 25px; }
.gericht p { margin-bottom: 14px; color: var(--muted); font-size: 16px; }

.preis, .preise { grid-row: 3; align-self: end; }

.gericht .preis { margin: 0; color: var(--ink); font-size: 18px; font-weight: 700; text-align: right; }
.preise div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-size: 15px; }
.preise div + div { margin-top: 7px; }
.preise dt { color: var(--muted); }
.preise dd { font-size: 18px; font-weight: 700; white-space: nowrap; }

/* Einträge mit Foto */
.mit-bild { grid-template-columns: 120px minmax(0, 1fr); column-gap: 20px; }
.mit-bild > * { grid-column: 2; }
.mit-bild h3 { grid-column: 1 / -1; }
.mit-bild img {
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: start;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.fussnote { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.zurueck { display: none; margin-top: 18px; color: var(--muted); font-size: 13px; text-decoration: none; }


/* ---------- 12. Anpassungen für kleinere Bildschirme ---------- */

/* Tablet */
@media (max-width: 800px) {
    .container { width: calc(100% - 40px); }
    .hero-text { margin: 20px; padding: 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }

    .seitenkopf { padding-block: 40px 30px; }
    .karte { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .kategorien { position: static; }
    .kategorien nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 25px; max-height: none; }
    .zurueck { display: inline-block; }
    .kategorie h2 { font-size: 30px; }
}

/* Handy */
@media (max-width: 560px) {
    body { font-size: 17px; }
    .site-header { padding-block: 16px; }
    .logo img { width: 123px; }

    .hero { min-height: 0; margin-top: 20px; }
    .hero > * { grid-area: auto; }
    .hero img { height: 200px; min-height: 0; }
    .hero-text { margin: -30px 12px 0; padding: 22px 18px; border-left: 0; border-top: 3px solid var(--accent); }
    .actions { flex-direction: column; }

    .hinweise-grid,
    .footer-grid { grid-template-columns: 1fr; }

    .dialog { padding: 18px; }

    .kategorie > header { gap: 12px; }
    .kategorie h2 { font-size: 27px; }
    .nummer { padding-top: 22px; font-size: 22px; }
    .gericht h3 { font-size: 22px; }
    .mit-bild { grid-template-columns: 84px minmax(0, 1fr); column-gap: 14px; }
}
