/* CLAUDE: FAQ Akkordeon Styles - MODERN v3.0 */
/* CLAUDE: Komplettes Redesign nach Screenshot-Referenz */
/* CLAUDE: Features: Linke Akzentlinie, schlichtes Plus/Minus, Sans-Serif */
/* CLAUDE: Nutzt native <details>/<summary> für Barrierefreiheit */

/* ============================================
   CLAUDE: CSS Custom Properties (Variablen)
   ============================================ */

.lhi-faq-container {
    /* CLAUDE: Farben - Dark Umber als Akzent für Konsistenz */
    --lhi-faq-accent: var(--wp--preset--color--dark-umber, #3B2A1A);
    --lhi-faq-accent-hover: var(--wp--preset--color--heritage-gold, #8a6b3f);
    --lhi-faq-text: var(--wp--preset--color--dark-umber, #3B2A1A);
    --lhi-faq-text-secondary: var(--wp--preset--color--graphite, #594834);
    --lhi-faq-bg: var(--wp--preset--color--white, #FFFFFF);
    --lhi-faq-border: var(--wp--preset--color--porous-stone, #DCD7CE);

    /* CLAUDE: Spacing */
    --lhi-faq-gap: 1rem;
    --lhi-faq-padding: 1.5rem;
    --lhi-faq-radius: 12px;
    --lhi-faq-accent-width: 4px;
}

/* ============================================
   CLAUDE: FAQ Container
   ============================================ */

/* CLAUDE: Container für alle FAQ-Items */
.lhi-faq-container {
    /* CLAUDE: Vertikaler Abstand zwischen FAQs */
    display: flex;
    flex-direction: column;
    gap: var(--lhi-faq-gap);
    /* CLAUDE: Maximale Breite für bessere Lesbarkeit */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   CLAUDE: FAQ Item (Karte)
   ============================================ */

/* CLAUDE: Einzelnes FAQ-Item - Moderne Karte mit linker Akzentlinie */
.lhi-faq-item {
    /* CLAUDE: Weißer Hintergrund */
    background-color: var(--lhi-faq-bg);
    /* CLAUDE: Abgerundete Ecken */
    border-radius: var(--lhi-faq-radius);
    /* CLAUDE: Dezenter Rahmen */
    border: 1px solid var(--lhi-faq-border);
    /* CLAUDE: WICHTIG: Linke Akzentlinie wie im Screenshot */
    border-left: var(--lhi-faq-accent-width) solid var(--lhi-faq-accent);
    /* CLAUDE: Minimaler Schatten für Tiefe */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    /* CLAUDE: Overflow für abgerundete Ecken */
    overflow: hidden;
    /* CLAUDE: Transition für Hover */
    transition: box-shadow 0.2s ease, border-left-color 0.2s ease;
}

/* CLAUDE: Hover-Effekt - Subtiler Schatten und Gold-Akzent */
.lhi-faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left-color: var(--lhi-faq-accent-hover);
}

/* CLAUDE: Focus-within für Accessibility */
.lhi-faq-item:focus-within {
    outline: 2px solid var(--lhi-faq-accent-hover);
    outline-offset: 2px;
}

/* ============================================
   CLAUDE: Details Element (Akkordeon)
   ============================================ */

/* CLAUDE: Details-Element */
.lhi-faq-details {
    /* CLAUDE: Keine Standard-Marker */
    list-style: none;
}

/* CLAUDE: Entfernt Standard-Marker in Safari */
.lhi-faq-details::-webkit-details-marker {
    display: none;
}

/* ============================================
   CLAUDE: Summary (Frage/Trigger)
   ============================================ */

/* CLAUDE: Summary - Klickbarer Bereich */
.lhi-faq-question {
    /* CLAUDE: Flexbox für Text und Icon */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    /* CLAUDE: Padding für Touch-Targets */
    padding: var(--lhi-faq-padding);
    /* CLAUDE: Mindesthöhe für Touch-Geräte (48px minimum) */
    min-height: 64px;
    /* CLAUDE: Cursor */
    cursor: pointer;
    /* CLAUDE: Kein Outline bei Focus (eigenes Styling) */
    outline: none;
    /* CLAUDE: WICHTIG: Sans-Serif Font wie im Screenshot */
    font-family: var(--wp--preset--font-family--source-sans-pro, 'Source Sans Pro', system-ui, sans-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--lhi-faq-text);
    line-height: 1.4;
    /* CLAUDE: Kein Text-Decoration */
    text-decoration: none;
    /* CLAUDE: Transition */
    transition: background-color 0.2s ease;
}

/* CLAUDE: Hover-Effekt auf Summary */
.lhi-faq-question:hover {
    background-color: rgba(220, 215, 206, 0.3);
}

/* CLAUDE: Aktiver Zustand bei geöffnetem FAQ */
.lhi-faq-details[open] > .lhi-faq-question {
    /* CLAUDE: Leichter Hintergrund wenn offen */
    background-color: rgba(220, 215, 206, 0.2);
}

/* CLAUDE: Focus-Styling für Accessibility */
.lhi-faq-question:focus-visible {
    background-color: rgba(138, 107, 63, 0.08);
}

/* CLAUDE: Frage-Text */
.lhi-faq-question-text {
    /* CLAUDE: Flexibles Wachstum */
    flex: 1;
    /* CLAUDE: Kein Zeilenumbruch bei kurzen Fragen */
    min-width: 0;
}

/* ============================================
   CLAUDE: FAQ Icon (Plus/Minus) - SCHLICHT
   ============================================ */

/* CLAUDE: Icon-Container - SCHLICHT ohne Hintergrund-Kreis */
.lhi-faq-icon {
    /* CLAUDE: Feste Größe */
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    /* CLAUDE: Relative für Pseudo-Elemente */
    position: relative;
    /* CLAUDE: KEIN Hintergrund-Kreis - schlicht wie im Screenshot */
    background: transparent;
    /* CLAUDE: Transition */
    transition: transform 0.25s ease;
}

/* CLAUDE: Horizontale Linie (immer sichtbar = Minus) */
.lhi-faq-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 2px;
    background-color: var(--lhi-faq-accent);
    border-radius: 1px;
    transition: background-color 0.2s ease;
}

/* CLAUDE: Vertikale Linie (Plus-Zeichen, wird bei open ausgeblendet) */
.lhi-faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 16px;
    background-color: var(--lhi-faq-accent);
    border-radius: 1px;
    /* CLAUDE: Transition für smooth Animation */
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* CLAUDE: Hover - Gold-Farbe */
.lhi-faq-question:hover .lhi-faq-icon::before,
.lhi-faq-question:hover .lhi-faq-icon::after {
    background-color: var(--lhi-faq-accent-hover);
}

/* CLAUDE: Wenn geöffnet: Vertikale Linie ausblenden (Plus zu Minus) */
.lhi-faq-details[open] .lhi-faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* ============================================
   CLAUDE: FAQ Antwort
   ============================================ */

/* CLAUDE: Antwort-Container */
.lhi-faq-answer {
    /* CLAUDE: Padding - oben weniger wegen Summary-Padding */
    padding: 0 var(--lhi-faq-padding) var(--lhi-faq-padding) var(--lhi-faq-padding);
    /* CLAUDE: Dezente Trennlinie oben */
    border-top: 1px solid var(--lhi-faq-border);
    margin-top: 0;
    /* CLAUDE: Text-Styling */
    font-family: var(--wp--preset--font-family--source-sans-pro, 'Source Sans Pro', system-ui, sans-serif);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--lhi-faq-text-secondary);
}

/* CLAUDE: Animation für Öffnen */
.lhi-faq-details[open] .lhi-faq-answer {
    animation: lhi-faq-fade-in 0.3s ease-out;
}

/* CLAUDE: Fade-In Animation */
@keyframes lhi-faq-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CLAUDE: Antwort-Content Styles
   ============================================ */

/* CLAUDE: Absätze in Antworten */
.lhi-faq-answer p {
    margin: 0 0 1em;
}

.lhi-faq-answer p:last-child {
    margin-bottom: 0;
}

/* CLAUDE: Listen in Antworten */
.lhi-faq-answer ol,
.lhi-faq-answer ul {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.lhi-faq-answer li {
    margin-bottom: 0.5em;
}

.lhi-faq-answer li:last-child {
    margin-bottom: 0;
}

/* CLAUDE: Fettdruck in Listen */
.lhi-faq-answer strong {
    color: var(--lhi-faq-text);
    font-weight: 600;
}

/* CLAUDE: Links in Antworten */
.lhi-faq-answer a {
    color: var(--wp--preset--color--burgundy, #8F2330);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lhi-faq-answer a:hover {
    color: var(--lhi-faq-accent-hover);
}

/* ============================================
   CLAUDE: Responsive Anpassungen
   ============================================ */

/* CLAUDE: Tablet */
@media (max-width: 1024px) {
    .lhi-faq-container {
        --lhi-faq-padding: 1.25rem;
    }
}

/* CLAUDE: Mobile */
@media (max-width: 767px) {
    .lhi-faq-container {
        --lhi-faq-gap: 0.75rem;
        --lhi-faq-padding: 1rem;
        --lhi-faq-radius: 10px;
    }

    .lhi-faq-question {
        font-size: 1rem;
        min-height: 56px;
        gap: 1rem;
    }

    .lhi-faq-answer {
        font-size: 0.9375rem;
        line-height: 1.65;
    }

    .lhi-faq-icon {
        width: 20px;
        height: 20px;
    }

    .lhi-faq-icon::before {
        width: 14px;
    }

    .lhi-faq-icon::after {
        height: 14px;
    }
}

/* CLAUDE: Kleine Mobile */
@media (max-width: 480px) {
    .lhi-faq-container {
        --lhi-faq-padding: 0.875rem;
    }

    .lhi-faq-question {
        font-size: 0.9375rem;
    }
}

/* ============================================
   CLAUDE: Reduced Motion
   ============================================ */

/* CLAUDE: Animationen deaktivieren bei Präferenz */
@media (prefers-reduced-motion: reduce) {
    .lhi-faq-details[open] .lhi-faq-answer {
        animation: none;
    }

    .lhi-faq-icon,
    .lhi-faq-icon::after,
    .lhi-faq-question,
    .lhi-faq-item {
        transition: none;
    }
}

/* ============================================
   CLAUDE: High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
    .lhi-faq-item {
        border-width: 2px;
        border-left-width: 5px;
    }

    .lhi-faq-icon::before,
    .lhi-faq-icon::after {
        height: 3px;
    }

    .lhi-faq-icon::after {
        width: 3px;
    }
}

/* ============================================
   CLAUDE: SVG Chevron Icon (NEU v3.1)
   CLAUDE: Für neues Vermietung/Verkauf FAQ-Design
   ============================================ */

/* CLAUDE: Chevron-Icon als Alternative zum Plus/Minus */
/* CLAUDE: Wird bei [open] um 180° gedreht */
.lhi-faq-chevron {
    /* CLAUDE: Feste Größe für konsistentes Erscheinungsbild */
    width: 20px;
    height: 20px;
    /* CLAUDE: Farbe aus Theme-Variablen */
    color: var(--lhi-faq-accent, var(--wp--preset--color--heritage-gold, #8a6b3f));
    /* CLAUDE: Sanfte Drehung bei Öffnen */
    transition: transform 0.3s ease, color 0.2s ease;
    /* CLAUDE: Nicht schrumpfen bei engem Platz */
    flex-shrink: 0;
    /* CLAUDE: Abstand zum Text */
    margin-left: 1rem;
}

/* CLAUDE: Chevron auf Hover */
.lhi-faq-question:hover .lhi-faq-chevron {
    color: var(--lhi-faq-accent-hover, var(--wp--preset--color--dark-umber, #3B2A1A));
}

/* CLAUDE: Chevron bei geöffnetem FAQ - 180° Drehung */
.lhi-faq-item[open] .lhi-faq-chevron {
    transform: rotate(180deg);
}

/* CLAUDE: Reduced Motion - keine Animation */
@media (prefers-reduced-motion: reduce) {
    .lhi-faq-chevron {
        transition: none;
    }
}

/* ============================================
   CLAUDE: Print Styles
   ============================================ */

@media print {
    /* CLAUDE: Alle FAQs geöffnet beim Drucken */
    .lhi-faq-details {
        display: block !important;
    }

    .lhi-faq-details[open] .lhi-faq-answer,
    .lhi-faq-answer {
        display: block !important;
        animation: none;
    }

    .lhi-faq-icon,
    .lhi-faq-chevron {
        display: none;
    }

    .lhi-faq-item {
        box-shadow: none;
        border: 1px solid #333;
        border-left-width: 4px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .lhi-faq-question {
        font-weight: 700;
    }
}
