/* =========================================================================
   Spreiberg 2026 – Seitenrahmen
   Kopf, Headerbild/Slideshow, Menü (SmartMenus), Spalten, Footer.
   Alle Klassen beginnen mit "s26-" (keine Kollision mit Inhalts-CSS).
   Farben: css/theme.css
   ========================================================================= */

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }

body.s26-body {
    margin: 0;
    font-family: var(--s26-font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--s26-text);
    background: var(--s26-bg) linear-gradient(180deg, var(--s26-sky1) 0, var(--s26-sky2) 420px, var(--s26-bg) 800px) no-repeat;
}

.s26-page,
.s26-page > *,
.s26-brandrow *,
.s26-hero *,
.s26-nav *,
.s26-more *,
.s26-footer * { box-sizing: border-box; }

.s26-page { display: flex; flex-direction: column; min-height: 100vh; }
.s26-wrap { width: 100%; max-width: 1248px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

.s26-page a:focus-visible,
.s26-page button:focus-visible { outline: 3px solid var(--s26-accent); outline-offset: 2px; }

/* Sprunglink für Tastatur und Screenreader */
.s26-skip {
    position: absolute; left: -9999px; top: 8px; z-index: 2000;
    padding: 10px 16px; border-radius: 10px;
    background: #fff; color: var(--s26-ink); box-shadow: var(--s26-shadow);
}
.s26-skip:focus { left: 12px; }

/* ---------------------------------------------------------------- Kopf: Logo + Vereinsname */
.s26-brandrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 18px; }
.s26-brand { display: flex; align-items: center; gap: 14px; color: var(--s26-ink); text-decoration: none; }
.s26-brand img { width: 58px; height: 58px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(15, 29, 69, .15); }
.s26-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.s26-brand-text small { font-size: 13px; color: var(--s26-muted); }
.s26-brand-text strong { font-size: 22px; }

/* Menü-Schalter (nur mobil sichtbar) */
.s26-menu-state { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }
.s26-burger {
    display: none; flex: none; width: 46px; height: 46px; padding: 13px 11px;
    border: 1px solid var(--s26-line); border-radius: 12px; background: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.s26-burger span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--s26-ink); transition: transform .25s, opacity .25s; }
.s26-menu-state:checked ~ .s26-brandrow .s26-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.s26-menu-state:checked ~ .s26-brandrow .s26-burger span:nth-child(2) { opacity: 0; }
.s26-menu-state:checked ~ .s26-brandrow .s26-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.s26-menu-state:focus-visible ~ .s26-brandrow .s26-burger { outline: 3px solid var(--s26-accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Headerbild / Slideshow */
.s26-hero {
    position: relative;
    aspect-ratio: 1200 / 430;
    max-height: 430px;
    overflow: hidden;
    border-radius: 26px;
    background: var(--s26-sky1);
    box-shadow: 0 20px 50px rgba(15, 29, 69, .18);
}
.s26-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.s26-hero-title {
    position: absolute; left: 32px; bottom: 62px; z-index: 1;
    max-width: calc(100% - 64px);
    margin: 0; padding: 14px 26px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--s26-ink);
    font-size: 2.3rem; font-weight: 700; line-height: 1.15;
}
.s26-hero-title::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--s26-accent); }
.s26-hero-title span { display: block; margin-top: 4px; font-size: .55em; font-weight: 600; color: var(--s26-muted); }

.s26-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.s26-slide.is-active { opacity: 1; }
.s26-dots { position: absolute; right: 28px; bottom: 66px; z-index: 2; display: flex; gap: 8px; }
.s26-dot { width: 13px; height: 13px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: rgba(255, 255, 255, .45); cursor: pointer; }
.s26-dot.is-active { border-color: var(--s26-accent); background: var(--s26-accent); }
@media (prefers-reduced-motion: reduce) { .s26-slide { transition: none; } }

/* ---------------------------------------------------------------- Hauptmenü (Desktop: schwebend + klebend) */
.s26-nav {
    position: -webkit-sticky;
    position: sticky;
    top: var(--s26-sticky-top);
    z-index: 1000;
    align-self: center;
    max-width: calc(100% - 32px);
    margin-top: 22px;
    padding: 6px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 29, 69, .15);
}
.s26-nav--overlap { margin-top: -30px; }   /* ragt über den unteren Rand des Headerbilds */

