/*
Theme Name: Scuderia Magra
Theme URI: https://www.scuderia-magra.de
Author: Tilmann Klein
Description: Custom Block Theme fuer die Scuderia-Magra-Vereinswebseite. Repliziert den Look des bisherigen Angular-19-Frontends. Bewusst ohne Third-Party-Plugins.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scuderia-magra
*/

/* ----------------------------------------------------------------
 * Globaler Body + Typografie
 * Replika aus user/src/styles.css. Default-BG ist dunkles Navy mit
 * Raster-Overlay; pro Page wird via body.sm-bg-<slug> ein eigenes
 * Hintergrundbild gesetzt (siehe body.sm-bg-* am Ende der Datei).
 * ---------------------------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;
}

body {
    background-color: #152236;
    background-image: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
    font-family: 'Poppins', 'Helvetica Neue', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* 60% dark overlay damit der Background lesbar bleibt (entspricht
 * .main_container::before im Angular-Frontend). */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 0;
}

/* Dot-Raster als zweiter Layer ueber dem Dark-Overlay (entspricht
 * .dot-raster-overlay im page-wrapper.component). */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('assets/raster.png');
    background-repeat: repeat;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.wp-site-blocks {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.wp-site-blocks > * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

/* ----------------------------------------------------------------
 * Pro-Page-Hintergrund (Replik der backgroundImagePath-Inputs)
 * ---------------------------------------------------------------- */
body.sm-bg-home { background-image: none; background-color: #152236; }
body.sm-bg-news,
body.sm-bg-aktuelles,
body.sm-bg-ueber-uns { background-image: url('assets/racingtrack.jpg'); }
body.sm-bg-berichte  { background-image: url('assets/bg_racing.jpg'); }
body.sm-bg-ergebnisse { background-image: url('assets/results_flag.jpg'); }
body.sm-bg-presse    { background-image: url('assets/news.jpg'); }
body.sm-bg-vorstand  { background-image: url('assets/carbon_dark.jpg'); }
body.sm-bg-aktive    { background-image: url('assets/carbon_dark.jpg'); }
body.sm-bg-termine   { background-image: url('assets/tacho.jpg'); }
body.sm-bg-bilder,
body.sm-bg-bildstrecken { background-image: url('assets/carbon_dark.jpg'); }
body.sm-bg-videos    { background-image: url('assets/carbon_dark.jpg'); }
/* Clublokal hat im Angular-Original keinen backgroundImagePath — kein Hero-Bild. */
body.sm-bg-clublokal { background-image: none; }
body.sm-bg-home::before,
body.sm-bg-clublokal::before { background: transparent; }
body.sm-bg-geschichte { background-color: #1c1c1e; background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px); }
body.sm-bg-datenschutz,
body.sm-bg-impressum { background-image: url('assets/carbon_dark.jpg'); }

/* ----------------------------------------------------------------
 * Header / Navbar — Replik shared/navbar
 * Transparenter, absolut positionierter Header. Logo links gross,
 * "NAVIGATION"-Label + Burger rechts. Alle Nav-Items ueber das
 * overlayMenu (Burger) erreichbar.
 * ---------------------------------------------------------------- */
.sm-site-header {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 28px !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
}

.sm-site-header > * {
    pointer-events: auto;
}

.sm-site-header .wp-block-site-logo {
    margin: 0;
}

.sm-site-header .wp-block-site-logo a {
    display: block;
}

.sm-site-header .wp-block-site-logo img {
    height: 70px !important;
    max-height: 70px !important;
    width: auto !important;
    display: block;
}

/* Navigation-Block: im Closed-State nur Burger sichtbar */
.sm-site-header .wp-block-navigation {
    color: #fff;
}

.sm-site-header .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
}

.sm-site-header .wp-block-navigation__responsive-container-open {
    display: flex !important;
    align-items: center;
    gap: 12px;
    color: #fff !important;
    padding: 8px 4px;
    background: transparent;
}

/* "NAVIGATION" Label vor dem Burger-Icon */
.sm-site-header .wp-block-navigation__responsive-container-open::before {
    content: "NAVIGATION";
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sm-site-header .wp-block-navigation__responsive-container-open svg {
    fill: #fff;
    width: 28px;
    height: 28px;
}

/* Overlay-Container (Slide-in Menu) — rechte Spalte 280px */
.sm-site-header .wp-block-navigation__responsive-container.is-menu-open {
    background: rgba(8, 18, 32, 0.96) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding-top: 80px !important;
}

.sm-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    gap: 10px !important;
    font-size: 17px;
}

.sm-site-header .wp-block-navigation a {
    color: #81b5ec !important;
    text-decoration: none;
    font-weight: 500;
}

.sm-site-header .wp-block-navigation a:hover,
.sm-site-header .wp-block-navigation .current-menu-item a {
    color: #fff !important;
}

/* Submenu-Eintraege (eingerueckt) */
.sm-site-header .wp-block-navigation__submenu-container {
    background: transparent !important;
    border: none !important;
    padding-left: 12px !important;
    min-width: 0 !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Submenu-Toggle: kein hover-dropdown, alles immer ausgeklappt */
.sm-site-header .wp-block-navigation-submenu {
    position: static !important;
}

.sm-site-header .wp-block-navigation-submenu__toggle {
    display: none !important;
}

/* Spacer aus dem alten Layout nicht mehr noetig */
.sm-header-spacer {
    display: none !important;
}

/* ----------------------------------------------------------------
 * Hero-Section (nur Homepage)
 * Vimeo-Background-Loop mit Overlay und grossem H1.
 * ---------------------------------------------------------------- */
.sm-hero {
    position: relative;
    height: 100vh;
    min-height: 620px;
    overflow: hidden;
    margin-top: 0;
    padding: 0;
}

.sm-hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 16:9-Cover-Trick fuer Iframe: immer so skalieren, dass es den Container
 * komplett ausfuellt. max(100vw, 177.78vh) = breiteste Seite; max(56.25vw, 100vh)
 * = hoechste Seite. Dadurch verhaelt sich das iframe wie ein object-fit:cover. */
.sm-hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100vw, 177.78vh);
    height: max(56.25vw, 100vh);
    transform: translate(-50%, -50%);
    border: 0;
}

/* Leichter Dunkel-Overlay ueber dem Video, damit die Headline lesbar bleibt. */
.sm-hero-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 31, 51, 0.35) 0%, rgba(17, 31, 51, 0.6) 100%);
    pointer-events: none;
}

