/* ==========================================================================
   Autismus-Diagnostik — Custom Styles
   ==========================================================================
   Modulare CSS-Datei für alle Anpassungen am Divi-Theme.
   Organisiert in logische Abschnitte für einfache Wartung.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Farbschema & Grundwerte)
   -------------------------------------------------------------------------- */
:root {
    --ad-primary: #8300e9;
    --ad-primary-dark: #6a00bd;
    --ad-primary-light: #a64dff;
    --ad-text: #333333;
    --ad-text-light: #666666;
    --ad-text-muted: #999999;
    --ad-white: #ffffff;
    --ad-black: #000000;
    --ad-bg-light: #f7f5fa;
    --ad-border: #e0d6eb;
    --ad-transition: 0.3s ease;
}

/* --------------------------------------------------------------------------
   2. Fixed Navigation / Sticky Header
   -------------------------------------------------------------------------- */
.divi-fixed-section.divi-fixed-header-section {
    background-color: var(--ad-primary);
    transition: background-color 0.4s ease;
}

/* --------------------------------------------------------------------------
   3. Hauptnavigation
   -------------------------------------------------------------------------- */
#top-menu a {
    color: rgba(20, 20, 20, 1);
}

#top-menu-nav > ul > li > a:hover {
    opacity: 1;
    transition: none;
}

#top-menu-nav li.current-menu-item > a,
#top-menu-nav li.current-menu-parent > a {
    color: var(--ad-white) !important;
}

.nav li:hover > a {
    color: var(--ad-white) !important;
    opacity: 0.85;
}

/* Menu-Container volle Breite */
.et_menu_container {
    width: 100%;
}

/* Logo-Abstand */
.et_header_style_left .logo_container > a {
    padding-left: 12px;
}

/* --------------------------------------------------------------------------
   4. Mobile Navigation
   -------------------------------------------------------------------------- */
.mobile_menu_bar::before {
    color: var(--ad-white) !important;
}

.et_header_style_left #et-top-navigation .mobile_menu_bar {
    padding-right: 24px;
}

.et_mobile_menu li a {
    color: var(--ad-white) !important;
}

.et_mobile_menu .menu-item-has-children > a {
    background-color: transparent !important;
}

.et_mobile_menu li.current-menu-item > a {
    color: #bbbbbb !important;
}

/* --------------------------------------------------------------------------
   5. Typografie-Verbesserungen
   -------------------------------------------------------------------------- */
body,
body.et_divi_theme {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
#footer-bottom {
    padding: 16px 0;
}

#footer-info {
    font-size: 14px;
    color: var(--ad-text-muted);
}

#footer-info a {
    color: var(--ad-primary);
    text-decoration: none;
    transition: opacity var(--ad-transition);
}

#footer-info a:hover {
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   7. Allgemeine Verbesserungen
   -------------------------------------------------------------------------- */

/* Sanftere Bild-Animationen */
.et_pb_image {
    transition: transform var(--ad-transition);
}

/* Bessere Button-Hover-Übergänge */
.et_pb_button:hover {
    transition: all var(--ad-transition);
}

/* Fokus-Styles für bessere Zugänglichkeit */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--ad-primary);
    outline-offset: 2px;
}

/* Skip-to-content Link für Barrierefreiheit */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 99999;
    padding: 12px 24px;
    background: var(--ad-primary);
    color: var(--ad-white);
    font-size: 16px;
    text-decoration: none;
}

.skip-to-content:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    overflow: visible;
}

/* --------------------------------------------------------------------------
   8. Mobile Verbesserungen
   -------------------------------------------------------------------------- */

/* --- Tablet (max 980px) --- */
@media (max-width: 980px) {

    /* Top-Header: Telefon & Email besser lesbar */
    #top-header #et-info {
        text-align: center;
        padding: 8px 0;
    }

    /* Telefon-Link groß genug für Touch (min 44px Tipp-Ziel) */
    #et-info-phone,
    #et-info-email {
        display: inline-block;
        padding: 8px 4px;
        min-height: 44px;
        line-height: 28px;
    }

    /* Mobiles Menü: größere Tipp-Ziele */
    .et_mobile_menu li a {
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Sub-Menü Einrückung deutlicher */
    .et_mobile_menu .sub-menu a {
        padding-left: 32px;
    }

    /* Footer-Widgets untereinander statt nebeneinander */
    #footer-widgets .footer-widget {
        margin-bottom: 24px;
    }
}

/* --- Smartphone (max 767px) --- */
@media (max-width: 767px) {

    /* Top-Header: Elemente untereinander */
    #top-header #et-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    /* H1 kleiner auf kleinen Screens */
    h1.et_pb_module_heading {
        font-size: 24px;
        line-height: 1.3;
    }

    /* Icon-Grid Bilder: Abstand zwischen den Kacheln */
    .et_pb_image {
        margin-bottom: 8px;
    }

    /* Footer: zentriert und lesbarer */
    #main-footer .footer-widget {
        text-align: center;
    }

    #footer-bottom {
        text-align: center;
        padding: 12px 16px;
    }

    #footer-info {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Buttons: volle Breite auf Smartphone */
    .et_pb_button {
        display: block;
        text-align: center;
    }
}

/* --- Sehr kleine Screens (max 479px) --- */
@media (max-width: 479px) {

    /* Container: etwas weniger Rand */
    .container {
        width: 90%;
    }

    /* Logo nicht zu breit */
    #logo {
        max-width: 250px;
    }
}

/* --------------------------------------------------------------------------
   9. Booking Embed
   -------------------------------------------------------------------------- */
.ad-booking-wrapper {
    margin: 24px 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.ad-booking-wrapper iframe {
    display: block;
}

@media (max-width: 767px) {
    .ad-booking-wrapper iframe {
        min-height: 600px;
    }
}

/* --------------------------------------------------------------------------
   10. Print Styles
   -------------------------------------------------------------------------- */
@media print {
    #main-header,
    #main-footer,
    .et_pb_scroll_top,
    .cmplz-cookiebanner {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555;
    }
}
