/*
Theme Name: Steiner Vereine
Description: Mobile-first Theme des Vereinsportals. Auf dem Handy mit App-Leiste unten, am Rechner mit Menü in der Kopfzeile. Farben und Namen kommen aus den Einstellungen des Plugins "Steiner Vereine - Basis"; hier steht kein fester Vereins- oder Farbwert.
Version: 0.3.1
Requires PHP: 7.4
Author: Steiner-Vereine.de
Text Domain: sv-theme
*/

/*
 * Aufbau dieser Datei: Grundlagen, Kopfzeile, Inhalt, Fusszeile, App-Leiste, Symbole, Breite Bildschirme.
 *
 * Mobile zuerst: Alles ohne Media-Query gilt fuers Handy, ab 768 px kommen
 * Aenderungen fuer Tablet und Rechner dazu.
 *
 * Farben nur als Variablen (--sv-primaer, --sv-akzent, --sv-text, --sv-hintergrund und die
 * davon abgeleiteten lesbaren Varianten --sv-primaer-flaeche (Flaechen mit Schrift) und
 * --sv-primaer-text (Schrift auf hellem Grund), siehe Plugin sv-basis/inc/design.php), gesetzt vom Plugin
 * sv-basis in einem <style> im Seitenkopf. Die Werte hinter den Kommas sind nur Rueckfall.
 * Keine fremden Schriften, keine CDNs: Systemschrift, Symbole als eingebettetes SVG.
 *
 * Wirkung: ruhig und flach (Haarlinien statt dicker Raender, zarte Toenung statt voller Flaechen, leichte Schrift,
 * viel Luft). Die gemeinsamen Masse (--sv-linie, --sv-radius, --sv-primaer-tint ...) definiert sv-basis/assets/portal.css;
 * hier stehen sie mit Rueckfallwerten, damit das Theme auch ohne sie sauber aussieht.
 */

/* ---- Grundlagen ------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--sv-text, #222);
    background: var(--sv-hintergrund, #f6f7f8);
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
}
/* Stufen im Seitentext (Titel der Seite siehe .sv-titel); die Kaesten der Startseite legen ihre Groessen selbst fest */
h2 {
    font-size: 1.4rem;
}
h3 {
    font-size: 1.15rem;
}
h4 {
    font-size: 1rem;
}
a {
    color: var(--sv-primaer-text, #7a1b3c);
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
}
a:hover {
    text-decoration-thickness: 2px;
}
img {
    max-width: 100%;
    height: auto;
}
.sv-sprung {
    position: absolute;
    left: -9999px;
    top: .5rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: #fff;
    border-radius: var(--sv-radius-klein, 8px);
}
.sv-sprung:focus {
    left: .5rem;
}

/* ---- Kopfzeile -------------------------------------------------------- */
/* Hell und ruhig: Das Wappen (im Originalton) und der Name tragen die Seite, darunter nur eine Haarlinie.
   Wo der Browser es kann, schimmert der Inhalt beim Scrollen leicht durch (wie bei Apps). */
.sv-kopf {
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: env(safe-area-inset-top);
    background: #fff;
    color: var(--sv-text, #222);
    border-bottom: 1px solid var(--sv-linie, rgba(0, 0, 0, .08));
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .sv-kopf {
        background: rgba(255, 255, 255, .88);
        -webkit-backdrop-filter: saturate(1.6) blur(14px);
        backdrop-filter: saturate(1.6) blur(14px);
    }
}
.sv-kopf-innen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: .45rem 1rem;
}
.sv-marke {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: inherit;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.2;
}
.sv-logo {
    display: block;
    width: auto;
    height: 40px;
}
.sv-kopf-rechts {
    display: flex;
    align-items: center;
    gap: .25rem;
}
/* Link "Anmelden" / "Mein Konto" (nur, wenn ein Modul eine Konto-Seite meldet) */
.sv-konto-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    font-size: .95rem;
    color: inherit;
    text-decoration: none;
}
.sv-konto-link:hover {
    background: rgba(0, 0, 0, .05);
}
.sv-konto-link svg {
    flex: none;
}
@media (max-width: 359px) {
    .sv-konto-link span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}
