/**
 * FAQ Accordion Styles
 * Modern Design mit Smooth Animations
 */

.faq-container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Badge */
.faq-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--wr-color-gold-light, rgba(212, 165, 116, 0.15));
    color: var(--wr-color-gold, #d4a574);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.faq-badge svg {
    width: 1rem;
    height: 1rem;
}

/* Header */
.faq-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.faq-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--wr-color-navy, #0f274d);
    margin: 0 0 1rem 0;
    font-family: var(--wr-font-heading, 'Quicksand', sans-serif);
}

.faq-header .lead {
    font-size: 1.125rem;
    color: var(--wr-text-secondary, rgba(15, 39, 77, 0.7));
    margin: 0;
    line-height: 1.6;
}

/* Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-accordion-item {
    background: white;
    border: 1px solid var(--wr-border-light, rgba(15, 39, 77, 0.1));
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(15, 39, 77, 0.08);
}

.faq-accordion-item:hover {
    box-shadow: 0 4px 12px rgba(15, 39, 77, 0.15);
    border-color: var(--wr-color-gold, #d4a574);
}

.faq-accordion-item.active,
.faq-accordion-item.is-open {
    border-color: var(--wr-color-gold, #d4a574);
}

/* Trigger Button */
.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    min-height: 56px;        /* Großzügiger Touch-Target für FAQ */
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wr-color-navy, #0f274d);
    transition: all 0.2s ease;
    gap: 1rem;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.faq-trigger:hover {
    color: var(--wr-color-gold, #d4a574);
    background: var(--wr-color-gold-light, rgba(212, 165, 116, 0.05));
}

.faq-trigger:active {
    transform: scale(0.98);
}

.faq-trigger:focus-visible {
    outline: 3px solid rgba(212, 165, 116, 0.5);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

.faq-question {
    flex: 1;
    font-family: var(--wr-font-heading, 'Quicksand', sans-serif);
}

/* Chevron/Icon with smooth rotation */
.faq-icon,
.faq-chevron {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--wr-color-gold, #d4a574);
    pointer-events: none;
}

/* Icon rotates when open - NUR via CSS! */
.faq-accordion-item.is-open .faq-icon,
.faq-accordion-item.is-open .faq-chevron {
    transform: rotate(180deg);
}

/* Content - SMOOTH MAX-HEIGHT ANIMATION (dynamisch via JS) */
.faq-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem; /* Padding horizontal bleibt, vertikal wird animiert */
    color: var(--wr-text-secondary, rgba(15, 39, 77, 0.8));
    line-height: 1.7;
    font-size: 0.9375rem;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Geöffneter Zustand - max-height wird via JS gesetzt */
.faq-accordion-item.is-open .faq-content {
    padding-top: 1rem;
    padding-bottom: 1.25rem;
    /* max-height wird dynamisch via JavaScript auf scrollHeight gesetzt */
}

.faq-content p {
    margin: 0 0 0.75rem 0;
}

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

.faq-content ul,
.faq-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.faq-content li {
    margin-bottom: 0.5rem;
}

.faq-content a {
    color: var(--wr-color-gold, #d4a574);
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.faq-content a:hover {
    opacity: 0.8;
}

.faq-content strong {
    color: var(--wr-color-navy, #0f274d);
    font-weight: 600;
}

/* Footer CTA */
.faq-footer {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem;
    background: var(--wr-color-navy-light, rgba(15, 39, 77, 0.05));
    border-radius: 0.75rem;
}

.faq-footer p {
    margin: 0 0 1rem 0;
    color: var(--wr-text-secondary, rgba(15, 39, 77, 0.7));
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .faq-container {
        padding: 1rem 0.75rem;
    }

    .faq-header h1 {
        font-size: 1.75rem;
    }

    .faq-trigger {
        padding: 1rem 1rem;
        font-size: 0.9375rem;
    }

    .faq-content {
        padding: 1rem 1rem 1.25rem 1rem;
        font-size: 0.875rem;
    }

    .faq-chevron {
        width: 1rem;
        height: 1rem;
    }
}

/* Category Sections */
.faq-category {
    margin-top: 3rem;
}

.faq-category:first-child {
    margin-top: 0;
}

.faq-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wr-color-navy, #0f274d);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--wr-color-gold, #d4a574);
    font-family: var(--wr-font-heading, 'Quicksand', sans-serif);
}
