/* ==========================================================================
   SVP Root – Custom Styles
   Farben: Grün #009640 | Rot #FF0000 | Weiss #FFFFFF | Dunkel #1A1A1A
   ========================================================================== */

/* ----- CSS Custom Properties ----- */
:root {
    --svp-green: #009640;
    --svp-green-dark: #007A33;
    --svp-green-light: #00B34A;
    --svp-red: #FF0000;
    --svp-red-dark: #CC0000;
    --svp-white: #FFFFFF;
    --svp-dark: #1A1A1A;
    --svp-nav-blue: #3B5998;
    --svp-footer-dark: #2D3740;
    --svp-light-gray: #F5F5F5;
    --svp-text: #333333;
    --svp-text-light: #666666;
}

/* ==========================================================================
   HEADER & NAVIGATION – zentriert, professionell, blauer Hintergrund
   ========================================================================== */

/* ---- Header-Hintergrund ---- */
#main-header,
#main-header .container,
.et-fixed-header#main-header,
.et-fixed-header#main-header .container {
    background-color: var(--svp-nav-blue) !important;
}
#main-header {
    padding: 0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18) !important;
    min-height: 80px !important;
}

/* ---- Container: Logo links, Nav rechts ---- */
#main-header .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 30px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    min-height: 80px !important;
}

/* ---- Logo links, kompakt ---- */
.logo_container {
    width: auto !important;
    max-width: 180px !important;
    flex-shrink: 0 !important;
    padding: 8px 0 !important;
}
#logo {
    max-height: 56px !important;
    width: auto !important;
}
span.logo_helper {
    display: none !important;
}

/* ---- Nav-Bereich: flex-grow, zentriert ---- */
#et-top-navigation {
    padding: 0 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 1 1 auto !important;
}
#top-menu-nav {
    float: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ---- Menu Items: gleichmässig verteilt ---- */
#top-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px !important;
}
#top-menu > li {
    white-space: nowrap !important;
    position: relative !important;
}

/* ---- Nav-Links ---- */
#top-menu > li > a,
.et-fixed-header #top-menu > li > a {
    color: #FFFFFF !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 18px 14px !important;
    display: block !important;
    transition: all 0.25s ease !important;
    border-radius: 3px 3px 0 0 !important;
    position: relative !important;
}

/* Hover: dezenter heller Hintergrund */
#top-menu > li > a:hover,
.et-fixed-header #top-menu > li > a:hover {
    background-color: rgba(255,255,255,0.12) !important;
    opacity: 1 !important;
}

/* Aktive Seite: grüner Unterstrich */
#top-menu > li.current-menu-item > a,
.et-fixed-header #top-menu > li.current-menu-item > a {
    background-color: rgba(255,255,255,0.08) !important;
}
#top-menu > li.current-menu-item > a::after,
.et-fixed-header #top-menu > li.current-menu-item > a::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 14px !important;
    right: 14px !important;
    height: 3px !important;
    background-color: var(--svp-green) !important;
    border-radius: 3px 3px 0 0 !important;
}

/* ---- Suchicon ganz rechts, vertikal zentriert ---- */
#et_top_search {
    order: 99 !important;
    margin-left: 20px !important;
    margin-right: 5px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    top: -7px !important;
}
#et_search_icon:before {
    color: rgba(255,255,255,0.75) !important;
    font-size: 16px !important;
    transition: color 0.2s ease !important;
}
#et_search_icon:hover:before {
    color: #FFFFFF !important;
}

/* ---- Fixed Header (Scroll) ---- */
.et-fixed-header#main-header {
    background-color: var(--svp-nav-blue) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.22) !important;
}
.et-fixed-header #logo {
    max-height: 40px !important;
}
.et-fixed-header #top-menu > li > a {
    padding: 14px 12px !important;
}

/* ---- Header Höhe ---- */
#main-header[data-height-onload] {
    min-height: auto;
}

/* ---- Dropdown-Menü ---- */
#top-menu li ul.sub-menu {
    background-color: #2D4373 !important;
    border: none !important;
    border-top: 3px solid var(--svp-green) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
    border-radius: 0 0 4px 4px !important;
    padding: 6px 0 !important;
}
#top-menu li ul.sub-menu li a {
    color: rgba(255,255,255,0.9) !important;
    font-size: 12px !important;
    padding: 10px 18px !important;
    transition: all 0.2s ease !important;
}
#top-menu li ul.sub-menu li a:hover {
    background-color: rgba(255,255,255,0.1) !important;
    padding-left: 22px !important;
}