.sv-menue {
    display: none;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sv-menue a {
    display: block;
    padding: .45rem .8rem;
    border-radius: 999px;
    font-size: .95rem;
    color: inherit;
    text-decoration: none;
}
.sv-menue a:hover {
    background: rgba(0, 0, 0, .05);
}
.sv-menue .current-menu-item > a {
    color: var(--sv-primaer-text, #7a1b3c);
    font-weight: 600;
    background: var(--sv-primaer-tint, rgba(0, 0, 0, .06));
}

/* ---- Inhalt ----------------------------------------------------------- */
.sv-haupt {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
}
.sv-artikel {
    margin: 0 0 1.5rem;
}
.sv-titel {
    margin: .5rem 0 1rem;
    font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.2rem);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.sv-titel a {
    text-decoration: none;
}
.sv-inhalt > :first-child {
    margin-top: 0;
}
.sv-beitrag-meta {
    margin: -.5rem 0 1rem;
    font-size: .875rem;
    opacity: .7;
}
.sv-beitrag-bild {
    display: block;
    margin: 0 0 1rem;
    border-radius: var(--sv-radius, 12px);
}
/* Widget-Flaechen "Startseite": zwei Spalten ab 900 px, darunter untereinander */
.sv-startseite-raster {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1rem 0 0;
}
.sv-spalte {
    display: contents;   /* Handy: beide Spalten werden zu einer Liste, die Kaesten ordnen sich nach "order" */
}
.sv-widget {
    order: 5;
    min-width: 0;
    margin: 0;
}
/* Reihenfolge auf dem Handy: Seitentext, die gemeinsamen Aktionen (Umzug, Markt; untereinander in der Reihenfolge der Flaeche), Termine, Aktuelles, alles andere */
.sv-widget-text {
    order: 0;
}
.sv-widget-markt {
    order: 1;
}
.sv-widget-umzug {
    order: 1;
}
.sv-widget-kalender {
    order: 2;
}
.sv-widget-aktuell {
    order: 3;
}
@media (min-width: 900px) {
    .sv-startseite-raster {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        gap: 2rem;
        align-items: start;
    }
    .sv-spalte {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        min-width: 0;
    }
    .sv-widget {
        order: 0;
    }
    .sv-spalte-rechts {
        position: sticky;
        top: 5.5rem;
    }
}

/* ---- Fusszeile -------------------------------------------------------- */
/* Gut sichtbar, aber leise: eigene helle Flaeche mit Haarlinie; Betreiber und Rechtliches (Impressum, Datenschutz) als Knoepfe mit feinem Rand */
.sv-fuss {
    margin-top: 3rem;
    padding: 2rem 1rem 2.25rem;
    font-size: .9375rem;
    background: #fff;
    border-top: 1px solid var(--sv-linie, rgba(0, 0, 0, .08));
}
.sv-fuss-innen {
    display: grid;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}
.sv-fuss-titel {
    margin: 0 0 .5rem;
    font-size: .8125rem;
    font-weight: 600;
    opacity: .6;
}
.sv-fuss p {
    margin: 0 0 .35rem;
}
.sv-fuss-name {
    font-size: 1.05rem;
}
.sv-fuss-menue {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sv-fuss-menue a {
    display: inline-block;
    padding: .5rem 1.05rem;
    font-weight: 500;
    color: var(--sv-primaer-text, #7a1b3c);
    text-decoration: none;
    border: 1px solid var(--sv-primaer-rand, rgba(0, 0, 0, .25));
    border-radius: 999px;
}
.sv-fuss-menue a:hover,
.sv-fuss-menue a:focus-visible {
    background: var(--sv-primaer-tint, rgba(0, 0, 0, .05));
}
.sv-fuss-menue a:focus-visible {
    outline: 2px solid var(--sv-primaer-text, #7a1b3c);
    outline-offset: 2px;
}
.sv-fuss-klein {
    grid-column: 1 / -1;
    font-size: .8125rem;
    opacity: .7;
}

/* ---- App-Leiste (unten, nur Handy) ------------------------------------ */
.sv-hat-appleiste {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
.sv-appleiste {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--sv-linie, rgba(0, 0, 0, .08));
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .sv-appleiste {
        background: rgba(255, 255, 255, .9);
        -webkit-backdrop-filter: saturate(1.6) blur(14px);
        backdrop-filter: saturate(1.6) blur(14px);
    }
}
.sv-appleiste ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sv-appleiste li {
    flex: 1 1 0;
    min-width: 0;
}
.sv-appleiste a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    padding: .55rem .25rem .45rem;
    font-size: .72rem;
    line-height: 1.2;
    color: var(--sv-text, #222);
    text-decoration: none;
    opacity: .7;
}
.sv-appleiste a::before {
    content: "";
    width: 24px;
    height: 24px;
    background: currentColor;
    -webkit-mask: var(--sv-ico, none) center / contain no-repeat;
    mask: var(--sv-ico, none) center / contain no-repeat;
}
.sv-appleiste .current-menu-item > a,
.sv-appleiste .current_page_item > a {
    color: var(--sv-primaer-text, #7a1b3c);
    font-weight: 600;
    opacity: 1;
}

/* ---- Symbole der App-Leiste -------------------------------------------
 * Im Menue-Editor beim Menuepunkt unter "CSS-Klassen" eintragen
 * (Ansicht oben rechts "Optionen einblenden" -> "CSS-Klassen" haken).
 * Verfuegbar: sv-ico-home, sv-ico-vereine, sv-ico-markt, sv-ico-umzug,
 *             sv-ico-pinnwand, sv-ico-download, sv-ico-mehr.
 * Eingebettetes SVG, nur die Form zaehlt (Maske), die Farbe kommt vom Text.
 */
.sv-ico-home > a {
    --sv-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z'/%3E%3C/svg%3E");
}
.sv-ico-vereine > a {
    --sv-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6'/%3E%3Ccircle cx='17.5' cy='9' r='2.5'/%3E%3Cpath d='M17 14.2c2.7.1 4.5 2 4.5 5'/%3E%3C/svg%3E");
}
.sv-ico-markt > a {
    --sv-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9'/%3E%3Cpath d='M3 9h18v1a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0z'/%3E%3Cpath d='M5 13v8h14v-8'/%3E%3C/svg%3E");
}
.sv-ico-umzug > a {
    --sv-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='19' r='2.5'/%3E%3Ccircle cx='18' cy='5' r='2.5'/%3E%3Cpath d='M8.5 19H15a3.5 3.5 0 0 0 0-7H9a3.5 3.5 0 0 1 0-7h6.5'/%3E%3C/svg%3E");
}
.sv-ico-pinnwand > a {
    --sv-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6l-1 6 3 3v2H7v-2l3-3z'/%3E%3Cpath d='M12 14v7'/%3E%3C/svg%3E");
}
.sv-ico-download > a {
    --sv-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4'/%3E%3Cpath d='M4 17v3h16v-3'/%3E%3C/svg%3E");
}
.sv-ico-mehr > a {
    --sv-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='5' cy='12' r='1.8'/%3E%3Ccircle cx='12' cy='12' r='1.8'/%3E%3Ccircle cx='19' cy='12' r='1.8'/%3E%3C/svg%3E");
}

/* ---- Tablet und Rechner ----------------------------------------------- */
@media (min-width: 768px) {
    .sv-menue {
        display: flex;
    }
    .sv-appleiste {
        display: none;
    }
    .sv-hat-appleiste {
        padding-bottom: 0;
    }
    .sv-haupt {
        padding: 1.5rem;
    }
    .sv-fuss-innen {
        grid-template-columns: 1fr 1fr;
    }
}
