/* ===== Bauernstube Hillesheim — Shared Stylesheet ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Rustic warm palette (Dark = default) */
    --bg: #1a1410;
    --bg-elevated: #221a14;
    --bg-card: #2a201a;
    --bg-light: #f5efe6;
    --text: #e8ddd0;
    --text-dark: #2a201a;
    --text-muted: #c4a896;
    --text-muted-light: #a0856f;
    --accent: #c89b3c;
    --accent-hover: #e0b85c;
    --accent-dim: rgba(200, 155, 60, 0.12);
    --accent-dark: #a87f28;
    --border: #3a2e26;
    --border-light: #d4c5b0;
    --card: #2a201a;
    --nav-bg: rgba(26, 20, 16, 0.92);
    --radius: 10px;
    --radius-lg: 16px;
    --max-width: 1100px;
    --font-display: "Georgia", "Times New Roman", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --success: #7ee787;
    --error: #ff8a7b;
    --section-pad: clamp(3rem, 8vw, 5rem);
}

/* ===== Light Theme ===== */
[data-theme="light"] {
    --bg: #f5efe6;
    --bg-elevated: #ebe3d6;
    --bg-card: #ffffff;
    --bg-light: #f5efe6;
    --text: #2a201a;
    --text-dark: #2a201a;
    --text-muted: #5a4a3e;
    --text-muted-light: #7a6858;
    --accent: #9a7020;
    --accent-hover: #b88a2e;
    --accent-dim: rgba(154, 112, 32, 0.12);
    --accent-dark: #9a7020;
    --border: #d4c5b0;
    --border-light: #d4c5b0;
    --card: #ffffff;
    --nav-bg: rgba(245, 239, 230, 0.92);
    --success: #2ea043;
    --error: #d73a49;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent); color: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
section { padding: var(--section-pad) 0; }

/* ===== Typography ===== */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); margin-bottom: .5rem; }
h4 { font-size: 1rem; margin-bottom: .5rem; }
p { max-width: 70ch; }

/* ===== Skip Link (Accessibility) ===== */
.skip-link { position: absolute; top: -100px; left: 0; background: var(--accent); color: var(--bg); padding: .75rem 1.5rem; z-index: 200; border-radius: 0 0 8px 0; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 0; }

/* ===== Focus States (Accessibility) ===== */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.form-group input:focus-visible, .form-group textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
a:focus-visible, button:focus-visible { outline-offset: 3px; }

/* ===== Navigation ===== */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); transition: background .3s; }
nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: .5rem; }
.logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: .95rem; font-weight: 500; position: relative; padding: .5rem 0; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active::after { content: ""; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-cta { background: var(--accent); color: var(--bg) !important; padding: .55rem 1.2rem; border-radius: 8px; font-weight: 600; font-size: .9rem; transition: background .2s, transform .2s; }
.nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.nav-cta.active { background: var(--accent-hover); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: .5rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* Theme toggle button */
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--text); transition: background .2s, border-color .2s, transform .2s; flex-shrink: 0; }
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 768px) {
    .nav-links { position: fixed; top: 68px; left: 0; right: 0; background: var(--bg-elevated); flex-direction: column; padding: 1.5rem; gap: 1rem; border-bottom: 1px solid var(--border); transform: translateY(-100%); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s; }
    .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-toggle { display: flex; }
    .logo { font-size: 1.1rem; }
}

/* ===== Hero ===== */
.hero { min-height: 90vh; display: flex; align-items: center; padding-top: 68px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,20,16,0.92), rgba(26,20,16,0.7)), url('assets/img/theke.jpg') center/cover no-repeat; z-index: 0; }
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: var(--accent-dim); border: 1px solid rgba(200, 155, 60, 0.3); padding: .4rem 1rem; border-radius: 100px; font-size: .85rem; color: var(--accent); margin-bottom: 1.5rem; font-weight: 500; }
.hero-badge::before { content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.hero h1 { margin-bottom: 1.25rem; color: var(--text); }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-muted); margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.6rem; border-radius: 8px; font-weight: 600; font-size: 1rem; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; cursor: pointer; border: none; min-height: 44px; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200, 155, 60, 0.3); color: var(--bg); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero-stats { display: flex; gap: clamp(1.5rem, 5vw, 3rem); justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: var(--accent); font-family: var(--font-display); }
.stat-label { font-size: .85rem; color: var(--text-muted); }

/* ===== Section Header ===== */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag { font-family: var(--font-sans); font-size: .8rem; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .5rem; display: block; font-weight: 600; }
.section-desc { color: var(--text-muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* ===== Cards / Grid ===== */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; transition: border-color .3s, transform .3s, box-shadow .3s; }
.card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1.5rem; }

/* ===== Opening Hours ===== */
.hours-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.hours-list li { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; }
.hours-list li strong { color: var(--accent); }
.hours-list .closed { color: var(--text-muted); font-style: italic; }
.hours-list .closed strong { color: var(--text-muted); }

