/* Drostei Kirby – Ergänzungen zu main.css
   ========================================= */

/* ── Subnav ──────────────────────────────────────────────────────── */
ul.subnav {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.12);
    z-index: 9999;
    padding: 6px 0 !important;
    min-width: 160px;
}
nav li:hover > ul.subnav {
    display: block;
}

/* ── Header / Logo ───────────────────────────────────────────────── */
hgroup {
    display: inline-block;
}
hgroup a {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}
header hgroup a:hover,
header hgroup a:active {
    background: none;
}

/* ── Utility-Links oben rechts ───────────────────────────────────── */
#navZu {
    float: right;
    font-size: 0.786em;
    color: #333;
    padding-top: 0.3em;
}
#navZu a {
    color: #333;
    text-decoration: none;
}
#navZu a:hover {
    text-decoration: underline;
}

/* ── Hamburger-Button / Utility-Mobile: auf Desktop unsichtbar ───── */
#nav-toggle {
    display: none;
}
nav ul.nav-util-mobile {
    display: none !important;
}

/* ── Startseite: Teaser-Grid ─────────────────────────────────────── */
#startTeaser-container,
#startTeaser-extra {
    margin-top: 1em;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
#startTeaser-extra {
    margin-top: 2em;
}
#startTeaser-container .startTeaser,
#startTeaser-extra .startTeaser {
    width: 220px;
    margin-right: 0;
    margin-bottom: 0;
    flex-shrink: 0;
}
div.startTeaser h2 {
    font-size: 1.1em;
    font-weight: bold;
    text-transform: none;
    margin: 0 0 0.3em;
}
div.startTeaser h2 a {
    color: #333;
}
div.startTeaser h2 a:hover {
    text-decoration: underline;
}

/* ── Footer ──────────────────────────────────────────────────────── */
footer p {
    font-size: 0.85em;
    color: #666;
}
footer a {
    color: #666;
}
.sponsor img {
    max-height: 32px;
    width: auto;
    vertical-align: middle;
}

/* ── Vermietung: Bilder rechts, Text links ───────────────────────── */
#vermietung-page .text figure {
    float: right;
    clear: right;
    width: 38%;
    margin: 0 0 0.75em 1.5em;
}
#vermietung-page .text figure img {
    width: 100%;
    height: auto;
    display: block;
}
#vermietung-page .text figure figcaption {
    font-size: 0.82em;
    color: #666;
    font-style: italic;
    margin-top: 0.3em;
}
#vermietung-page .text::after {
    content: '';
    display: table;
    clear: both;
}

/* ── Bilder im Content ───────────────────────────────────────────── */
.text img {
    max-width: 100%;
    height: auto;
}

/* Event-Detailseite: Bild floated rechts */
#event-page [itemprop="articleBody"] img {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
    width: auto;
    height: auto;
    max-width: 45%;
}
#event-page [itemprop="articleBody"]::after {
    content: "";
    display: table;
    clear: both;
}

/* Event-Detail: Zurück-Link */
[role="main"] > p:last-child {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #eee;
}

/* ── Drostei Digital ─────────────────────────────────────────────── */
ul.digital-artikel-liste {
    list-style: none;
    padding: 0;
    margin: 1.5em 0 0;
}
ul.digital-artikel-liste li.digital-artikel {
    border-bottom: 1px solid #e8e8e8;
    padding: 0.7em 0;
}
ul.digital-artikel-liste li.digital-artikel a {
    color: #333;
    text-decoration: none;
}
ul.digital-artikel-liste li.digital-artikel a:hover {
    text-decoration: underline;
}
ul.digital-artikel-liste li.digital-artikel .digital-artikel-datum {
    float: right;
    font-size: 0.85em;
    color: #999;
}
ul.digital-artikel-liste li.digital-artikel--aktiv span {
    font-weight: bold;
    color: #333;
}

/* Embed-Container 16:9 */
.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5em;
}
.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Artikel-Navigation prev/next */
.digital-artikel-nav {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #eee;
    font-size: 0.9em;
}
.digital-artikel-nav__prev { text-align: left; }
.digital-artikel-nav__next { text-align: right; }
.digital-artikel-nav a {
    color: #333;
    text-decoration: none;
}
.digital-artikel-nav a:hover {
    text-decoration: underline;
}

/* ── 2-Spalten-Layout mit Sidebar ────────────────────────────────── */
[role="main"]:has(.knoten-layout) {
    float: none !important;
    width: auto !important;
}
.knoten-layout {
    display: flex !important;
    gap: 3em;
    align-items: flex-start;
    width: 100% !important;
    box-sizing: border-box;
}
.knoten-content {
    flex: 1 1 auto !important;
    min-width: 0;
}

