@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/lato-300.woff2') format('woff2');
}
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/lato-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/lato-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/playfair-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/playfair-700.woff2') format('woff2');
}

:root {
    /* Eine gemeinsame Maßachse für Hero-Foto, Öffnungszeiten-Kasten und
       Textspalte. Vorher hing das Foto an 70% der Fensterbreite, der Kasten
       an 17% und die Spalte an festen 860px — deckungsgleich war das nur bei
       rund 1230px Fensterbreite, darüber lief alles auseinander. */
    --spalte: min(100vw - 48px, 980px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Lato', sans-serif;
    color: #333;
}

/* ── ACCESSIBILITY HELPERS ── */
.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;
    top: -100px;
    left: 0;
    background: #3a7d1e;
    color: #fff;
    padding: 12px 20px;
    z-index: 3000;
    text-decoration: none;
    font-weight: 700;
    border-bottom-right-radius: 6px;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #ffeb3b;
    outline-offset: -3px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #3a7d1e;
    outline-offset: 2px;
    border-radius: 2px;
}

#closePopup:focus-visible {
    outline: 3px solid #ffeb3b;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── HERO (erste Bildschirmseite wie bisher) ── */
#hero {
    position: relative;
    min-height: 100vh;
    background-image: url('hintergrund.png');
    background-size: var(--spalte) auto;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/* Öffnungszeiten-Kasten */
#oeffnungszeiten {
    text-align: left;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: absolute;
    bottom: 120px;
    left: max(16px, calc(50% - var(--spalte) / 2 + 24px));
    max-width: 300px;
}

#oeffnungszeiten h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    margin-bottom: 10px;
}

#oeffnungszeiten p {
    font-size: 18px;
    margin-bottom: 5px;
}

/* Scroll-Hinweis */
#scrollHint {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #555;
    text-align: center;
    text-decoration: none;
    animation: bounce 2s infinite;
}
#scrollHint:hover { color: #3a7d1e; }
#scrollHint::after {
    content: '▼';
    display: block;
    font-size: 18px;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ── HERO FOOTER ── */
#heroFooter {
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    position: absolute;
    bottom: 0;
}
/* Desktop: Impressum-Leiste bleibt beim Scrollen am unteren Rand
   sichtbar; mobil wäre die mehrzeilige Leiste zu hoch dafür. */
@media (min-width: 768px) {
    #heroFooter {
        position: fixed;
        background-color: rgba(255, 255, 255, 0.92);
        z-index: 1000;
    }
}
#heroFooter address {
    font-style: normal;
    display: inline;
}
#heroFooter a { color: inherit; }

/* ── POPUP ── */
#festtagsPopup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#popupContent {
    background: linear-gradient(135deg, #3a7d1e 0%, #6aab35 100%);
    color: white;
    border-radius: 15px;
    padding: 40px 30px;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#closePopup {
    position: absolute;
    top: 15px; right: 15px;
    width: 35px; height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #3a7d1e;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

#closePopup:hover { background-color: #fff; transform: rotate(90deg) scale(1.1); }
#closePopup::before, #closePopup::after {
    content: '';
    position: absolute;
    width: 18px; height: 2px;
    background-color: #3a7d1e;
}
#closePopup::before { transform: rotate(45deg); }
#closePopup::after  { transform: rotate(-45deg); }

#popupContent h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #fff;
    text-align: center;
}
#popupContent h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    margin: 25px 0 15px 0;
    color: #ffeb3b;
    border-bottom: 2px solid #ffeb3b;
    padding-bottom: 5px;
}
#popupContent p  { font-size: 16px; line-height: 1.6; margin: 10px 0; }
#popupContent ul { list-style: none; padding: 0; margin: 15px 0; }
#popupContent li { font-size: 15px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.2); }
#popupContent li:last-child { border-bottom: none; }

.highlight-box {
    background-color: rgba(255, 235, 59, 0.2);
    border-left: 4px solid #ffeb3b;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}
.highlight-box p  { margin: 5px 0; font-weight: bold; }
.highlight-box h3 { margin-top: 0; }

.contact-info {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    #popupContent { max-width: 90%; padding: 30px 20px; max-height: 90vh; }
    #popupContent h2 { font-size: 24px; }
    #popupContent h3 { font-size: 18px; }
    #popupContent p, #popupContent li { font-size: 14px; }
}

/* ── SEO CONTENT SECTION ── */
#seo-content {
    background: #f9f6f0;
    padding: 60px 24px;
}
/* Platz für die fixierte Impressum-Leiste (Desktop) */
@media (min-width: 768px) {
    #seo-content { padding-bottom: 130px; }
}