/* Footer Hintergrund DUNKEL */
#main-footer {
    background-color: #2D3740 !important;
}
#footer-widgets {
    background-color: #2D3740;
    padding: 50px 0 40px;
}
#footer-widgets .container {
    max-width: 1200px !important;
}
#footer-widgets .footer-widget,
#footer-widgets .footer-widget .widget_text,
#footer-widgets .footer-widget .textwidget,
#footer-widgets .footer-widget .textwidget p {
    color: rgba(255,255,255,0.85) !important;
}
#footer-widgets .footer-widget h4.title {
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #009640;
    margin-bottom: 15px !important;
}
#footer-widgets .footer-widget a {
    color: rgba(255,255,255,0.85) !important;
}
#footer-widgets .footer-widget a:hover {
    color: #FFFFFF !important;
}

/* Footer Bottom: nur Copyright, Social Icons verstecken (sind im Widget) */
#footer-bottom {
    background-color: #1A1A1A !important;
    padding: 14px 0 !important;
}
#footer-bottom .et-social-icons {
    display: none !important;
}
#footer-bottom #footer-info {
    color: rgba(255,255,255,0.5) !important;
    text-align: center !important;
    float: none !important;
    font-size: 13px !important;
}

/* ==========================================================================
   Typography
   ========================================================================== */
body.svp-root-theme {
    color: var(--svp-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.svp-root-theme h1,
body.svp-root-theme h2,
body.svp-root-theme h3,
body.svp-root-theme h4 {
    color: var(--svp-dark);
    font-weight: 700;
    line-height: 1.3;
}

body.svp-root-theme h1 {
    font-size: 2.4rem;
}

body.svp-root-theme h2 {
    font-size: 1.8rem;
}

body.svp-root-theme h3 {
    font-size: 1.4rem;
}

body.svp-root-theme p {
    line-height: 1.7;
    color: var(--svp-text);
}

/* ==========================================================================
   Links
   ========================================================================== */
body.svp-root-theme a {
    color: var(--svp-green);
    transition: color 0.2s ease;
}

body.svp-root-theme a:hover,
body.svp-root-theme a:focus {
    color: var(--svp-green-dark);
}

/* ==========================================================================
   Buttons – SVP Grün
   ========================================================================== */
body.svp-root-theme .et_pb_button,
body.svp-root-theme .et_pb_button_module_wrapper .et_pb_button,
body.svp-root-theme .et_pb_more_button {
    background-color: var(--svp-green) !important;
    color: var(--svp-white) !important;
    border: 2px solid var(--svp-green) !important;
    border-radius: 4px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

body.svp-root-theme .et_pb_button:hover,
body.svp-root-theme .et_pb_button_module_wrapper .et_pb_button:hover {
    background-color: var(--svp-green-dark) !important;
    border-color: var(--svp-green-dark) !important;
    color: var(--svp-white) !important;
}

/* Button Variante: Rot (Akzent/CTA) */
body.svp-root-theme .et_pb_button.svp-btn-red,
body.svp-root-theme .svp-cta .et_pb_button {
    background-color: var(--svp-red) !important;
    border-color: var(--svp-red) !important;
}

body.svp-root-theme .et_pb_button.svp-btn-red:hover,
body.svp-root-theme .svp-cta .et_pb_button:hover {
    background-color: var(--svp-red-dark) !important;
    border-color: var(--svp-red-dark) !important;
}

/* Button Variante: Outline/Ghost */
body.svp-root-theme .et_pb_button.svp-btn-outline {
    background-color: transparent !important;
    color: var(--svp-green) !important;
    border: 2px solid var(--svp-green) !important;
}

body.svp-root-theme .et_pb_button.svp-btn-outline:hover {
    background-color: var(--svp-green) !important;
    color: var(--svp-white) !important;
}

/* Button auf grünem Hintergrund: weiss mit grüner Schrift */
body.svp-root-theme .et_pb_section.svp-section-green .et_pb_button_module_wrapper .et_pb_button,
body.svp-root-theme .et_pb_section.svp-section-green .et_pb_button {
    background-color: #FFFFFF !important;
    color: #009640 !important;
    border: 2px solid #FFFFFF !important;
}
body.svp-root-theme .et_pb_section.svp-section-green .et_pb_button_module_wrapper .et_pb_button:hover,
body.svp-root-theme .et_pb_section.svp-section-green .et_pb_button:hover {
    background-color: var(--svp-dark) !important;
    color: #FFFFFF !important;
    border-color: var(--svp-dark) !important;
}

/* Mobile Menu */
body.svp-root-theme .et_mobile_menu li a {
    color: #FFFFFF !important;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 14px 20px !important;
}

/* ==========================================================================
   Fullwidth Banner / Hero Sections
   ========================================================================== */
body.svp-root-theme .et_pb_fullwidth_header {
    background-size: cover;
    background-position: center center;
    min-height: 55vh !important;
}

body.svp-root-theme .et_pb_fullwidth_header .et_pb_fullwidth_header_overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, transparent 60%);
}

body.svp-root-theme .et_pb_fullwidth_header h1,
body.svp-root-theme .et_pb_fullwidth_header .et_pb_module_header {
    color: var(--svp-white) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

body.svp-root-theme .et_pb_fullwidth_header .et_pb_header_content_wrapper {
    padding: 80px 0;
}

/* ==========================================================================
   Footer – dunkler Hintergrund (3 Spalten: Links, Kontakt, Social Media)
   ========================================================================== */
body.svp-root-theme #main-footer {
    background-color: var(--svp-footer-dark) !important;
}

body.svp-root-theme #footer-widgets .footer-widget {
    color: rgba(255, 255, 255, 0.85);
}

