/* --- Allgemeine Variablen und Basis-Styles --- */
:root {
    --light-brownish-yellow: color-mix(in srgb, #E2C499 80%, white);
    --dark-gray-text: #333;
    --primary-green: #628069;
    --primary-red: #9F4636;
    --hover-yellow: #d1b280;
    --hover-green: #7a9d80;
    --hover-red: #b05240;
}

body {
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Mobile Navigation --- */
.mobile-menu {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
    max-height: 0;
}
.mobile-menu.open {
    max-height: 500px;
}

/* --- Akkordeon für Check-up und Ihre Fragen --- */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out, margin 0.5s ease-out;
    box-sizing: border-box;
}

/* Fade-in Animation für Check-up Listenpunkte */
.fade-in-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.accordion-content ol {
    font-weight: bold;
}
.accordion-content ol li {
    font-weight: normal;
}

/* --- Custom CSS für Abschnitte und Überschriften --- */
.main-section-heading {
    color: #000000;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.psychotherapy-intro-text {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.3em;
    color: var(--dark-gray-text);
}

.section-light-brown {
    background-color: var(--light-brownish-yellow);
}

.section-white {
    background-color: white;
}

/* Akkordeon Titel Styling (Check-up und Ihre Fragen) */
.accordion-title-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background-color: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.5em;
    font-weight: 600;
    color: var(--dark-gray-text);
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s ease;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.accordion-title-button:hover {
    background-color: #e5e5e5;
}

.accordion-title-button .icon {
    transition: transform 0.3s ease;
}

.accordion-title-button.active .icon {
    transform: rotate(90deg);
}

/* Akkordeon Content Styling */
.accordion-content-inner {
    background-color: white;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Zusätzliche CSS-Anpassungen für die Startseite (Icons und Bild) --- */
.bg-[#e3a88c] ul li .fas {
    vertical-align: middle;
    line-height: 1.5rem;
    display: inline-block;
    text-align: center;
}

.main-section-image-container {
    /* Optional: Eine feste Höhe für den Bildcontainer auf größeren Bildschirmen */
    /* min-height: 400px; */
}

/* --- Grid und Hover Effekt CSS (für größere Bildschirme) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.grid-item {
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-size 0.5s ease;
}
.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: background-color 0.3s ease;
}
.grid-item h3 {
    position: relative;
    z-index: 2;
    margin-top: 0;
    font-size: 1.5em;
    line-height: 1.2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.grid-item .toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    margin-left: 10px;
}
.grid-item p {
    position: relative;
    z-index: 2;
    font-size: 1.1em;
    line-height: 1.5;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}
.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    background-size: 105%;
}
.grid-item:hover::before {
    background-color: rgba(0, 0, 0, 0.55);
}
.grid-item:hover p {
    opacity: 1;
    max-height: 150px;
    margin-bottom: 10px;
    padding-bottom: 10px;
}
.depression-burnout { background-image: url('Depression.jpg'); }
.angststoerungen { background-image: url('Angststoerungen.jpg'); }
.essstoerungen { background-image: url('Essstoerung.jpg'); }
.schlafstoerungen { background-image: url('Schlafstoerung.jpg'); }
.schmerzen { background-image: url('Schmerzen.jpg'); }
.persoenlichkeitsstoerungen { background-image: url('Persoenlichkeitsstoerung.jpg'); }

/* --- Media Queries für kleinere Bildschirme (Mobile Anpassungen) --- */
@media (max-width: 768px) {
    /* Header-Layout: Flex-Container für eine vertikale Anordnung */
    header .container.mx-auto {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        position: relative; /* Wichtig für absolutes Logo */
    }

    /* Blendet den Desktop-Titel aus */
    header .container.mx-auto > div:first-child {
        display: none;
    }

    /* Positioniert Logo und Burger-Menü in einer oberen Zeile */
    header .container.mx-auto > div:nth-child(2) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 1rem; /* Abstand zum Button */
    }

    /* Positioniert das Logo links und den Burger-Menü-Button rechts */
    header .container.mx-auto > div:nth-child(2) > a {
        margin-right: auto;
    }
    header .container.mx-auto > div:nth-child(2) > button {
        margin-left: auto;
    }

    /* Blendet die Desktop-Navigation aus und macht den Button-Container sichtbar */
    header .container.mx-auto > nav {
        display: block !important;
        width: 100%;
        text-align: center;
    }

    /* Blendet alle Navigationspunkte außer dem Button aus */
    header .container.mx-auto > nav ul li:not(:last-child) {
        display: none;
    }

    /* Entfernt den Button aus dem mobilen Burger-Menü */
    #mobile-menu li:last-child {
        display: none;
    }

    /* Restliche mobile Anpassungen (unverändert) */
    .grid-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    .grid-item {
        min-height: 120px;
        padding: 20px;
        transform: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        background-size: cover;
    }
    .grid-item::before {
        background-color: rgba(0, 0, 0, 0.5);
    }
    .grid-item:hover::before {
        background-color: rgba(0, 0, 0, 0.5);
    }
    .grid-item h3 {
        margin-bottom: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        cursor: pointer;
    }
    .grid-item.active .toggle-icon {
        transform: rotate(90deg);
    }
    .grid-item p {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        transition: opacity 0.4s ease, max-height 0.4s ease;
    }
    .grid-item.active p {
        opacity: 1;
        max-height: 200px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    /* Logo-Vergrößerung mobil (Höhe 240px, Breite 360px) */
    header .container.mx-auto > div:nth-child(2) > a.logo-mobile {
        height: 240px !important;
        width: 360px !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: left top !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    /* Button „Erstgespräch vereinbaren“: Breite anpassen, zentriert */
    #erstgespraech-button {
        display: inline-block;
        background-color: var(--primary-green);
        color: white;
        font-weight: 600;
        padding: 10px 20px;
        border-radius: 25px;
        text-decoration: none;
        margin: 0 auto 20px auto;
        cursor: pointer;
        border: none;
        font-size: 1em;
        white-space: nowrap;
        transition: background-color 0.3s ease;
    }
    #erstgespraech-button:hover {
        background-color: var(--hover-green);
    }
}