.sm-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 40px 80px;
    max-width: none;
}

.sm-hero-title {
    color: #fff !important;
    font-size: clamp(2.5rem, 7vw, 6rem) !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1 !important;
    margin: 0 !important;
    text-shadow: 0 4px 32px rgba(0, 0, 0, 0.7);
}

/* ADAC-Badge rechts oben im Hero */
.sm-adac-badge {
    position: absolute !important;
    top: 120px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

.sm-adac-label {
    color: #fff !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin: 0 !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.sm-adac-logo {
    margin: 0 !important;
}

.sm-adac-logo img {
    width: 64px;
    height: auto;
    display: block;
}

/* ----------------------------------------------------------------
 * Homepage-News-Teaser
 * Begrenzte Anzahl Cards + Tagline darunter.
 * ---------------------------------------------------------------- */
.sm-home-news {
    padding-top: 60px;
}

.sm-more-link {
    margin-top: 20px !important;
}

.sm-more-link a {
    color: #ffcf01 !important;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}

.sm-more-link a:hover {
    color: #ffd500 !important;
}

.sm-tagline {
    color: #fff !important;
    margin-top: 60px !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.sm-subtagline {
    color: rgba(255, 255, 255, 0.75) !important;
    margin-top: 10px !important;
    font-size: 1.15rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.03em;
}

/* ----------------------------------------------------------------
 * Bubble-Headline
 * Gelbes Quadrat mit Seitentitel — Signature-Element der Scuderia.
 * ---------------------------------------------------------------- */
.sm-bubble {
    display: inline-block;
    background: #ffcf01;
    color: #03182b;
    font-size: 28px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 4px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ----------------------------------------------------------------
 * Glassmorphism-Karten
 * Repliziert .content-grid li / News-Cards aus dem Angular-Frontend.
 * ---------------------------------------------------------------- */
.sm-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 4px;
    padding: 30px 35px;
    color: #03182b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.sm-card h1, .sm-card h2, .sm-card h3 {
    color: #516786;
}

.sm-card-dark {
    background: rgba(0, 0, 0, 0.43);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 30px 35px;
    color: #fff;
}

/* ----------------------------------------------------------------
 * Single-Post-Hero
 * Linear Gradient #003366 -> #00519f -> #0077b6 (aus news-viewer).
 * ---------------------------------------------------------------- */
.wp-site-blocks .sm-post-hero {
    background: linear-gradient(135deg, #003366 0%, #00519f 40%, #0077b6 100%);
    margin-top: 120px !important;
    padding: 30px 0 15px;
}

.sm-post-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.sm-post-hero h1 {
    color: #fff !important;
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 auto 6px 0 !important;
    text-align: left !important;
}

/* Teaser-Text unter dem Titel (nur wenn manueller Excerpt vorhanden) */
.sm-post-teaser-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    max-width: 700px;
    margin: 10px auto 0 0 !important;
    text-align: left;
}

/* ----------------------------------------------------------------
 * Post-Body
 * Zwei-Spalten-Grid wie news-viewer: 400px Bild | 1fr Content.
 * ---------------------------------------------------------------- */
.sm-post-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.sm-post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}

@media (min-width: 1024px) {
    .sm-post-layout {
        grid-template-columns: 1fr 400px;
    }
}

.sm-post-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.sm-post-content {
    color: #fff;
    line-height: 1.8;
    font-size: 1.05em;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}

.sm-post-content > *,
.sm-post-content .wp-block-post-content,
.sm-post-content .wp-block-post-content > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
}

.sm-post-content p {
    margin-top: 0;
    margin-bottom: 0.4em;
    text-align: left;
}

/* Yellow-Link-Style aus news-viewer */
.sm-post-content a {
    background-color: rgba(255, 207, 1, 0.15);
    color: #ffd500;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.sm-post-content a:hover {
    background-color: rgba(255, 207, 1, 0.3);
}

.sm-post-content a::after {
    content: ' \2197';
    font-size: 0.9em;
}

/* ----------------------------------------------------------------
 * Post-Gallery-Preview (klickbar, oeffnet Angular-Viewer)
 * ---------------------------------------------------------------- */
.sm-post-gallery-preview {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    cursor: pointer;
}
.sm-post-gallery-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
}
.sm-post-gallery-preview:hover .sm-post-gallery-cover {
    transform: scale(1.01);
}
.sm-post-gallery-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.85em;
    padding: 4px 10px;
    border-radius: 3px;
}
.sm-post-gallery-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
}
.sm-post-gallery-preview:hover .sm-post-gallery-play {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

/* ----------------------------------------------------------------
 * Listing (Index / Archive)
 * Karten-Grid mit Glas-Cards.
 * ---------------------------------------------------------------- */
.sm-listing {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.sm-listing .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
}

.sm-listing .wp-block-post {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.sm-listing .wp-block-post:hover {
    transform: translateY(-4px);
}

.sm-listing .wp-block-post-featured-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.sm-listing .wp-block-post-title {
    padding: 20px 25px 0;
    font-size: 1.35em;
    font-weight: 600;
    color: #516786;
}

.sm-listing .wp-block-post-title a {
    color: #516786;
    text-decoration: none;
}

.sm-listing .wp-block-post-excerpt {
    padding: 10px 25px 25px;
    color: #03182b;
    font-size: 0.95em;
    line-height: 1.6;
}

/* ----------------------------------------------------------------
 * Page-Template (generische WP-Pages — Impressum, Datenschutz …)
 * ---------------------------------------------------------------- */
.sm-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.sm-static-wrap {
    padding-top: 20px;
}

.sm-static-body {
    color: #fff;
    line-height: 1.7;
    font-size: 1rem;
}

.sm-static-body h1,
.sm-static-body h2,
.sm-static-body h3,
.sm-static-body h4 {
    color: #ffcf01;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-weight: 700;
}

.sm-static-body h1 { font-size: 1.8rem; }
.sm-static-body h2 { font-size: 1.45rem; }
.sm-static-body h3 { font-size: 1.2rem; }

.sm-static-body p {
    margin: 0 0 1em;
}

.sm-static-body a {
    color: #ffd500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.sm-static-body a:hover {
    color: #ffcf01;
}

.sm-static-body ul,
.sm-static-body ol {
    margin: 0 0 1em 1.4em;
}

.sm-static-body strong {
    color: #fff;
}

/* Clublokal-Body-Card — kein Hintergrund, Padding bleibt fuer Innenabstand */
.sm-clublokal-body {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Clublokal-Karte — 1:1 Angular-GeomapComponent */
.sm-clublokal-map-wrap {
    width: 100%;
    padding: 40px;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    box-sizing: border-box;
}
.sm-clublokal-map {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    height: 400px;
}
/* OL-Controls (Zoom-Buttons) in Theme-Farben */
.sm-clublokal-map .ol-control button {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}
.sm-clublokal-map .ol-control button:hover,
.sm-clublokal-map .ol-control button:focus {
    background: rgba(0, 0, 0, 0.85);
}

/* ----------------------------------------------------------------
 * Events-Liste (/termine)
 * Ein Eintrag = Date-Box links + Titel/Desc rechts, gruppiert nach Monat.
 * ---------------------------------------------------------------- */
.sm-events-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 10px;
}

.sm-events-group-title {
    color: #fff !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
    margin: 0 0 16px !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sm-events-count {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 8px;
}

.sm-events-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.sm-event-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 14px 18px;
    color: #fff;
}

.sm-event-date-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #00519f;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 3px;
    padding: 10px 6px;
    text-align: center;
    line-height: 1.25;
}

.sm-event-date-bis {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.8;
    margin: 2px 0;
}

.sm-event-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.sm-event-title {
    color: #fff !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    line-height: 1.3;
}

.sm-event-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

.sm-event-desc p {
    margin: 0;
}

.sm-events-empty {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    padding: 20px 0;
}

@media (max-width: 600px) {
    .sm-event-card {
        grid-template-columns: 90px 1fr;
        gap: 12px;
        padding: 12px 14px;
    }
    .sm-event-date-box {
        font-size: 0.82rem;
        padding: 8px 4px;
    }
}

/* ----------------------------------------------------------------
 * Persons-Liste (/vorstand + /aktive)
 * Card-Grid mit Foto + Name + optionalem Role-Label + Description.
 * ---------------------------------------------------------------- */
.sm-persons-grid {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}

.sm-person-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 4px;
    overflow: hidden;
    color: #03182b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.sm-person-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #1a2a44;
    overflow: hidden;
}