body.svp-root-theme #footer-widgets .footer-widget h4 {
    color: var(--svp-white) !important;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--svp-green);
}

body.svp-root-theme #footer-widgets .footer-widget a {
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.2s ease;
}

body.svp-root-theme #footer-widgets .footer-widget a:hover {
    color: var(--svp-white) !important;
}

body.svp-root-theme #footer-bottom {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* ==========================================================================
   Social Media Icons (im Footer und Header)
   ========================================================================== */
body.svp-root-theme .et_pb_social_media_follow li a {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease !important;
}

body.svp-root-theme .et_pb_social_media_follow li a:hover {
    background-color: var(--svp-green) !important;
}

/* ==========================================================================
   DIVI Module Overrides
   ========================================================================== */

/* Blurb Module (z.B. für Vorstandsteam, Features) */
body.svp-root-theme .et_pb_blurb_content .et_pb_main_blurb_image span {
    color: var(--svp-green) !important;
}

body.svp-root-theme .et_pb_blurb h4 a {
    color: var(--svp-dark) !important;
    font-weight: 700;
}

body.svp-root-theme .et_pb_blurb h4 a:hover {
    color: var(--svp-green) !important;
}

/* Vorstandsteam (nur Organisation-Seite): Bild rund + Text zentriert */
.page-id-25 .et_pb_blurb.et_pb_blurb_position_top {
    text-align: center !important;
}

.page-id-25 .et_pb_blurb.et_pb_blurb_position_top .et_pb_main_blurb_image {
    margin-bottom: 15px !important;
}

.page-id-25 .et_pb_blurb.et_pb_blurb_position_top .et_pb_main_blurb_image .et_pb_image_wrap {
    border-radius: 50% !important;
    overflow: hidden !important;
    display: inline-block !important;
}

.page-id-25 .et_pb_blurb.et_pb_blurb_position_top .et_pb_main_blurb_image img {
    border-radius: 50% !important;
    object-fit: cover !important;
    width: 180px !important;
    height: 180px !important;
}

.page-id-25 .et_pb_blurb.et_pb_blurb_position_top .et_pb_blurb_container {
    text-align: center !important;
}

.page-id-25 .et_pb_blurb.et_pb_blurb_position_top .et_pb_module_header {
    text-align: center !important;
}

body.svp-root-theme .et_pb_blurb.et_pb_blurb_position_top .et_pb_blurb_description {
    text-align: center !important;
}

/* Divider in SVP Grün */
body.svp-root-theme .et_pb_divider:before {
    border-top-color: var(--svp-green) !important;
}

/* Accordion/Toggle */
body.svp-root-theme .et_pb_toggle_title {
    color: var(--svp-dark) !important;
    font-weight: 600;
}

body.svp-root-theme .et_pb_toggle_open .et_pb_toggle_title {
    color: var(--svp-green) !important;
}

/* Tabs */
body.svp-root-theme .et_pb_tabs_controls li.et_pb_tab_active a {
    color: var(--svp-green) !important;
}

/* Contact Form */
body.svp-root-theme .et_pb_contact_form .et_pb_contact_submit {
    background-color: var(--svp-green) !important;
    color: var(--svp-white) !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px 32px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
}

body.svp-root-theme .et_pb_contact_form .et_pb_contact_submit:hover {
    background-color: var(--svp-green-dark) !important;
}

body.svp-root-theme .et_pb_contact_form input,
body.svp-root-theme .et_pb_contact_form textarea {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 12px !important;
    transition: border-color 0.2s ease;
}

body.svp-root-theme .et_pb_contact_form input:focus,
body.svp-root-theme .et_pb_contact_form textarea:focus {
    border-color: var(--svp-green) !important;
    outline: none;
}

/* ==========================================================================
   SVP-spezifische Klassen (zur Verwendung im DIVI Builder)
   ========================================================================== */

/* Grüne Section (z.B. Highlight-Bereich) */
body.svp-root-theme .svp-section-green {
    background-color: var(--svp-green) !important;
    color: var(--svp-white);
}