/* ===== Drink Menu ===== */
.menu-category { margin-bottom: 2.5rem; }
.menu-category h2 { color: var(--accent); border-bottom: 2px solid var(--border); padding-bottom: .5rem; margin-bottom: 1rem; }
.menu-table { width: 100%; border-collapse: collapse; }
.menu-table th { text-align: left; padding: .75rem 1rem; background: var(--bg-card); color: var(--text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 2px solid var(--accent); }
.menu-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.menu-table tr:hover td { background: rgba(200, 155, 60, 0.05); }
.menu-table td:last-child { text-align: right; white-space: nowrap; color: var(--accent); font-weight: 600; }

/* ===== Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.gallery-item { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; cursor: pointer; border: 1px solid var(--border); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .gallery-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,20,16,0.85), transparent 60%); display: flex; align-items: flex-end; padding: 1.25rem; opacity: 0; transition: opacity .3s; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h3 { color: var(--text); font-size: 1.1rem; }
.gallery-overlay p { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(26, 20, 16, 0.95); z-index: 200; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: var(--text); font-size: 2rem; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background .2s; }
.lightbox-close:hover { background: rgba(255,255,255,.1); }

/* ===== Events ===== */
.event-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem; transition: border-color .3s, transform .3s; }
.event-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.event-date { display: inline-block; background: var(--accent); color: var(--bg); padding: .3rem .75rem; border-radius: 6px; font-size: .85rem; font-weight: 600; margin-bottom: .75rem; }
.event-card h3 { font-size: clamp(1.2rem, 3vw, 1.4rem); margin-bottom: .5rem; color: var(--text); }
.event-card p { color: var(--text-muted); margin-bottom: .75rem; }
.event-card a { color: var(--accent); font-weight: 500; }

/* ===== Contact Form ===== */
.contact-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; margin-top: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .4rem; color: var(--text); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .85rem 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--font-sans); font-size: 1rem; transition: border-color .2s, box-shadow .2s; min-height: 44px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input.error, .form-group textarea.error { border-color: var(--error); box-shadow: 0 0 0 3px rgba(255, 138, 123, 0.15); }
.form-error { color: var(--error); font-size: .85rem; margin-top: .3rem; display: none; }
.form-error.visible { display: block; }
#form-status, #res-status { margin-top: 1rem; font-size: .9rem; text-align: center; display: none; padding: .75rem 1rem; border-radius: 8px; }
#form-status.success, #res-status.success { display: block; color: var(--success); background: rgba(126, 231, 135, 0.1); border: 1px solid rgba(126, 231, 135, 0.2); }
#form-status.error, #res-status.error { display: block; color: var(--error); background: rgba(255, 138, 123, 0.1); border: 1px solid rgba(255, 138, 123, 0.2); }

/* ===== Contact Info ===== */
.contact-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.contact-info-item { display: flex; flex-direction: column; gap: .25rem; }
.contact-info-item .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.contact-info-item .value { font-size: 1.1rem; color: var(--text); }
.contact-info-item a { color: var(--accent); }

/* ===== Map ===== */
.map-wrapper { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); margin-top: 2rem; }
.map-wrapper iframe { width: 100%; height: 350px; border: 0; display: block; }

/* ===== Social Icons ===== */
.social-links { display: flex; gap: 1rem; align-items: center; }
.social-links a { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: border-color .2s, background .2s, transform .2s; }
.social-links a:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); }
.social-links svg { width: 20px; height: 20px; fill: var(--text-muted); transition: fill .2s; }
.social-links a:hover svg { fill: var(--accent); }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 2.5rem 0 2rem; background: var(--bg-elevated); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-family: var(--font-sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: .75rem; }
.footer-col p, .footer-col a { color: var(--text-muted); font-size: .9rem; line-height: 1.8; }
.footer-col a:hover { color: var(--accent); }
.footer-col ul { list-style: none; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-copy { color: var(--text-muted-light); font-size: .85rem; }

/* ===== Scroll to Top ===== */
.scroll-top { position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--bg); border: none; font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 99; }
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-3px); }

/* ===== Reveal Animation ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .hero-badge::before { animation: none; } }

/* ===== Page Hero (inner pages) ===== */
.page-hero { padding: 8rem 0 3rem; text-align: center; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.page-hero h1 { color: var(--accent); margin-bottom: .5rem; }
.page-hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ===== Legal Pages ===== */
.legal-content { max-width: 800px; margin: 0 auto; padding: 8rem 1.5rem 4rem; }
.legal-content h1 { color: var(--accent); margin-bottom: 1.5rem; }
.legal-content h2 { color: var(--text); font-size: 1.3rem; margin-top: 2rem; margin-bottom: .75rem; }
.legal-content p { color: var(--text-muted); margin-bottom: 1rem; }
.legal-content ul { margin-left: 1.5rem; margin-bottom: 1rem; color: var(--text-muted); }

/* ===== Responsive Grid Helper ===== */
.responsive-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.responsive-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) {
    .responsive-grid-2, .responsive-grid-3 { grid-template-columns: 1fr; }
}