.sm-person-image img {
    width: 100%;
    height: 100%;
    display: block;
    /* object-fit wird pro Card aus _sm_person_display_mode inline gesetzt */
}

.sm-person-body {
    padding: 16px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
}

.sm-person-role {
    color: #516786 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 !important;
}

.sm-person-name {
    color: #03182b !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    line-height: 1.3;
}

.sm-person-desc {
    color: rgba(3, 24, 43, 0.78);
    font-size: 0.9rem;
    line-height: 1.55;
}

.sm-person-desc p {
    margin: 0 0 0.6em;
}

.sm-person-desc p:last-child {
    margin-bottom: 0;
}

.sm-persons-empty {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* ----------------------------------------------------------------
 * Generisches Content-Grid (/presse, /berichte, /ergebnisse)
 * Glas-Cards mit Header-Bild, Datum-Badge, Titel und Excerpt.
 * ---------------------------------------------------------------- */
.sm-content-grid {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}

.sm-content-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 4px;
    overflow: hidden;
    color: #03182b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.sm-content-card:hover {
    transform: translateY(-3px);
}

.sm-content-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #1a2a44;
}

.sm-content-image-empty {
    background: linear-gradient(135deg, #003366 0%, #00519f 40%, #0077b6 100%);
}

.sm-content-body {
    padding: 16px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sm-content-date {
    color: #516786 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 !important;
}

.sm-content-title {
    color: #03182b !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.3;
}

.sm-content-excerpt {
    color: rgba(3, 24, 43, 0.78) !important;
    font-size: 0.9rem !important;
    line-height: 1.55;
    margin: 4px 0 0 !important;
}

.sm-content-empty {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.sm-content-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 0;
    font-size: 0.9rem;
}

.sm-content-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease;
}

.sm-content-pagination .page-numbers:hover {
    background: rgba(255, 255, 255, 0.18);
}

.sm-content-pagination .page-numbers.current {
    background: #ffcf01;
    color: #03182b;
    border-color: #ffcf01;
}

/* ----------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------- */
.sm-site-footer {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 50px 20px 30px;
    margin-top: 80px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sm-site-footer a {
    color: #ffcf01;
    text-decoration: none;
}

/* ============================================================
   Geschichte / History-Page
   ============================================================ */

.sm-history-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 48px;
    margin-top: 24px;
}

@media (max-width: 900px) {
    .sm-history-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.sm-history-col-heading {
    font-size: 1.4em;
    color: #ffcf01;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 207, 1, 0.25);
}

.sm-history-col-empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Article tiles (left column) */
.sm-history-articles-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sm-history-atile {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.sm-history-atile:hover {
    border-color: rgba(255, 207, 1, 0.4);
    transform: translateY(-2px);
}

.sm-history-atile-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 81, 159, 0.15);
}

.sm-history-atile-img-empty {
    background-image: linear-gradient(135deg, #03182b, #00519f);
}

.sm-history-atile-name {
    padding: 14px 16px;
    font-size: 0.92em;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
}

/* Timeline (right column) */
.sm-tl {
    position: relative;
    padding-left: 30px;
}

.sm-tl::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
        rgba(255, 207, 1, 0.45) 0,
        rgba(255, 207, 1, 0.15) 80%,
        transparent 100%);
}