.seo-inner {
    width: var(--spalte);
    max-width: 100%;
    margin: 0 auto;
}

#seo-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    color: #3a7d1e;
    margin-bottom: 12px;
}

#seo-content .lead {
    font-size: 18px;
    font-weight: 300;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.7;
}

.produkte-grid {
    display: grid;
    /* 240px statt 180px: bei 980px Spaltenbreite ergibt das drei Spalten,
       also zwei volle Reihen für die sechs Karten statt 4 + 2. */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

/* Ohne das kippt das Raster auf dem Handy auf eine einzige Spalte — die
   240px-Untergrenze passt dort nicht mehr zweimal nebeneinander. */
@media (max-width: 600px) {
    .produkte-grid { grid-template-columns: repeat(2, 1fr); }
}

.produkt-card {
    background: white;
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.produkt-card .icon { font-size: 32px; margin-bottom: 8px; }
.produkt-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    color: #3a7d1e;
    margin-bottom: 6px;
}
.produkt-card p { font-size: 14px; color: #666; font-weight: 300; }

/* Marken */
.marken-section { margin-bottom: 48px; }
.marken-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    color: #3a7d1e;
    margin-bottom: 12px;
}
.marken-grid {
    display: grid;
    /* 150px ergibt bei 980px sechs Spalten: die 17 Marken füllen 6 + 6 + 5
       statt eine letzte Reihe mit einem einzelnen Eintrag. */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.marke-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    font-size: 15px;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    line-height: 1.5;
}
.marke-item span { font-size: 13px; color: #777; font-weight: 300; }

/* FAQ */
.faq-section { margin-bottom: 48px; }

.faq-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    color: #3a7d1e;
    margin-bottom: 24px;
}

.faq-item {
    background: white;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.faq-item h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.faq-item p { font-size: 15px; color: #555; line-height: 1.6; font-weight: 300; }

/* ── ZU GAST IN QUEDLINBURG ── */
.gaeste {
    background: white;
    border-left: 5px solid #3a7d1e;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

#seo-content .gaeste h2 {
    font-size: 26px;
    margin-bottom: 14px;
}

.gaeste p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    font-weight: 300;
    margin-bottom: 12px;
}
.gaeste p:last-child { margin-bottom: 0; }

/* ── ANFAHRT UND KARTE ── */
.anfahrt { margin-bottom: 48px; }

#seo-content .anfahrt h2 {
    font-size: 26px;
    margin-bottom: 16px;
}

.anfahrt p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    font-weight: 300;
    margin-bottom: 12px;
}
.anfahrt-adresse { color: #333; }

.karte-link {
    display: block;
    margin: 20px 0 8px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.karte-link picture { display: block; }
.karte-link img { display: block; width: 100%; height: auto; }

.karte-quelle { font-size: 12.5px; color: #888; line-height: 1.6; }
.karte-quelle a { color: #3a7d1e; }

/* ── EFRE-Förderhinweis ── */
.efre-box {
    border-top: 1px solid #e0dbd0;
    padding-top: 24px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.efre-logos { display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.efre-eu { height: 34px; width: 51px; display: block; }
.efre-claim { font-size: 11px; line-height: 1.3; font-weight: 700; color: #333; }
.efre-land { height: 34px; width: auto; display: block; }
.efre-text { flex: 1 1 auto; min-width: 0; }
#seo-content .efre h2 {
    font-family: 'Lato', sans-serif;
    font-size: 17px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 700;
}
.efre-text p { font-size: 14.5px; line-height: 1.6; color: #555; font-weight: 300; margin-bottom: 8px; }
.efre-meta { font-size: 12px; color: #888; }
@media (max-width: 640px) {
    .efre-box { flex-direction: column; gap: 16px; }
    .efre-logos { flex-direction: row; align-items: center; gap: 14px; }
}

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 16px 24px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    color: #555;
    line-height: 1.7;
}

/* ── SPRACHUMSCHALTER ── */
.lang-switch {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 1500;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 7px 12px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.lang-switch a {
    color: #3a7d1e;
    text-decoration: none;
    font-weight: 700;
}

.lang-switch a:hover { text-decoration: underline; }

.lang-switch [aria-current="page"] {
    color: #333;
    font-weight: 700;
}

@media (max-width: 480px) {
    .lang-switch {
        position: static;
        margin: 10px auto 0;
        justify-content: center;
        border-radius: 0;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.75);
    }
}
