/* =========================================
   Café Alte Schule – Corporate Identity
   Alle Farben, Schriften und Abstände
   werden global über CSS-Variablen gesteuert.
   ========================================= */

:root {
    /* ── Markenfarben ─────────────────────────────────────
       Für rgba()-Nutzung gibt es je eine *-rgb-Variante:
         rgba(var(--primary-rgb), 0.12)
       ─────────────────────────────────────────────────── */
    --primary:          #295b85;
    --primary-rgb:      41, 91, 133;

    --secondary:        #295b85;
    --secondary-rgb:    41, 91, 133;

    --accent:           #84a98c;
    --accent-rgb:       132, 169, 140;

    --light:            #edecdf;
    --soft:             #e8e4d9;
    --bg-mid:           #f4f2e8;
    --white:            #ffffff;
    --white-rgb:        255, 255, 255;
    --danger:           #c0392b;

    /* ── Status-Farben (Öffnungszeiten / Info-Bar) ─────── */
    --color-open:       #1a6638;
    --color-open-bg:    #d1fadf;
    --color-soon:       #7d5b00;
    --color-soon-bg:    #fef3cd;
    --color-open-tib:   #95d5b2;
    --color-soon-tib:   #f4a261;

    /* ── Typografie ─────────────────────────────────────────────────────────
       --font-display:  TAN St. Canard (Canva) → Word: Franklin Gothic Heavy
                        Nur Großbuchstaben, letter-spacing erhöht.
       --font-heading:  Archivo Black (Google Fonts)
       --font-body:     Canva Sans (Canva) → Word: Aptos
       ─────────────────────────────────────────────────────────────────── */
    --font-display:     'Franklin Gothic Heavy', 'Arial Black', Impact, sans-serif;
    --font-heading:     'Archivo Black', Georgia, sans-serif;
    --font-body:        'Aptos', 'Segoe UI', Calibri, system-ui, -apple-system, sans-serif;

    /* ── Schatten ────────────────────────────────────────── */
    --shadow:           0 24px 70px rgba(var(--primary-rgb), 0.12);
    --shadow-soft:      0 12px 35px rgba(var(--primary-rgb), 0.09);

    /* ── Radien ──────────────────────────────────────────── */
    --radius:           24px;
    --radius-sm:        12px;
    --radius-md:        18px;
    --radius-lg:        1rem;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.16), transparent 30rem),
        linear-gradient(180deg, var(--light) 0%, var(--bg-mid) 48%, var(--light) 100%);
    color: var(--primary);
    line-height: 1.75;
    margin: 0;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, h5, .navbar-brand, .brand-text {
    font-family: var(--font-heading);
    color: var(--primary);
}

/* Hero-Haupttitel: Cormorant SC (TAN St. Canard-Ersatz), nur Großbuchstaben */
.hero-section h1,
.subpage-hero h1 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

p { margin-bottom: 1rem; }

/* =========================================
   Navbar + Logo
   ========================================= */

.cafe-navbar {
    background: var(--light);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.08);
    padding: 12px 0;
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
    font-family: var(--font-display);
    text-transform: uppercase;
}

.navbar-brand i,
.feature-icon,
.section-header i { color: var(--secondary); }

.navbar-brand:hover { color: var(--secondary) !important; }

/* Hamburger-Icon: navbar-dark nutzt weißes SVG – auf hellem Hintergrund nicht sichtbar */
.cafe-navbar .navbar-toggler {
    border-color: rgba(var(--primary-rgb), 0.35);
}
.cafe-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23295b85' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.logo-wrapper img {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(var(--primary-rgb), 0.08));
}

.brand-text {
    font-size: 1.45rem;
    margin-left: 15px;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--primary) !important;
    margin-left: 16px;
    font-weight: 600;
    position: relative;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover { color: var(--secondary) !important; }
.nav-link:hover::after { transform: scaleX(1); }

/* =========================================
   Hero Section
   ========================================= */

.hero-section,
.subpage-hero {
    background: transparent;
    position: relative;
    overflow: hidden;
}