.sm-tl-year-header {
    margin: 40px 0 18px;
    margin-left: -30px;
}

.sm-tl-year-header:first-child {
    margin-top: 0;
}

.sm-tl-year-badge {
    display: inline-block;
    background: #ffcf01;
    color: #03182b;
    font-weight: 800;
    font-size: 1.15em;
    padding: 8px 18px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.sm-tl-month-header {
    margin: 22px 0 10px;
}

.sm-tl-month-label {
    color: rgba(255, 207, 1, 0.7);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sm-tl-entry {
    position: relative;
    margin: 0 0 18px;
}

.sm-tl-dot {
    position: absolute;
    left: -27px;
    top: 18px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid #03182b;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.sm-tl-dot-milestone {
    background: #ffcf01;
    width: 18px;
    height: 18px;
    left: -29px;
    top: 16px;
    box-shadow: 0 0 0 3px rgba(255, 207, 1, 0.4), 0 0 14px rgba(255, 207, 1, 0.5);
}

.sm-tl-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px 20px;
    transition: border-color 0.2s, transform 0.2s;
}

.sm-tl-card:hover {
    border-color: rgba(255, 207, 1, 0.3);
}

.sm-tl-milestone .sm-tl-card {
    background: rgba(255, 207, 1, 0.06);
    border-color: rgba(255, 207, 1, 0.3);
}

.sm-tl-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.82em;
}

.sm-tl-day {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.sm-tl-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sm-tl-cat-milestone {
    background: rgba(255, 207, 1, 0.25);
    color: #ffcf01;
}

.sm-tl-cat-event {
    background: rgba(0, 81, 159, 0.4);
    color: #7fb3e8;
}

.sm-tl-cat-club {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
}

.sm-tl-title {
    color: #fff;
    font-size: 1.05em;
    font-weight: 700;
    margin: 2px 0 4px;
    line-height: 1.3;
}

.sm-tl-milestone .sm-tl-title {
    color: #ffcf01;
}

.sm-tl-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.93em;
    line-height: 1.55;
    margin: 6px 0 0;
}

.sm-tl-end-cap {
    height: 24px;
    margin-left: -30px;
}

/* ============================================================
   /bildstrecken — Gallery-Tiles + Viewer-Overlay
   ============================================================ */
/* Featured-Tile: volle Breite, hoeher */
.sm-gallery-featured {
    margin-bottom: 28px;
    border-radius: 14px;
}

.sm-gallery-featured .sm-gallery-cover {
    aspect-ratio: 21 / 9;
    min-height: 260px;
}

.sm-gallery-featured .sm-gallery-title {
    font-size: 1.3em;
}

.sm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.sm-gallery-card {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.sm-gallery-card:hover {
    border-color: rgba(255, 207, 1, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.sm-gallery-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.35);
    position: relative;
}

.sm-gallery-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.sm-gallery-info {
    padding: 14px 18px 16px;
}

.sm-gallery-title {
    color: #fff;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    padding: 0;
}

/* ---------- Gallery Viewer Overlay ---------- */
.sm-gallery-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sm-gallery-overlay[hidden] {
    display: none;
}

.sm-gallery-overlay-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    flex-shrink: 0;
}

.sm-gallery-overlay-title {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1em;
    font-weight: 600;
    margin: 0;
}

.sm-gallery-overlay-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.sm-gallery-overlay-close:hover {
    background: rgba(255, 207, 1, 0.25);
    border-color: rgba(255, 207, 1, 0.5);
}