#drostei-sidebar {
    flex: 0 0 140px !important;
    width: 140px !important;
    max-width: 140px !important;
}
#knoten-sidebar {
    flex: 0 0 100px !important;
    width: 100px !important;
    max-width: 100px !important;
}

/* Gemeinsame Sidebar-Styles */
#drostei-sidebar ul,
#knoten-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}
#drostei-sidebar li,
#knoten-sidebar li {
    margin-bottom: 0.3em;
}
#drostei-sidebar a,
#knoten-sidebar a {
    color: #333;
    text-decoration: none;
    font-size: 0.95em;
}
#drostei-sidebar a:hover,
#knoten-sidebar a:hover {
    text-decoration: underline;
}
#drostei-sidebar li.active a,
#knoten-sidebar li.active a {
    font-weight: bold;
    color: #9b1c1c;
}

/* ── Mitarbeiter-Karten ──────────────────────────────────────────── */
.mitarbeiter-intro {
    width: 100%;
    margin-bottom: 1em;
}
.mitarbeiter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em 2em;
    align-items: flex-start;
}
.mitarbeiter-grid > p {
    flex: 0 0 100%;
}
.person-card {
    flex: 0 1 150px;
    text-align: center;
}
.person-card figure {
    margin: 0 0 0.4em 0;
}
.person-card figure img {
    width: 100%;
    height: auto;
    display: block;
}
.person-card p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

/* ── Mobile (max-width: 34.9375em ≈ 559px) ──────────────────────── */
@media screen and (max-width: 34.9375em) {

    /* Header */
    header { position: relative; }
    #navZu  { display: none; }
    .container { margin-top: 1em; }

    /* Desktop-Breiten aufheben */
    #kulturknotenpunkt-page .container div,
    #die-drostei-page .container div,
    #junge-drostei-page .container div {
        width: 100% !important;
    }

    /* Hamburger-Button */
    #nav-toggle {
        display: block;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        background: none;
        border: none;
        outline: none;
        cursor: pointer;
        padding: 4px;
        z-index: 100;
    }
    #nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: #333;
        margin: 4px 0;
        transition: transform 0.2s, opacity 0.2s;
    }
    #nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    #nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    #nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    /* Navigation */
    nav[role="navigation"] {
        display: none;
        font-size: 1rem;
        font-weight: normal;
    }
    nav[role="navigation"].is-open {
        display: block;
        position: absolute;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.12);
        z-index: 90;
    }
    nav[role="navigation"] ul {
        border-top: 1px solid #ddd;
        border-bottom: none;
        width: 100%;
        margin: 0;
    }
    nav[role="navigation"] li {
        float: none;
        border-bottom: 1px solid #eee;
    }
    nav[role="navigation"] li:last-child {
        border-bottom: none;
    }
    nav[role="navigation"] a {
        display: block;
        padding: 0.65em 0.5em;
        font-size: 0.95rem;
        text-transform: none;
        letter-spacing: 0;
        font-weight: normal;
        color: #333;
        text-shadow: none;
    }
    nav[role="navigation"] li.active a {
        font-weight: bold;
        color: #901d2a;
    }

    /* Utility-Links im Menü */
    nav ul.nav-util-mobile {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0 0.4em;
        list-style: none;
        padding: 0.5em 0;
        margin: 0;
        border-top: 1px solid #ddd;
    }
    nav ul.nav-util-mobile li {
        float: none !important;
        border-bottom: none !important;
        background: none !important;
    }
    nav ul.nav-util-mobile li::after {
        content: '|';
        color: #ccc;
        font-size: 0.78em;
        margin-left: 0.4em;
    }
    nav ul.nav-util-mobile li:last-child::after {
        content: '';
    }
    nav ul.nav-util-mobile a {
        display: inline !important;
        padding: 0 !important;
        font-size: 0.78em !important;
        color: #999 !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        font-weight: normal !important;
    }

    /* Sidebar → horizontale Pill-Leiste */
    .knoten-layout {
        flex-direction: column !important;
        gap: 0 !important;
    }
    #drostei-sidebar,
    #knoten-sidebar {
        order: -1;
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1em;
        padding-bottom: 0.8em;
        border-bottom: 1px solid #eee;
    }
    #drostei-sidebar ul,
    #knoten-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4em;
        text-align: left;
    }
    #drostei-sidebar li,
    #knoten-sidebar li {
        margin-bottom: 0;
    }
    #drostei-sidebar a,
    #knoten-sidebar a {
        display: inline-block;
        padding: 0.3em 0.7em;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 0.9em;
    }
    #drostei-sidebar li.active a,
    #knoten-sidebar li.active a {
        background: #9b1c1c;
        color: #fff !important;
        border-color: #9b1c1c;
        font-weight: bold;
    }
}