body.svp-root-theme .svp-section-green h2,
body.svp-root-theme .svp-section-green h3,
body.svp-root-theme .svp-section-green p {
    color: var(--svp-white) !important;
}

/* Hellgrauer Hintergrund */
body.svp-root-theme .svp-section-light {
    background-color: var(--svp-light-gray) !important;
}

/* Schweizer Rot-Akzent-Leiste */
body.svp-root-theme .svp-accent-bar {
    border-left: 4px solid var(--svp-red);
    padding-left: 20px;
}

/* ==========================================================================
   Footer Social Media Icons (Bild-Icons)
   ========================================================================== */
#footer-widgets .svp-social-icons {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
#footer-widgets .svp-social-icons a {
    display: inline-block !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}
#footer-widgets .svp-social-icons a:hover {
    opacity: 0.8 !important;
    transform: scale(1.1) !important;
}
#footer-widgets .svp-social-icons img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: block !important;
}

/* ==========================================================================
   Responsive – Tablet & Mobile (max 980px)
   ========================================================================== */
@media (max-width: 980px) {

    /* DIVI Mobile-Menü aktivieren: Desktop-Overrides zurücksetzen */
    #et-top-navigation {
        display: block !important;
        margin-left: 0 !important;
        flex: none !important;
    }
    #top-menu-nav,
    #top-menu {
        display: none !important;
    }

    /* Header sticky */
    #main-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99999 !important;
    }
    #page-container {
        padding-top: 60px !important;
    }

    /* Lupe rechts, vertikal zentriert */
    #et_top_search {
        float: right !important;
        margin-right: 0 !important;
        padding: 0 !important;
        position: relative !important;
        top: -14px !important;
        line-height: 70px !important;
    }
    #et_search_icon:before {
        color: #FFFFFF !important;
        vertical-align: middle !important;
    }

    /* Hamburger weiss, vertikal zentriert */
    .mobile_menu_bar {
        line-height: 70px !important;
        padding: 0 !important;
    }
    .mobile_menu_bar:before {
        color: #FFFFFF !important;
        vertical-align: middle !important;
    }

    /* Mobile Menu Dropdown */
    .et_mobile_menu,
    #mobile_menu {
        background-color: var(--svp-nav-blue) !important;
        border-top: 3px solid var(--svp-green) !important;
    }
    .et_mobile_menu li a {
        color: #FFFFFF !important;
        font-weight: 600 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        text-transform: uppercase !important;
    }
    .et_mobile_menu li a:hover {
        background-color: rgba(255,255,255,0.1) !important;
    }

    /* Logo mittig im Mobile Header, gross */
    .logo_container,
    body #main-header .logo_container {
        position: absolute !important;
        left: 55% !important;
        top: 60% !important;
        transform: translate(-50%, -50%) !important;
        max-width: 200px !important;
        width: 200px !important;
        padding: 0 !important;
        display: block !important;
    }
    #logo,
    body #main-header #logo {
        max-height: 55px !important;
        width: auto !important;
    }

    /* Lupe ganz rechts, gleiche Höhe wie Hamburger */
    #et_top_search {
        position: absolute !important;
        right: 50px !important;
        top: 20px !important;
        transform: none !important;
    }

    /* Banner: gleiche Bildanzeige, Padding reduziert */
    body.svp-root-theme .et_pb_fullwidth_header {
        min-height: 0 !important;
        background-size: 100% auto !important;
        background-position: center center !important;
        background-color: #FFFFFF !important;
    }
    body.svp-root-theme .et_pb_fullwidth_header,
    body.svp-root-theme .et_pb_fullwidth_header .et_pb_fullwidth_header_container {
        padding-top: 0px !important;
        padding-bottom: 0px !important;
    }

    /* Typography */
    body.svp-root-theme h1 { font-size: 1.8rem; }
    body.svp-root-theme h2 { font-size: 1.5rem; }
    body.svp-root-theme h3 { font-size: 1.2rem; }

    /* Kontakt-Formular */
    body.svp-root-theme .et_pb_contact_form input,
    body.svp-root-theme .et_pb_contact_form textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 767px) {
    body.svp-root-theme .et_pb_fullwidth_header {
        min-height: 28vh !important;
    }
    body.svp-root-theme h1 { font-size: 1.4rem; }
    body.svp-root-theme h2 { font-size: 1.2rem; }
    body.svp-root-theme .et_pb_button {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 479px) {
    body.svp-root-theme .et_pb_fullwidth_header {
        min-height: 22vh !important;
    }
    body.svp-root-theme h1 { font-size: 1.2rem; }
    body.svp-root-theme h2 { font-size: 1.1rem; }
    #footer-widgets .svp-social-icons img {
        width: 35px !important;
        height: 35px !important;
    }
}