.sm-gallery-overlay-body {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.sm-gallery-overlay-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================================
   /videos — Vimeo-Grid
   ============================================================ */

.sm-video-empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.sm-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.sm-video-card {
    all: unset;
    cursor: pointer;
    display: block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.sm-video-card:hover,
.sm-video-card:focus-visible {
    border-color: rgba(255, 207, 1, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.sm-video-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-video-cover-empty {
    background-image: linear-gradient(135deg, #03182b, #00519f);
}

.sm-video-play {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffcf01;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    padding-left: 6px;
    transition: transform 0.2s, background 0.2s;
}

.sm-video-card:hover .sm-video-play {
    transform: scale(1.1);
    background: rgba(255, 207, 1, 0.95);
    color: #03182b;
}

.sm-video-info {
    padding: 14px 18px 16px;
}

.sm-video-title {
    color: #fff;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

/* ---------- Video Lightbox ---------- */

.sm-vl-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-vl-lightbox[hidden] {
    display: none;
}

.sm-vl-stage {
    width: min(92vw, 1200px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.sm-vl-frame-wrap {
    width: 100%;
}

.sm-vl-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.sm-vl-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.sm-vl-caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1em;
    margin: 0;
    text-align: center;
}

.sm-vl-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 1.6em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.sm-vl-close:hover {
    background: rgba(255, 207, 1, 0.25);
    border-color: rgba(255, 207, 1, 0.5);
}

/* ============================================================
   Ergebnisse-Dashboard (sm/results-stats)
   ============================================================ */

/* 1:1 aus results-stats.component.ts */
.stats-wrapper {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.stats-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.stats-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    padding: 0;
}
.stats-date-range {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}
.stats-footer {
    display: flex;
    justify-content: center;
}
.card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 12px;
}
.csv-btn {
    background: #00519f;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.csv-btn:hover { background: #003d7a; }
.dl-icon {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
.stats-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}
.stats-card h3 {
    color: #222;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    padding: 0;
}
.stats-card canvas {
    width: 100% !important;
    max-height: 210px;
}
.stats-desc {
    color: #999;
    font-size: 11px;
    margin: 8px 0 0 0;
    padding: 0;
    line-height: 1.4;
}
@media (max-width: 500px) {
    .stats-wrapper { padding: 10px; }
}
.csv-btn-dark {
    background: #ffd500;
    color: #1a1a2e;
}
.csv-btn-dark:hover { background: #e6c000; }
.dl-icon {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* ================================================================
   ORIGINAL-LOOK — 1:1 Port der Angular-User-Frontend-Styles
   Quelle: sm21angularprojekt/user/src/styles.css + die relevanten
   Component-CSS (navbar, nav-buttons, page-wrapper, home, footer).
   Dieser Block ueberschreibt alles was oben drueber steht, sodass
   das WP-Theme exakt wie das Original aussieht — vorausgesetzt die
   Templates und Render-Callbacks rendern die Original-Klassen
   (.main, .main_container, .bubble, .grid, .grid-item, …).
   ================================================================ */

/* ----------- Globale Resets + Typografie ----------- */
.wp-site-blocks * {
    box-sizing: border-box;
}
.wp-site-blocks {
    font-family: "Poppins", sans-serif;
    font-size: 14px;
}
.wp-site-blocks a,
.wp-site-blocks a:hover {
    font: inherit;
    color: inherit;
    text-decoration: none;
}
.wp-site-blocks h1,
.wp-site-blocks h2,
.wp-site-blocks h3,
.wp-site-blocks h4,
.wp-site-blocks h5,
.wp-site-blocks h6 {
    color: #516786;
    padding-bottom: 12px;
}

/* ----------- Main-Container (per-page Hero-Background) ----------- */
/* Der body hat bereits ueber body.sm-bg-* den Hintergrund gesetzt.
   Der .main_container wrapper-class aus dem Angular-Frontend bekommt
   hier nur das Content-Padding + overlay. */
.main.main_container {
    position: relative;
    margin: 0;
    padding: 80px 0 200px;
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    z-index: 1;
}
.main.main_container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
    pointer-events: none;
}
.dot-raster-overlay {
    position: absolute;
    inset: 0;
    background-image: url(assets/raster.png);
    background-repeat: repeat;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}
.outer-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Body-raster-overlay (das body::after) ausschalten wenn eine Seite
   ihren eigenen main_container + overlay verwendet (Doppelraster
   verhindern). */
body:has(.main.main_container)::after {
    display: none;
}
body:has(.main.main_container)::before {
    display: none;
}

/* ----------- Header / Navbar ----------- */
#header_box {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    margin: auto;
    padding: 20px;
    padding-right: 0;
    width: 100%;
    pointer-events: none !important;
}
#header_box .flex-container {
    display: flex;
    width: 100%;
    align-items: flex-start;
}
#header_box .flex-container > div {
    flex-grow: 1;
    text-align: center;
}
#header_box .logo {
    color: #fff;
    text-transform: uppercase;
    cursor: pointer;
    height: 80px;
    pointer-events: auto;
}
#header_box .logo img {
    display: block;
    margin-left: 0;
    margin-right: auto;
    max-width: 100%;
    max-height: 80px;
    height: 80px;
    width: auto;
}
.smallnav { z-index: 12; }
.flex-container .logo.smallnav img {
    transition: 0.6s;
    height: 60px;
    max-height: 60px;
}

/* NAVIGATION Toggle */
.nav-toggle-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-left: 8px;
    cursor: pointer;
    user-select: none;
    margin-top: -4px;
    float: right;
    pointer-events: auto !important;
}
.nav-toggle-label {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
@media (max-width: 360px) {
    .nav-toggle-label { display: none; }
}
.toggle {
    display: inline-block;
    cursor: pointer;
    padding: 15px;
    z-index: 9;
    position: relative;
}
.toggle .bar1,
.toggle .bar2,
.toggle .bar3 {
    width: 30px;
    height: 3px;
    background-color: #fff;
    margin: 6px 0;
    transition: 0.4s;
    border-radius: 1px;
    display: block;
}
.toggle.active .bar1 {
    transform: translate(0, 9px) rotate(-45deg);
}
.toggle.active .bar2 {
    opacity: 0;
}
.toggle.active .bar3 {
    transform: translate(0, -9px) rotate(45deg);
}

/* ----------- Slide-in Menu (rechte Seite, 220px Panel) ----------- */
.menu {
    position: fixed;
    top: 0;
    right: 0;
    padding: 80px 0 0 19px;
    width: 260px;
    height: 100vh;
    background: rgba(8, 18, 32, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.menu.menu_open {
    transform: translateX(0);
}
.menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}
.menu ul#main_menu {
    transition-timing-function: ease-in;
    opacity: 1;
    transition: 0.4s;
}
.menu ul li {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
}
.menu ul li ul > li {
    padding-left: 12px;
    margin-top: -6px;
}
.menu .menu-item > a,
.menu .menu-item > span {
    position: relative;
    border-left: 10px solid transparent;
    display: flex;
    text-align: left;
    font-size: 17px;
    line-height: 140%;
    padding: 4px 4px 4px 0;
}
.menu .menu-item a {
    text-decoration: none;
    font-size: 17px;
    color: #81b5ec;
}
.menu .menu-item a:hover,
.menu .menu-item.is-active > a,
.menu .menu-item.current-menu-item > a {
    color: #fff !important;
    display: inline-block !important;
}
.menu .nav_parent_level > a,
.menu .nav_parent_level > span {
    pointer-events: none;
    cursor: default;
    display: block;
    padding-left: 30px !important;
    color: #4f6d8e;
    background: no-repeat 13px 14px;
    background-size: 10px;
    text-align: left;
    background-image: url('assets/arrow.png');
}

/* ----------- Bubble (Signature gelbes Badge mit Dreieck) ----------- */
.bubble {
    position: relative;
    max-width: 352px;
    padding: 4px;
    text-align: center;
    background: #ffcf01;
    border-radius: 4px;
    font-weight: 700;
    color: #03182b;
    font-size: 28px;
    margin-bottom: 30px;
    display: inline-block;
    padding: 4px 20px;
}
.bubble:after {
    content: "";
    position: absolute;
    border-style: solid;
    border-width: 8px 10px 0;
    border-color: #ffcf01 transparent;
    display: block;
    width: 0;
    z-index: 1;
    bottom: -8px;
    left: 28px;
}
.hl_bubble {
    padding: 0;
    max-width: 1200px;
    color: #ffcf01;
}
.hl_bubble .bubble {
    padding: 20px;
    font-size: 32px;
    max-width: 100%;
}

/* ----------- Grid (Home-News-Cards + Listen-Grids) ----------- */
.grid {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    justify-content: space-around;
    padding: 0;
    margin: 0;
}
@media only screen and (min-width: 599px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media only screen and (min-width: 1260px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px;
    }
}
@media only screen and (min-width: 1700px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media only screen and (min-width: 2200px) {
    .grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
.grid-rows {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}
.grid-item {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border-top: none;
    background: rgb(255 255 255 / 92%);
    color: #d0e9ff;
    padding-bottom: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 450px;
}
.grid-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding-bottom: 50px;
}
.grid-item-link:hover {
    text-decoration: none;
}
.grid-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    transition: box-shadow 0.2s, transform 0.2s;
}
.grid-item-hl {
    color: #ffffff;
    font-size: 22px;
    padding-top: 15px;
    padding-bottom: 15px;
    margin: 0;
}
.grid-item-textwapper {
    padding: 20px 24px 24px;
    min-height: 190px;
    color: #ffffff;
}
.grid-item-teaser,
.grid-item-description {
    color: rgba(255, 255, 255, 0.8);
}
.img-header {
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-color: #fff;
    height: 240px;
    margin: 0 auto;
}
.shrink {
    transition: all 0.2s ease-in-out;
    transform: scale(0.995);
}
.shrink:hover {
    transform: scale(1);
}

/* ----------- Personen-Grid (Aktive): blaue Kacheln, Name unten ----------- */
.sm-persons-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 20px;
}
@media (min-width: 900px) {
    .sm-persons-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
.sm-persons-grid .grid-item {
    background: linear-gradient(180deg, #00519f 0%, #003366 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: none;
    overflow: visible;
}
.sm-persons-grid .grid-item-link {
    padding-bottom: 0;
}
.sm-persons-grid .img-header {
    width: 204px;
    height: 204px;
    border-radius: 50%;
    margin: 24px auto 0 auto;
    background-color: #0a1a2e;
}
.sm-persons-grid .grid-item-textwapper {
    min-height: auto;
    text-align: left;
    padding: 28px 14px 20px;
    color: #fff;
}
.sm-persons-grid .grid-item-hl {
    color: #fff;
    font-size: 17px;
    padding: 0;
    margin: 0;
    text-align: left;
}
.sm-persons-grid .grid-item-teaser {
    color: #fff !important;
    margin: 8px 0 0;
    text-align: left;
}
.sm-persons-grid .grid-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ----------- Home: Vimeo-Hero + Slogan + Social ----------- */
.main.sm-home-main {
    min-height: 100vh;
    position: relative;
    z-index: 999;
}
.vimeo-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: #000;
}
.vimeo-wrapper iframe {
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
}
.sm-home-overlay {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url(assets/raster.png);
    z-index: 0;
}
.info_box {
    position: absolute;
    z-index: 10;
    bottom: 20px;
    left: 20px;
    padding-left: 20px;
}
.info_box p, .info_box h1, .info_box h2, .info_box h3 { color: #fff; }
.slogan {
    color: #fff;
    text-align: left;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.slogan-years {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.15;
}
@media (max-width: 768px) {
    .slogan-years { font-size: 18px; letter-spacing: 1px; }
}
.social {
    position: absolute;
    z-index: 10;
    bottom: 7px;
    right: 0;
    width: 150px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: 112px;
    background-repeat: no-repeat;
    background-image: url(assets/ortsclub.png);
    opacity: 1;
}

/* ----------- Home: Zigzag-Band + ADAC-content ----------- */
.zigzag_darkblue {
    background-position: bottom;
    background-size: 20px;
    background-repeat: repeat no-repeat;
    background-image: url(assets/zigzag_darkblue.png);
}
.zigzag_white {
    background-position: bottom;
    background-size: 20px;
    background-repeat: repeat no-repeat;
    background-image: url(assets/zigzag_white.png);
}
.content-adac-wrapper {
    padding: 30px 20px 40px;
}
.content-adac-wrapper .xcontent {
    color: #fff;
    text-align: left;
    font-size: 20px;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}
.content-adac-wrapper .xcontent::after {
    content: '';
    display: block;
    width: 100%;
    height: 160px;
    margin-top: 17px;
    background: url(assets/ortsclub.png) no-repeat left top;
    background-size: auto 100%;
}
.content-adac-wrapper .xcontent h1 { color: #fff !important; font-size: 34px; }
.content-adac-wrapper .xcontent h2 { color: #fff !important; font-size: 28px; margin-top: 22px; }
.content-adac-wrapper .xcontent h3 { color: #fff !important; font-size: 22px; }
.content-adac-wrapper .xcontent p  { color: #fff; font-size: 20px; font-weight: 400; }

/* ----------- Footer ----------- */
footer.wp-block-template-part {
    margin-top: 0 !important;
    background: rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 1;
}
.sm-footer {
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 200px;
    gap: 0;
    position: relative;
    z-index: 2;
    color: #fff;
}
.sm-footer-copy {
    color: #fff;
    background: #072d52;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    position: relative;
    z-index: 2;
}
@media only screen and (min-width: 1260px) {
    .sm-footer {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 50px;
    }
}

/* ----------- Date-Badge / Search ----------- */
.date-badge {
    display: inline-block;
    background: #00519f;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

/* ----------- Links in Content-Bereichen ----------- */
.presse_wrapper a,
.event_wrapper a,
.content_wrapper a {
    background-color: rgba(255, 207, 1, 0.15);
    color: #ffd500;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s;
}
.presse_wrapper a::after,
.event_wrapper a::after,
.content_wrapper a::after {
    content: ' \2197';
    font-size: 0.85em;
}
.presse_wrapper a:hover,
.event_wrapper a:hover,
.content_wrapper a:hover {
    background-color: rgba(255, 207, 1, 0.3);
}

/* ----------- Vollstaendiges Ausblenden der alten WP-Header-Styles ----------- */
.sm-site-header { display: none !important; }
.sm-header-spacer { display: none !important; }

/* Body nicht doppelt gescrollbar wenn Menu offen */
body.sm-menu-open {
    overflow: hidden;
}

/* ================================================================
   Aliase: die render_callbacks + setup-scripts verwenden sm-*-
   Klassen (sm-bubble, sm-content-card, sm-content-grid, sm-static-wrap).
   Wir mappen sie hier auf die Original-Look-Regeln, ohne den Content
   der Pages neu zu schreiben.
   ================================================================ */

/* sm-static-wrap = zusaetzlicher padding wrapper der in den Pages steht.
   Kein Effekt; Layout kommt vom .outer-content-wrapper des Templates. */
.sm-static-wrap {
    padding: 0;
}
/* Im Original steht die Bubble direkt im .outer-content-wrapper. */

/* sm-bubble → bubble (gelbes Badge) */
.sm-bubble {
    position: relative;
    max-width: 352px;
    text-align: left;
    min-width: 300px;
    background: #ffcf01 !important;
    border-radius: 4px;
    font-weight: 700;
    color: #03182b !important;
    font-size: 28px !important;
    margin: 0 0 30px !important;
    display: inline-block;
    padding: 4px 20px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.sm-bubble::after {
    content: "";
    position: absolute;
    border-style: solid;
    border-width: 8px 10px 0;
    border-color: #ffcf01 transparent;
    display: block;
    width: 0;
    z-index: 1;
    bottom: -8px;
    left: 28px;
}

/* sm-content-grid → grid, sm-content-card → grid-item */
.sm-content-grid {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}
@media only screen and (min-width: 599px) {
    .sm-content-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media only screen and (min-width: 1260px) {
    .sm-content-grid { grid-template-columns: repeat(3, 1fr); gap: 50px; }
}
@media only screen and (min-width: 1700px) {
    .sm-content-grid { grid-template-columns: repeat(4, 1fr); }
}
@media only screen and (min-width: 2200px) {
    .sm-content-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Startpage news: Container auf gleiche Breite wie Berichte-Seite begrenzen */
.sm-home-news-wrap .grid,
.sm-home-news-wrap .sm-content-grid {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
@media only screen and (min-width: 1024px) {
    .sm-home-news-wrap .grid,
    .sm-home-news-wrap .sm-content-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 30px; }
}

.sm-content-card {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    background: rgb(255 255 255 / 92%) !important;
    color: #222 !important;
    padding-bottom: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 450px;
    box-shadow: none !important;
    transition: transform 0.2s ease-in-out;
    transform: scale(0.995);
    display: flex;
    flex-direction: column;
}
.sm-content-card:hover {
    transform: scale(1);
}
.sm-content-card .sm-content-image,
.sm-content-card .sm-content-image-empty {
    width: 100%;
    aspect-ratio: auto;
    height: 240px;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-color: #fff;
}
.sm-content-card .sm-content-image-empty {
    background-image: linear-gradient(135deg, #003366 0%, #00519f 40%, #0077b6 100%);
    background-color: #00519f;
}
.sm-content-card .sm-content-body {
    padding: 12px;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #222;
}
.sm-content-card .sm-content-date {
    display: inline-block;
    background: #00519f !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    letter-spacing: 0.3px !important;
    text-transform: none !important;
    margin: 0 0 6px !important;
    width: fit-content;
}
.sm-content-card .sm-content-title {
    color: #111 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    padding-top: 5px !important;
    padding-bottom: 8px !important;
    margin: 0 !important;
    line-height: 1.25;
}
.sm-content-card .sm-content-excerpt {
    color: #444 !important;
    font-size: 14px !important;
    line-height: 1.5;
    margin: 0 !important;
}

/* Listing-Wrapper (sm-listing) ohne max-width-Kapsel, outer-content-wrapper uebernimmt das */
.sm-listing {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ================================================================
   Angular-Original-Parity: Listing-Elemente
   1:1 aus sm21angularprojekt/user/src/styles.css + feature-component CSS.
   ================================================================ */

/* ---- Filter-Box (clientseitiger Suchfilter) ---- */
.filter-box {
    margin: 0 0 40px 0;
    padding: 0;
}
.filter-box input[type="search"] {
    display: block;
    width: 100%;
    padding: 15px 0 15px 10px;
    font-size: 16px;
    color: #fff;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    border-radius: 0;
    transition: border-color 0.3s;
}
.filter-box input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.filter-box input[type="search"]:focus {
    outline: none;
    border-color: #fff;
}
.filter-box input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") center/contain no-repeat;
    cursor: pointer;
}

/* ---- Year-Grouping-Header (news, reports, events) ---- */
.year-group-header {
    margin-top: 30px;
    margin-bottom: 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    border-radius: 0;
    padding: 14px 0 14px 10px;
    display: flex;
    align-items: center;
}
.year-group-header.collapsible {
    cursor: pointer;
    transition: background 0.2s;
}
.year-group-header.collapsible:hover {
    background: rgba(255, 255, 255, 0.05);
}
.year-group-header h2 {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    background: none;
    display: inline;
    padding: 0;
    margin: 0;
}
.collapse-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-left: auto;
}

/* ---- Filler-Items fuer Grid-Auffuellung (Reports) ---- */
.grid-item-filler {
    list-style: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    max-width: 350px;
    min-height: 200px;
}

/* ---- Grid-Item-Teaser Sichtbarkeit (helles Card-Fenster) ---- */
.grid-item-teaser,
.grid-item-description {
    color: #444 !important;
    font-size: 14px;
    line-height: 1.5;
}

/* ---- Events: Calendar-Grid + Event-Box + Date-Box ---- */
.grid-rows {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    padding: 0;
    margin: 0;
}
.calendar-grid {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}
.calendar-grid h2 {
    margin-bottom: 24px;
}
.event-box {
    cursor: default;
    display: grid;
    grid-template-columns: 1fr;
    background: #0000008c;
    border: 0px solid lightgray;
    color: #fff;
    padding: 20px;
    list-style: none;
}
.date-box {
    color: #ffcf01;
    text-align: left;
    width: 200px;
    padding: 0px 20px 20px 20px;
    margin: 0px;
    font-size: 27px;
    font-weight: bolder;
}
.img-item-text {
    padding: 0 20px 0 20px;
}
.img-item-text > * {
    color: #fff !important;
}
.img-item-text h2 {
    color: #fff !important;
    font-size: 20px;
    padding-bottom: 10px;
}
@media only screen and (min-width: 600px) {
    .event-box {
        grid-template-columns: 200px auto;
        padding: 20px 0px;
    }
}

/* ---- Kleiner Client-Side Filter (via data-sm-filter) ---- */
[data-sm-hide="1"] {
    display: none !important;
}

/* Anchor-Cards: Cursor für anklickbare grid-items */
.shrink.grid-item[onclick] {
    cursor: pointer;
}

/* ---- Ergebnisse: Result-Item + TSV-Tabelle ---- */
/* 1:1 aus sm21angularprojekt/user/src/app/features/results/ */
.grid-wrapper {
    background: rgba(255, 255, 255, 0);
    min-height: 1200px;
}
.result-item {
    display: grid;
    grid-template-columns: 1fr;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin-top: 24px;
    overflow: hidden;
    list-style: none;
}
.result-item .img-item-text {
    padding: 10px;
}
@media only screen and (min-width: 1200px) {
    .result-item .img-item-text {
        padding: 30px;
    }
}
.result_title {
    color: #ffffff !important;
    max-width: 320px;
    word-wrap: break-word;
    padding-bottom: 12px;
}
@media only screen and (min-width: 600px) {
    .result_title {
        max-width: 100%;
    }
}

/* Scroll-Wrap, damit breite Tabellen nicht den Layout-Grid sprengen */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* TSV-Tabellen — exakt die Regeln aus results.component.ts */
.results.table {
    width: 100%;
    padding: 0;
    border: 0 solid lightgray;
    background: transparent;
    color: #fff;
    border-collapse: collapse;
    border-spacing: 0;
}
.results.table td {
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
    padding: 10px;
    color: #222 !important;
    font-size: 13px;
}
.results.table tr:nth-child(even) td {
    background: #f7f7f7;
}
.results.table .header td {
    margin: 0;
    font-weight: bold;
    background: #03182b !important;
    color: #ffcf01 !important;
    border-bottom: none;
    font-size: 13px;
    text-transform: uppercase;
}
.results.table .header2 td {
    background-color: #e8e8e8 !important;
    border-bottom: 0 solid lightgray;
    color: #333 !important;
    font-weight: 600;
}
.results_table td {
    padding: 8px 12px;
}
.results.table .header td .tbl_cell_pad,
.results.table td .tbl_cell_pad {
    max-width: 80px;
    word-wrap: break-word;
}
@media only screen and (min-width: 600px) {
    .results.table .header td .tbl_cell_pad,
    .results.table td .tbl_cell_pad {
        max-width: 100%;
    }
}


/* TinyMCE Classic Editor: hellen Hintergrund erzwingen.
 * style.css wird via add_editor_style() auch in den Editor-iFrame
 * eingespielt — body.mce-content-body ueberschreibt das dunkle Theme. */
body.mce-content-body {
    background-color: #fff !important;
    background-image: none !important;
    color: #111 !important;
    min-height: 0 !important;
}