.hero-section {
    min-height: 78vh;
    padding: 110px 20px 90px;
    text-align: center;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/Images/AlteSchule.png') center 42%/540px no-repeat;
    opacity: 0.045;
    pointer-events: none;
}

.hero-section::after,
.subpage-hero::after {
    content: "";
    position: absolute;
    width: 34rem;
    height: 34rem;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.18);
    right: -10rem;
    top: -13rem;
    filter: blur(2px);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-logo-frame {
    width: min(380px, 100%);
    margin: 0 auto 28px;
    padding: 18px;
    border-radius: 34px;
    background: rgba(var(--white-rgb), 0.28);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
    box-shadow: var(--shadow-soft);
}

.hero-logo {
    width: 100%;
    max-width: 340px;
    margin: 0;
    opacity: 0.98;
}

.hero-section h1,
.subpage-hero h1 {
    font-size: clamp(3rem, 8vw, 6.7rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin-bottom: 22px;
}

.hero-lead,
.subpage-hero p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--secondary);
    max-width: 760px;
    margin: 0 auto 30px;
}

.eyebrow,
.section-kicker {
    color: var(--secondary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    margin-bottom: 12px;
}

.hero-actions { margin-top: 26px; }

/* =========================================
   Layout & Sections
   ========================================= */

.main-content { padding: 60px 20px; min-height: calc(100vh - 180px); }

.intro-section h2,
.section-header h2,
.cafe-card h2,
.cta-panel h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.section-header.centered { text-align: center; max-width: 780px; margin: 0 auto; }

.text-link {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
    border-bottom: 2px solid var(--secondary);
}
.text-link:hover { color: var(--secondary); }

.subpage-hero {
    padding: 115px 20px 80px;
    text-align: center;
}

.subpage-hero .container { position: relative; z-index: 1; }

/* =========================================
   Cards
   ========================================= */

.cafe-card,
.cafe-visual-card,
.timeline-card,
.cta-panel {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(var(--primary-rgb), 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.cafe-card {
    padding: 28px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cafe-card:hover,
.timeline-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.large-card { padding: clamp(28px, 5vw, 48px); }

.feature-card { text-align: left; }
.feature-card h5 { font-size: 1.35rem; font-weight: 800; }

.feature-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: rgba(var(--accent-rgb), 0.18);
    font-size: 1.45rem;
    margin-bottom: 18px;
}

.cafe-visual-card {
    padding: 36px;
    min-height: 370px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    position: relative;
    overflow: hidden;
}

.idea-highlight-card { overflow: hidden; position: relative; }

/* =========================================
   Utility-Hintergrundfarben
   ========================================= */

.bg-cafe-dark {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.bg-cafe-dark h1,
.bg-cafe-dark h2,
.bg-cafe-dark h3,
.bg-cafe-dark h4,
.bg-cafe-dark h5,
.bg-cafe-dark h6 {
    color: var(--white) !important;
}

.bg-cafe-medium {
    background-color: var(--secondary) !important;
    color: var(--white) !important;
}

.bg-cafe-light {
    background-color: var(--accent) !important;
    color: var(--primary) !important;
}

/* =========================================
   Buttons
   ========================================= */

.btn-cafe,
.btn-cafe-outline {
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-cafe {
    background: var(--primary);
    color: var(--white);
    border: none;
    box-shadow: 0 12px 25px rgba(var(--primary-rgb), 0.18);
}

.btn-cafe:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-cafe-outline {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-cafe-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* =========================================
   Events / News
   ========================================= */

.event-item,
.news-item {
    border-left: 4px solid var(--secondary);
    padding: 22px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.07);
}

.event-date {
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
}

/* =========================================
   Idee-Seite
   ========================================= */

.check-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.check-list li {
    padding: 10px 0 10px 34px;
    position: relative;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.07);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--secondary);
    font-weight: 900;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.timeline-card {
    padding: 26px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card span {
    color: var(--secondary);
    font-weight: 900;
    letter-spacing: 0.18em;
    font-size: 0.82rem;
}

.timeline-card h4 {
    margin-top: 12px;
    font-weight: 800;
}

.cta-panel {
    padding: clamp(28px, 5vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cta-panel p { max-width: 720px; margin-bottom: 0; }

/* =========================================
   Animations
   ========================================= */

.reveal-up {
    animation: revealUp 0.9s ease both;
}
.reveal-delay-1 { animation-delay: 0.12s; }
.reveal-delay-2 { animation-delay: 0.22s; }
.reveal-delay-3 { animation-delay: 0.34s; }
.reveal-delay-4 { animation-delay: 0.46s; }

@keyframes revealUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.coffee-animation {
    position: absolute;
    right: clamp(10px, 7vw, 90px);
    bottom: 20px;
    width: 150px;
    height: 150px;
    opacity: 0.75;
}

.cup,
.small-cup {
    position: absolute;
    bottom: 16px;
    left: 28px;
    width: 72px;
    height: 46px;
    border: 4px solid var(--primary);
    border-top: 0;
    border-radius: 0 0 28px 28px;
}

.cup::after,
.small-cup::after {
    content: "";
    position: absolute;
    right: -24px;
    top: 8px;
    width: 22px;
    height: 22px;
    border: 4px solid var(--primary);
    border-left: 0;
    border-radius: 0 16px 16px 0;
}

.steam {
    position: absolute;
    bottom: 58px;
    width: 8px;
    height: 38px;
    border-radius: 999px;
    background: var(--secondary);
    opacity: 0.45;
    animation: steamRise 2.6s ease-in-out infinite;
}
.steam-1 { left: 16px; animation-delay: 0s; }
.steam-2 { left: 34px; animation-delay: 0.35s; }
.steam-3 { left: 52px; animation-delay: 0.7s; }

@keyframes steamRise {
    0% { transform: translateY(16px) scaleY(0.55); opacity: 0; }
    35% { opacity: 0.55; }
    100% { transform: translateY(-28px) scaleY(1.2); opacity: 0; }
}

.grinder {
    position: absolute;
    right: 6px;
    bottom: 42px;
    width: 42px;
    height: 58px;
    border: 4px solid var(--secondary);
    border-radius: 14px;
    animation: grinderShake 1.4s ease-in-out infinite;
}

.grinder::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 8px;
    width: 18px;
    height: 16px;
    border: 4px solid var(--secondary);
    border-radius: 8px 8px 0 0;
}

.bean {
    position: absolute;
    width: 9px;
    height: 13px;
    background: var(--primary);
    border-radius: 50%;
    animation: beanDrop 1.6s ease-in infinite;
}
.bean-1 { left: -18px; top: -16px; animation-delay: 0.1s; }
.bean-2 { left: 8px; top: -25px; animation-delay: 0.45s; }
.bean-3 { left: 30px; top: -12px; animation-delay: 0.8s; }

@keyframes grinderShake {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

@keyframes beanDrop {
    0% { transform: translateY(-18px) rotate(0deg); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(66px) rotate(160deg); opacity: 0; }
}

.service-animation {
    position: absolute;
    inset: 20px 20px auto 20px;
    height: 185px;
}

.counter {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 18px;
    height: 34px;
    background: rgba(var(--primary-rgb), 0.16);
    border-radius: 16px;
}

.server,
.guest {
    position: absolute;
    bottom: 52px;
    width: 32px;
    height: 62px;
    background: var(--secondary);
    border-radius: 18px 18px 10px 10px;
    animation: cafeMove 3.8s ease-in-out infinite;
}
.server { left: 38%; }
.guest { background: var(--primary); }
.guest-1 { left: 18%; animation-delay: 0.6s; }
.guest-2 { right: 20%; animation-delay: 1.2s; }
.server::before,
.guest::before {
    content: "";
    position: absolute;
    top: -24px;
    left: 6px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
}

.tray {
    position: absolute;
    left: 48%;
    bottom: 92px;
    width: 46px;
    height: 8px;
    background: var(--primary);
    border-radius: 999px;
    animation: trayFloat 3.8s ease-in-out infinite;
}

@keyframes cafeMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes trayFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(18px, -7px); }
}

.coffee-pour-animation {
    height: 180px;
    position: relative;
    margin-bottom: 24px;
}

.pot {
    position: absolute;
    left: 25%;
    top: 20px;
    width: 74px;
    height: 48px;
    border: 4px solid var(--primary);
    border-radius: 10px 18px 18px 10px;
    transform: rotate(-14deg);
    animation: potTilt 2.8s ease-in-out infinite;
}

.pour {
    position: absolute;
    left: 49%;
    top: 78px;
    width: 7px;
    height: 72px;
    background: var(--secondary);
    border-radius: 999px;
    transform-origin: top;
    animation: pourFlow 2.8s ease-in-out infinite;
}

.small-cup {
    left: 40%;
    bottom: 0;
    width: 64px;
    height: 40px;
}

@keyframes potTilt {
    0%, 100% { transform: rotate(-8deg); }
    45%, 70% { transform: rotate(-22deg); }
}

@keyframes pourFlow {
    0%, 25%, 90%, 100% { transform: scaleY(0); opacity: 0; }
    40%, 78% { transform: scaleY(1); opacity: 0.55; }
}

/* =========================================
   Forms / Tables / Footer / Alerts
   ========================================= */

.form-control,
.form-select {
    border: 1px solid var(--soft);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    background: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.15rem rgba(var(--secondary-rgb), 0.2);
}

.opening-hours-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--soft);
}

.opening-hours-table thead { background: var(--soft); }
.opening-hours-table td,
.opening-hours-table th { padding: 14px; border-bottom: 1px solid var(--soft); }

.modal { position: fixed; z-index: 1050 !important; }
.modal-backdrop { z-index: 1040 !important; }
.modal-content { border: 1px solid var(--soft); border-radius: var(--radius-md); box-shadow: 0 10px 40px rgba(0,0,0,0.15); }

.cafe-footer {
    background: rgba(232, 228, 217, 0.72);
    color: var(--primary);
    padding: 44px 20px;
    margin-top: 70px;
}
.cafe-footer a { color: var(--secondary); text-decoration: none; font-weight: 700; }
.cafe-footer a:hover { text-decoration: underline; }

.alert { border-radius: 16px; padding: 16px; border: 0; }
.alert-info { background: #eef6f5; color: var(--primary); }
.alert-success { background: #edf7ed; }
.alert-warning { background: #fff6e5; }
.alert-danger { background: #fdecea; }
.alert-cafe-info { background: rgba(var(--accent-rgb), 0.12); color: var(--primary); border-left: 3px solid var(--accent); }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-cafe-gold { color: var(--secondary) !important; }
.bg-light { background: var(--light) !important; }
.border-soft { border: 1px solid var(--soft); }

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 992px) {
    .timeline-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-panel { flex-direction: column; align-items: flex-start; }
    .coffee-animation { opacity: 0.35; right: 0; }
}

@media (max-width: 768px) {
    .hero-section { padding: 78px 15px 70px; min-height: auto; }
    .hero-section h1, .subpage-hero h1 { letter-spacing: -0.04em; }
    .logo-wrapper img { height: 55px; }
    .hero-actions .btn { display: block; width: 100%; margin: 0 0 12px !important; }
    .timeline-grid { grid-template-columns: 1fr; }
    .cafe-visual-card { min-height: 330px; }
}

/* =========================================
   Mobile-Optimierung (≤ 575 px)
   Galaxy S-Serie, iPhone 15/16 etc.
   ========================================= */

@media (max-width: 575px) {

    /* ── Overflow-Schutz ──────────────────────────────────────────────────────
       .main-content hatte padding: 60px 20px → Hero-Section nicht full-width.
       Lösung: main-content Seiten-Padding entfernen; jede Section hat eigenes
       Padding. Container (Bootstrap) übernimmt den inneren Abstand.
       ─────────────────────────────────────────────────────────────────────── */
    .main-content {
        padding-top: 0;
        padding-bottom: 24px;
        padding-left: 0;
        padding-right: 0;
    }

    /* iOS: verhindert automatischen Zoom beim Antippen von Feldern */
    input, select, textarea,
    .form-control, .form-select { font-size: 16px !important; }

    /* ── Navbar ───────────────────────────────────────── */
    .navbar-collapse .nav-link {
        margin-left: 0;
        padding: 10px 8px;
        border-bottom: 1px solid rgba(var(--primary-rgb), .07);
    }
    .navbar-collapse .navbar-nav:last-child .nav-link { border-bottom: none; }
    .nav-link::after { display: none; }

    /* ── Hero: voll-breit, kein Overflow ─────────────────────────────────────
       ::after ist position:absolute mit right:-10rem; width:34rem →
       streckt Scroll-Breite auf >viewport. Deaktivieren, Section clippen.
       ─────────────────────────────────────────────────────────────────────── */
    .hero-section::after,
    .subpage-hero::after { display: none; }

    .hero-section {
        padding: 52px 20px 36px;
        min-height: auto;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
    .subpage-hero {
        padding: 64px 20px 40px;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .hero-logo-frame { padding: 12px; border-radius: 22px; margin-bottom: 18px; }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .hero-actions .btn { width: 100%; text-align: center; margin: 0 !important; }

    .coffee-animation { display: none; }

    /* ── Typografie ───────────────────────────────────────────────────────────
       clamp MIN 3rem = 45px › 8vw auf 390px (~31px) → Browser nimmt MIN = Overflow.
       MIN auf 1.9rem senken damit 8vw greift.
       ─────────────────────────────────────────────────────────────────────── */
    .hero-section h1,
    .subpage-hero h1 {
        font-size: clamp(1.9rem, 8vw, 3rem);
        letter-spacing: -0.03em;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .hero-lead {
        font-size: clamp(1rem, 4vw, 1.2rem);
        max-width: 100%;
        overflow-wrap: break-word;
        margin: 0 auto 24px;
    }

    .intro-section h2,
    .section-header h2,
    .cafe-card h2,
    .cta-panel h2 {
        font-size: clamp(1.55rem, 7vw, 2.2rem);
        overflow-wrap: break-word;
    }

    p { overflow-wrap: break-word; }

    /* ── Sections mit eigenem Padding (da main-content keines mehr hat) ─── */
    .container, .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* ── Cards ────────────────────────────────────────── */
    .cafe-card { padding: 16px; margin-bottom: 16px; border-radius: 16px; }
    .cafe-card:hover { transform: none; }
    .large-card { padding: 18px; }
    .timeline-card { padding: 16px; }
    .cta-panel { padding: 20px 16px; gap: 14px; }

    /* Service-Animation: position:absolute überlappt Text auf kleinen Screens */
    .cafe-visual-card {
        min-height: unset;
        padding: 20px;
        justify-content: flex-start;
    }
    .service-animation { display: none; }

    /* ── Events / News ────────────────────────────────── */
    .event-item,
    .news-item { padding: 14px; border-radius: 14px; margin-bottom: 14px; }

    /* ── Footer ───────────────────────────────────────── */
    .cafe-footer { padding: 28px 16px; margin-top: 40px; }
    .cafe-footer .text-end { text-align: left !important; margin-top: 10px; }
    .cafe-footer .text-end a { display: inline-block; margin: 2px 8px 2px 0; }

    /* ── Modals ───────────────────────────────────────── */
    .modal-dialog { margin: 0.4rem; }
    .modal-content { border-radius: 16px; }

    /* ── Tabellen: horizontal scrollbar statt Overflow ── */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .cafe-card > .table-responsive,
    .card-body > table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* ── Admin-Sidebar ────────────────────────────────── */
    .admin-sidebar { margin-bottom: 20px; }

    /* ── Top-Info-Bar ─────────────────────────────────── */
    .tib-inner { font-size: .72rem; padding: .3rem .75rem; }

    /* ── Touch-Targets: min 44px (Apple HIG) ─────────── */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }
}

/* =========================================
   Admin Bearbeitungsmodus
   ========================================= */

#admin-edit-toolbar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

#edit-help-panel {
    position: fixed;
    bottom: 72px;
    right: 24px;
    width: 320px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.22);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    z-index: 9998;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--primary);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#edit-help-panel.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#edit-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    color: var(--white);
    padding: 12px 16px;
    border-radius: 16px 16px 0 0;
    font-size: 0.9rem;
}

#edit-help-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s;
}
#edit-help-close:hover { color: var(--white); }

#edit-help-body {
    padding: 16px;
}

#edit-help-body kbd {
    background: var(--soft);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.8em;
}

#admin-edit-help {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: var(--white);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#admin-edit-help:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

#admin-edit-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

#admin-edit-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 8px 28px rgba(var(--primary-rgb), 0.3);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

#admin-edit-toggle:hover { background: var(--secondary); transform: translateY(-2px); }
#admin-edit-toggle.active { background: var(--danger); }

body.edit-mode [data-editable] {
    position: relative;
    outline: 2px dashed var(--secondary);
    outline-offset: 4px;
    border-radius: 6px;
    transition: outline-color 0.2s;
}

body.edit-mode [data-editable]:hover {
    outline-color: var(--primary);
    outline-style: solid;
}

.edit-overlay-btn {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 100;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    gap: 5px;
    align-items: center;
}

.edit-overlay-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

body.edit-mode [data-editable] .edit-overlay-btn {
    display: inline-flex;
}

body.edit-mode [data-editable] {
    position: relative !important;
}

body.edit-mode [data-content-key] {
    cursor: text;
    border-radius: 4px;
    transition: background 0.15s;
}

body.edit-mode [data-content-key]:hover {
    background: rgba(var(--secondary-rgb), 0.08);
}

body.edit-mode [data-content-key]:focus {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 2px rgba(var(--secondary-rgb), 0.35);
    outline: none !important;
    border-radius: 4px;
}

body.edit-mode [data-content-key]::after {
    content: ' ✏';
    font-size: 0.72em;
    opacity: 0;
    color: var(--secondary);
    transition: opacity 0.15s;
    pointer-events: none;
    user-select: none;
}

body.edit-mode [data-content-key]:hover::after {
    opacity: 0.6;
}


/* ══════════════════════════════════════════════════════════════════════════
   TOP INFO BAR – Öffnungszeiten & nächster Termin
   ══════════════════════════════════════════════════════════════════════════ */
#top-info-bar {
    background: var(--primary);
    color: rgba(255,255,255,.82);
    font-size: .78rem;
    letter-spacing: .01em;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: 0;
    z-index: 1040;
}

.tib-inner {
    display: flex;
    align-items: center;
    gap: .5rem 1.1rem;
    flex-wrap: wrap;
    padding: .35rem 1.2rem;
    min-height: 2rem;
}

.tib-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

.tib-icon {
    color: var(--accent);
    font-size: .72rem;
    flex-shrink: 0;
}

.tib-label {
    color: rgba(255,255,255,.55);
    font-weight: 500;
}

.tib-value {
    font-weight: 600;
    color: rgba(255,255,255,.92);
}

.tib-open   { color: var(--color-open-tib); }
.tib-soon   { color: var(--color-soon-tib); }
.tib-closed { color: rgba(255,255,255,.45); font-weight: 400; }

.tib-divider {
    color: rgba(255,255,255,.25);
    user-select: none;
    font-size: .9rem;
}

.tib-event-link {
    color: rgba(255,255,255,.92);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-weight: 600;
    transition: color .15s;
}
.tib-event-link:hover { color: var(--accent); text-decoration: underline; }

.tib-event-title {
    max-width: 22ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 575px) {
    .tib-inner     { padding: .4rem .9rem; gap: .25rem .7rem; }
    .tib-divider   { display: none; }
    .tib-event-title { max-width: 18ch; }
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO GRID – zweigeteiltes Layout mit Info-Karte
   ══════════════════════════════════════════════════════════════════════════ */

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0 2.5rem;
    width: 100%;
}

.hero-main {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-info-card {
    width: 230px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid rgba(var(--primary-rgb), 0.13);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.25rem 1.1rem;
    box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.10),
                0 2px 8px  rgba(var(--primary-rgb), 0.06);
    align-self: center;
}

.hic-section { }

.hic-heading {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.hic-heading i { font-size: .68rem; }

.hic-hours {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -.02em;
    line-height: 1.15;
}
.hic-dash  { margin: 0 .15rem; opacity: .5; }
.hic-uhr   { font-size: .8rem; font-weight: 500; opacity: .6; margin-left: .2rem; }

.hic-status-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: .18rem .6rem;
    margin-top: .4rem;
}
.hic-badge-open { background: var(--color-open-bg); color: var(--color-open); }
.hic-badge-soon { background: var(--color-soon-bg); color: var(--color-soon); }

.hic-open  { color: var(--color-open); }
.hic-soon  { color: var(--color-soon); }
.hic-closed {
    font-size: .82rem;
    color: rgba(var(--primary-rgb), .45);
    font-style: italic;
}

.hic-note {
    font-size: .7rem;
    color: rgba(var(--primary-rgb), .55);
    margin-top: .3rem;
    font-style: italic;
}

.hic-divider {
    border: none;
    border-top: 1px solid rgba(var(--primary-rgb), .1);
    margin: .9rem 0;
}

.hic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}
.hic-table tr + tr td { padding-top: .3rem; }
.hic-date {
    white-space: nowrap;
    color: var(--secondary);
    font-weight: 700;
    padding-right: .6rem;
    vertical-align: top;
    width: 3.2rem;
}
.hic-event-name {
    color: var(--primary);
    font-weight: 500;
    line-height: 1.3;
}