@media (min-width: 901px) {
    .s26-menu-state { display: none; }

    /* SmartMenus: Desktop-Modus (Dropdowns) */
    .s26-sm ul { position: absolute; width: 17em; }   /* Breite steuert SmartMenus (js/template.js) */
    .s26-sm > li { float: left; }
    .s26-sm ul li { float: none; }
    .s26-sm a { white-space: nowrap; }
    .s26-sm ul a { white-space: normal; }

    .s26-sm > li > a {
        padding: 10px 18px; border-radius: 999px;
        color: var(--s26-ink); font-size: 16px; font-weight: 600; line-height: 1.5; text-decoration: none;
    }
    .s26-sm > li > a.has-submenu { padding-right: 32px; }
    .s26-sm > li > a:hover,
    .s26-sm > li > a.highlighted { background: var(--s26-chip); }
    .s26-sm > li > a.menu-current,
    .s26-sm > li > a.menu-parent { background: var(--s26-primary); color: #fff; }

    .s26-sm a .sub-arrow {
        position: absolute; top: 50%; right: 14px;
        width: 0; height: 0; margin-top: -2px; overflow: hidden; font-size: 0;
        border: 5px solid transparent; border-top-color: currentColor; border-bottom-width: 0;
        opacity: .65;
    }

    .s26-sm ul {
        padding: 6px;
        border: 1px solid var(--s26-line); border-radius: 14px;
        background: #fff;
        box-shadow: 0 16px 40px rgba(15, 29, 69, .16);
    }
    .s26-sm ul a {
        padding: 8px 30px 8px 12px; border-radius: 8px;
        color: var(--s26-text); font-size: 15px; line-height: 1.4; text-decoration: none;
    }
    .s26-sm ul a:hover,
    .s26-sm ul a.highlighted { background: var(--s26-bg); color: var(--s26-ink); }
    .s26-sm ul a.menu-parent { color: var(--s26-primary); font-weight: 600; }
    .s26-sm ul a.menu-current { background: var(--s26-chip); color: var(--s26-primary); font-weight: 600; }
    .s26-sm ul a .sub-arrow {
        right: 12px; margin-top: -5px;
        border: 5px solid transparent; border-left-color: currentColor; border-right-width: 0;
    }

    /* Pfeile für sehr lange Untermenüs (SmartMenus) */
    .s26-sm span.scroll-up,
    .s26-sm span.scroll-down { position: absolute; display: none; visibility: hidden; overflow: hidden; height: 20px; background: #fff; }
    .s26-sm span.scroll-up-arrow,
    .s26-sm span.scroll-down-arrow {
        position: absolute; top: -2px; left: 50%; width: 0; height: 0; margin-left: -8px; overflow: hidden;
        border: 8px dashed transparent; border-bottom: 8px solid var(--s26-ink);
    }
    .s26-sm span.scroll-down-arrow { top: 6px; border: 8px dashed transparent; border-top: 8px solid var(--s26-ink); }
}

/* ---------------------------------------------------------------- Inhalt */
.s26-main { flex: 1 0 auto; padding-top: 26px; padding-bottom: 44px; }
.s26-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.s26-columns--sidebar { grid-template-columns: minmax(0, 1fr) 340px; }

.s26-card {
    display: flow-root;           /* umflossene Bilder bleiben in der Karte */
    box-sizing: border-box;
    min-width: 0;
    padding: 34px 42px;
    border-radius: var(--s26-radius);
    background: var(--s26-surface);
    box-shadow: var(--s26-shadow);
}
.s26-sidebar { padding: 26px; background: linear-gradient(180deg, #fff, #f3f7fe); font-size: 15px; }
.s26-wide { margin-bottom: 28px; }
.s26-columns + .s26-wide { margin-top: 28px; margin-bottom: 0; }

/* "Weitere Seiten" */
.s26-more { margin-top: 34px; }
.s26-more-title {
    margin: 0 0 14px;
    color: var(--s26-muted); font-size: 1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.s26-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.s26-chips li { margin: 0; }
.s26-chips a {
    display: block; padding: 8px 16px;
    border: 1px solid var(--s26-chip-line); border-radius: 999px;
    background: var(--s26-chip); color: var(--s26-ink);
    font-size: 15px; font-weight: 500; text-decoration: none;
}
.s26-chips a:hover { border-color: var(--s26-primary); background: var(--s26-primary); color: #fff; }

/* ---------------------------------------------------------------- Footer */
.s26-footer {
    padding: 30px 0;
    border-top: 1px solid var(--s26-line);
    background: #fff;
    color: var(--s26-muted); font-size: 14px; line-height: 1.7; text-align: center;
}
.s26-footer a { color: var(--s26-primary); text-decoration: none; }
.s26-footer a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Mobil / Tablet */
@media (max-width: 1100px) {
    .s26-columns--sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 900px) {
    /* Reihenfolge: Kopf, Menü (aufklappbar), Headerbild, Inhalt, Footer */
    .s26-brandrow { order: 1; padding-top: 14px; padding-bottom: 12px; }
    .s26-nav { order: 2; }
    .s26-hero-wrap, .s26-hero-custom { order: 3; }
    .s26-main { order: 4; padding-top: 18px; padding-bottom: 32px; }
    .s26-footer { order: 5; }

    .s26-wrap { padding-left: 14px; padding-right: 14px; }
    .s26-brand img { width: 44px; height: 44px; }
    .s26-brand-text small { font-size: 12px; }
    .s26-brand-text strong { font-size: 18px; }
    .s26-burger { display: block; }

    .s26-hero { aspect-ratio: 16 / 9; border-radius: 18px; }
    .s26-hero-title { left: 14px; bottom: 14px; max-width: calc(100% - 28px); padding: 8px 16px; font-size: 1.45rem; }
    .s26-hero-title::after { width: 40px; height: 3px; margin-top: 5px; }
    .s26-dots { right: 16px; bottom: 18px; }
    .s26-slides .s26-hero-title { right: 90px; }

    .s26-columns,
    .s26-columns--sidebar { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .s26-card { padding: 22px 18px; border-radius: 18px; overflow-x: clip; }   /* nichts schiebt die Seite seitlich */

    /* Menü: aufklappbare Liste unter dem Kopf (SmartMenus "collapsible") */
    .s26-nav,
    .s26-nav--overlap {
        position: static;
        align-self: stretch;
        max-width: none;
        margin: 0 14px 14px;
        padding: 0;
        border-radius: 18px;
        overflow: hidden;
    }
    .s26-menu-state:not(:checked) ~ .s26-nav { display: none; }

    .s26-sm a {
        padding: 13px 60px 13px 20px;
        border-top: 1px solid var(--s26-line);
        color: var(--s26-ink); font-weight: 600; line-height: 1.4; text-decoration: none;
    }
    .s26-sm > li:first-child > a { border-top: 0; }
    .s26-sm a.menu-parent { color: var(--s26-primary); }
    .s26-sm a.menu-current { color: var(--s26-primary); box-shadow: inset 4px 0 0 var(--s26-accent); }
    .s26-sm ul { background: #f6f8fc; }
    .s26-sm ul ul { background: #eff3fa; }
    .s26-sm ul a { padding-left: 34px; font-weight: 500; }
    .s26-sm ul ul a { padding-left: 48px; }
    .s26-sm ul ul ul a { padding-left: 62px; }
    .s26-sm ul ul ul ul a { padding-left: 76px; }

    /* +/- Schalter zum Auf- und Zuklappen */
    .s26-sm a .sub-arrow {
        position: absolute; top: 50%; right: 10px;
        width: 38px; height: 38px; margin-top: -19px; overflow: hidden;
        border: 1px solid var(--s26-line); border-radius: 10px;
        background: #fff; color: var(--s26-ink);
        font: 600 20px/36px var(--s26-font); text-align: center;
    }
    .s26-sm a.highlighted .sub-arrow::before { content: "\2212"; display: block; }
}
