/* ================================================================
   mg-autochthonous.css v2
   Autohtona Jela — Detailseite + Übersicht + Where-Listings
   Mobile-First, Open-Status hervorgehoben, Slider im Hero
   ================================================================ */

/* ── Container ── */
.autohtono-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 768px) {
    .autohtono-container { padding: 0 16px; }
}

/* ================================================================
   CITY-TABS
   ================================================================ */
.autohtono-city-tabs {
    position: sticky;
    top: 60px;
    z-index: 200;
    background: var(--paper, #fff);
    border-bottom: 1px solid var(--rule, #E8E8E5);
    padding: 10px 0;
    transition: box-shadow .2s;
}
.autohtono-city-tabs.is-stuck {
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.autohtono-city-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
}
.autohtono-city-scroll::-webkit-scrollbar { display: none; }

.autohtono-city-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--paper-warm, #F7F7F5);
    border: 1px solid var(--rule, #E8E8E5);
    font-family: var(--font, 'Poppins', sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink, #1A1A1A);
    cursor: pointer;
    transition: all .15s;
    border-radius: 999px;
}
.autohtono-city-chip:hover {
    border-color: var(--gold, #D4B06A);
}
.autohtono-city-chip.is-active {
    background: var(--accent, #8B2E2E);
    border-color: var(--accent, #8B2E2E);
    color: #fff;
}
.autohtono-city-count {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(0,0,0,.08);
    padding: 1px 7px;
    border-radius: 999px;
}
.autohtono-city-chip.is-active .autohtono-city-count {
    background: rgba(255,255,255,.25);
}

@media (max-width: 768px) {
    .autohtono-city-tabs { top: 54px; padding: 8px 0; }
    .autohtono-city-chip { padding: 7px 12px; font-size: 0.78rem; }
}

/* ================================================================
   HERO MIT GALLERY-SLIDER
   ================================================================ */
.autohtono-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 380px;
    max-height: 560px;
    overflow: hidden;
    background: #111;
}
.autohtono-hero-gallery {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.autohtono-gallery-track {
    display: flex;
    height: 100%;
    transition: transform .55s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.autohtono-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.autohtono-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prev / Next */
.autohtono-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    color: var(--ink, #1A1A1A);
    transition: background .15s, transform .15s;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.autohtono-gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}
.autohtono-gallery-nav svg { width: 20px; height: 20px; }
.autohtono-gallery-nav--prev { left: 16px; }
.autohtono-gallery-nav--next { right: 16px; }

/* Dots (unten zentriert, ÜBER dem Overlay) */
.autohtono-gallery-dots {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 4;
}
.autohtono-gallery-dot {
    width: 24px;
    height: 4px;
    background: rgba(255,255,255,.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s, width .2s;
    border-radius: 999px;
}
.autohtono-gallery-dot:hover { background: rgba(255,255,255,.75); }
.autohtono-gallery-dot.is-active { background: #fff; width: 36px; }

/* Hero-Overlay */
.autohtono-hero-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 60px 24px 32px;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,0) 100%);
    color: #fff;
    text-align: center;
    z-index: 3;
}
.autohtono-hero-title {
    font-family: var(--font, 'Poppins', sans-serif);
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    line-height: 1.1;
    color: #fff;
}
.autohtono-hero-teaser {
    font-size: clamp(.88rem, 1.6vw, 1.05rem);
    font-weight: 500;
    color: rgba(255,255,255,.92);
    margin: 0 auto 18px;
    max-width: 680px;
    line-height: 1.5;
}
.autohtono-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--accent, #8B2E2E);
    color: #fff;
    font-family: var(--font, 'Poppins', sans-serif);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
    transition: background .15s, transform .15s;
    border-radius: 999px;
}
.autohtono-hero-cta:hover {
    background: #fff;
    color: var(--accent, #8B2E2E);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .autohtono-hero {
        height: 42vh;
        min-height: 260px;
        max-height: 340px;
    }
    .autohtono-hero-overlay {
        padding: 40px 16px 20px;
    }
    .autohtono-hero-cta {
        padding: 10px 16px;
        font-size: .72rem;
    }
    .autohtono-gallery-nav {
        width: 36px;
        height: 36px;
    }
    .autohtono-gallery-nav svg { width: 16px; height: 16px; }
    .autohtono-gallery-nav--prev { left: 8px; }
    .autohtono-gallery-nav--next { right: 8px; }
    .autohtono-gallery-dots { bottom: 76px; gap: 6px; }
    .autohtono-gallery-dot { width: 18px; height: 3px; }
    .autohtono-gallery-dot.is-active { width: 26px; }
}

/* ================================================================
   WHY / DESC
   ================================================================ */
.autohtono-why {
    padding: 48px 0 36px;
    background: var(--paper, #fff);
}
.autohtono-desc {
    padding: 36px 0 48px;
    background: var(--paper-warm, #F7F7F5);
}
.autohtono-why-title {
    font-family: var(--font, 'Poppins', sans-serif);
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 700;
    color: var(--ink, #1A1A1A);
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    padding-left: 16px;
    border-left: 4px solid var(--accent, #8B2E2E);
}
.autohtono-why-body,
.autohtono-desc-body {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-mid, #6B6B6B);
    max-width: 820px;
}
@media (max-width: 768px) {
    .autohtono-why { padding: 32px 0 24px; }
    .autohtono-desc { padding: 24px 0 32px; }
    .autohtono-why-body, .autohtono-desc-body { font-size: .92rem; }
}

/* ================================================================
   VIDEO — Wides (16:9) oben, Shorts (9:16, schmal) darunter
   Klarer Unterschied: Shorts max. 280px breit, Wides volle Breite
   ================================================================ */
.autohtono-video {
    padding: 48px 0;
    background: var(--paper, #fff);
}

/* ── Wide-Videos: 16:9, max. 2 nebeneinander (ab 700px) ── */
.autohtono-video-wides {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 32px;
}
@media (min-width: 700px) {
    .autohtono-video-wides {
        grid-template-columns: repeat(2, 1fr);
    }
    .autohtono-video-wides > :only-child {
        grid-column: 1 / -1;
        max-width: 900px;
        margin: 0 auto;
    }
}

/* ── Shorts: schmaler Streifen, horizontal scrollbar ── */
.autohtono-video-shorts-wrap {
    margin-top: 8px;
}
.autohtono-video-shorts-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font, 'Poppins', sans-serif);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent, #8B2E2E);
    margin: 0 0 14px;
    padding: 4px 12px;
    background: rgba(139, 46, 46, .06);
    border-left: 3px solid var(--accent, #8B2E2E);
}
.autohtono-video-shorts-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 8px;
}
.autohtono-video-shorts-track::-webkit-scrollbar { height: 4px; }
.autohtono-video-shorts-track::-webkit-scrollbar-thumb {
    background: var(--rule-strong, #D5D5D0);
    border-radius: 2px;
}

/* ── Short-Container: max 280px Breite (das ist der Kernpunkt!) ── */
.autohtono-video-short {
    flex: 0 0 240px;
    max-width: 280px;
    scroll-snap-align: start;
}

/* ── Frame: wiederverwendbar für beide ── */
.autohtono-video-frame {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,.10);
}
.autohtono-video-frame--16-9 {
    aspect-ratio: 16 / 9;
}
.autohtono-video-frame--9-16 {
    aspect-ratio: 9 / 16;
}
.autohtono-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .autohtono-video { padding: 28px 0; }
    .autohtono-video-wides { gap: 14px; margin-bottom: 24px; }
    .autohtono-video-short {
        flex: 0 0 200px;
        max-width: 220px;
    }
}
@media (max-width: 480px) {
    .autohtono-video-short {
        flex: 0 0 170px;
        max-width: 190px;
    }
}

/* ================================================================
   WHERE — LISTING
   ================================================================ */
.autohtono-where {
    padding: 48px 0 72px;
    background: var(--paper, #fff);
    scroll-margin-top: 80px;
}
.autohtono-where-title {
    font-family: var(--font, 'Poppins', sans-serif);
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 700;
    color: var(--ink, #1A1A1A);
    letter-spacing: -0.01em;
    margin: 0 0 24px;
    padding-left: 16px;
    border-left: 4px solid var(--accent, #8B2E2E);
}
.autohtono-where-empty {
    color: var(--ink-muted, #9A9A9A);
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

/* ── Listing: 1 Eintrag pro Restaurant (kompakt, nicht zu hoch) ── */
.autohtono-where-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.autohtono-where-card {
    position: relative;
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px 12px 12px;
    background: var(--paper, #fff);
    border: 1px solid var(--rule, #E8E8E5);
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    border-radius: 10px;
    overflow: hidden;
}
.autohtono-where-card:hover {
    border-color: var(--accent, #8B2E2E);
    box-shadow: 0 4px 18px rgba(139, 46, 46, .10);
    transform: translateY(-1px);
}

/* Status-Rand-Streifen links */
.autohtono-where-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #9CA3AF;
}
.autohtono-where-card--open::before    { background: #16A34A; }
.autohtono-where-card--closed::before  { background: #DC2626; }
.autohtono-where-card--closing::before { background: #EAB308; }
.autohtono-where-card--kitchen::before { background: #F97316; }

/* Grosses Status-Badge OBEN RECHTS */
.autohtono-big-status {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.autohtono-big-status--open    { background: #16A34A; }
.autohtono-big-status--closed  { background: #DC2626; }
.autohtono-big-status--closing { background: #EAB308; color: #1A1A1A; }
.autohtono-big-status svg { flex-shrink: 0; }

/* Pulse-Dot für offen / closing */
.autohtono-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: autohtonoPulse 1.5s ease-in-out infinite;
}
@keyframes autohtonoPulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(22,163,74,.5); }
    50%      { opacity: .85; transform: scale(1.2); box-shadow: 0 0 0 4px rgba(22,163,74,0); }
}

/* Bild */
.autohtono-where-img {
    width: 88px;
    height: 88px;
    overflow: hidden;
    background: var(--paper-deep, #EFEFEC);
    border-radius: 8px;
    flex-shrink: 0;
    position: relative;
}
.autohtono-where-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.autohtono-where-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.autohtono-where-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink, #1A1A1A);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.autohtono-where-item {
    font-size: .76rem;
    color: var(--ink-mid, #6B6B6B);
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.autohtono-variant-badge {
    display: inline-block;
    font-size: .62rem;
    font-weight: 700;
    padding: 1px 7px;
    background: var(--paper-warm, #F7F7F5);
    color: var(--accent, #8B2E2E);
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.autohtono-where-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent, #8B2E2E);
    line-height: 1.2;
    margin-top: 2px;
}

/* Hours-Zeile mit renderOpenBadge() (kompakt) */
.autohtono-where-hours {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 4px;
}
.autohtono-where-hours .open-badge {
    font-size: 10px;
    padding: 3px 8px;
    box-shadow: none;
}

/* Mobile: alles untereinander, bild grösser */
@media (max-width: 640px) {
    .autohtono-where-card {
        grid-template-columns: 72px 1fr;
        gap: 12px;
        padding: 10px 12px;
    }
    .autohtono-where-img {
        width: 72px;
        height: 72px;
    }
    .autohtono-where-hours {
        grid-column: 1 / -1;
        justify-content: flex-start;
        margin-top: 6px;
        padding-left: 0;
    }
    .autohtono-where-name { font-size: .95rem; }
    .autohtono-where-price { font-size: 1rem; }
    .autohtono-big-status {
        top: 6px;
        right: 6px;
        font-size: 9.5px;
        padding: 4px 9px;
    }
}

/* ================================================================
   ÜBERSICHT (autohtona.php)
   ================================================================ */
.autohtona-list-page { padding-bottom: 60px; }
.autohtona-list-hero {
    padding: 56px 0 36px;
    background: var(--paper-warm, #F7F7F5);
    border-bottom: 1px solid var(--rule, #E8E8E5);
    text-align: center;
}
.autohtona-list-title {
    font-family: var(--font, 'Poppins', sans-serif);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink, #1A1A1A);
    margin: 0 0 12px;
}
.autohtona-list-subtitle {
    font-size: 1rem;
    color: var(--ink-mid, #6B6B6B);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}
.autohtona-list-section {
    padding: 40px 0;
}
.autohtono-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.autohtono-list-card {
    display: flex;
    flex-direction: column;
    background: var(--paper, #fff);
    border: 1px solid var(--rule, #E8E8E5);
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, box-shadow .2s;
    overflow: hidden;
    border-radius: 6px;
}
.autohtono-list-card:hover {
    border-color: var(--accent, #8B2E2E);
    box-shadow: 0 4px 16px rgba(139, 46, 46, .10);
}
.autohtono-list-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--paper-deep, #EFEFEC);
}
.autohtono-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}
.autohtono-list-card:hover .autohtono-list-img img {
    transform: scale(1.04);
}
.autohtono-list-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.autohtono-list-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink, #1A1A1A);
    line-height: 1.2;
}
.autohtono-list-teaser {
    font-size: .84rem;
    color: var(--ink-mid, #6B6B6B);
    line-height: 1.45;
}
.autohtono-list-cta {
    margin-top: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent, #8B2E2E);
    text-transform: uppercase;
    letter-spacing: .08em;
}

@media (max-width: 900px) {
    .autohtono-list-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 520px) {
    .autohtono-list-grid { grid-template-columns: 1fr; }
    .autohtona-list-hero { padding: 40px 0 28px; }
    .autohtona-list-section { padding: 28px 0; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .autohtono-gallery-track { transition: none !important; }
    .autohtono-list-card:hover .autohtono-list-img img { transform: none; }
    .autohtono-gallery-dot { transition: none; }
    .autohtono-pulse-dot { animation: none !important; }
}

/* ==========================================================================
   STARTSEITE (index.php) — AUTOHTONA JELA HORIZONTAL SLIDER
   ========================================================================== */

/* 1. Der Container: Immer ein horizontaler Slider (Desktop & Mobile) */
.mg-autoht-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    margin-top: 20px;
    padding-bottom: 16px;
    scrollbar-width: thin; /* Zeigt eine dünne Scrollbar auf Desktop */
    -webkit-overflow-scrolling: touch;
}
.mg-autoht-grid::-webkit-scrollbar {
    height: 6px;
}
.mg-autoht-grid::-webkit-scrollbar-thumb {
    background: var(--rule-strong, #D5D5D0);
    border-radius: 4px;
}

/* 2. Die Karte (Feste Breite, damit sie nicht schrumpft) */
.mg-dish-card--teaser {
    flex: 0 0 300px; /* Desktop-Breite */
    max-width: 300px;
    scroll-snap-align: start;
    position: relative;
    display: block;
    background: #fff;
    border: 1px solid var(--rule, #E8E8E5);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    aspect-ratio: 4 / 3;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.mg-dish-card--teaser:hover {
    border-color: var(--gold, #BE9440);
    box-shadow: 0 10px 24px rgba(133,27,47,0.15);
    transform: translateY(-2px);
}

/* 3. Das Bild */
.mg-dish-card--teaser .mg-dish-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

.mg-dish-card--teaser .mg-dish-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.mg-dish-card--teaser:hover .mg-dish-img img {
    transform: scale(1.05);
}

/* 4. Der Text-Block (Overlay unten) */
.mg-dish-card--teaser .mg-dish-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 20px 20px 20px;
    background: linear-gradient(to top, rgba(107,20,37,0.95) 0%, rgba(107,20,37,0.7) 50%, rgba(107,20,37,0) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

/* 5. Titel, Teaser, CTA */
.mg-dish-card--teaser .mg-dish-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.mg-dish-card--teaser .mg-dish-teaser {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mg-dish-card--teaser .mg-dish-cta {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold, #D4B06A);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

/* ==========================================================================
   MOBILE (Anpassungen für den Slider)
   ========================================================================== */
@media (max-width: 768px) {
    .mg-autoht-grid {
        margin: 0 -16px;
        padding: 10px 16px 16px 16px;
        scrollbar-width: none; /* Auf Mobile keine Scrollbar anzeigen */
    }
    .mg-autoht-grid::-webkit-scrollbar {
        display: none;
    }
    .mg-dish-card--teaser {
        flex: 0 0 82vw; /* Fast volle Breite auf dem Handy */
        max-width: 320px;
    }
    .mg-dish-card--teaser .mg-dish-body {
        padding: 70px 16px 16px 16px;
    }
}