.hic-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
    margin-top: .6rem;
    transition: gap .15s, color .15s;
}
.hic-link:hover { color: var(--primary); gap: .5rem; }
.hic-link i { font-size: .6rem; }

/* ── Responsive: Karte wandert unter den Content auf Mobilgeräten ───────── */
@media (max-width: 900px) {
    /* Grid deaktivieren – einfaches Block-Layout mit margin:auto ist auf Mobil
       zuverlässiger zentriert als grid/flex-Kombinationen. */
    .hero-grid {
        display: block;
    }
    .hero-main {
        display: block;
        width: 100%;
        text-align: center;
    }
    .hero-main > * {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-info-card {
        width: 100%;
        max-width: 420px;
        margin: 2rem auto 0;
        display: block;
    }
    .hic-table,
    .hic-hours { font-size: 1rem; }
}

.hic-block-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    transition: background .15s;
    margin: -.4rem -.5rem .2rem;
    padding: .4rem .5rem;
}
.hic-event-name {
    text-align: start;
}
.hic-block-link:hover {
    background: rgba(var(--primary-rgb), .06);
}
.hic-block-link .hic-heading {
    transition: color .15s;
}
.hic-block-link:hover .hic-heading {
    color: var(--primary);
}

/* ── Startseite: Sektions-Reihenfolge via CSS Grid ───────────────────────────
   Desktop (≥ lg):
     Zeile 1: Kernidee (volle Breite)
     Zeile 2: Angebote (volle Breite)
     Zeile 3: Events links | News rechts (je 50%)

   Mobile (< lg):
     News → Kernidee → Angebote → Events (alle volle Breite, gestapelt)
   ─────────────────────────────────────────────────────────────────────────── */

.home-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "kernidee kernidee"
        "angebote angebote"
        "events   news";
    column-gap: 0;
}

.home-area-kernidee { grid-area: kernidee; }
.home-area-angebote { grid-area: angebote; }
.home-area-events   { grid-area: events;   padding: 0 0 2rem 1rem; }
.home-area-news     { grid-area: news;     padding: 0 1rem 2rem 0; }

.container-inner {
    padding: 2rem 1rem 0;
    max-width: 100%;
}

@media (min-width: 992px) {
    .home-area-events { padding: 0 1rem 2rem 0; }
    .home-area-news   { padding: 0 0 2rem 1rem; }
    .container-inner  { padding: 2.5rem 0.5rem 0; }
}

@media (max-width: 991px) {
    .home-sections-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "news"
            "kernidee"
            "angebote"
            "events";
    }
    .home-area-events,
    .home-area-news { padding: 0; }
    .container-inner { padding: 1.5rem 16px 0; }
}
