/* =========================================================================
   COMPONENT: FAQ
   Descripció: Secció de preguntes freqüents en format accordion.
   Reutilitzable a psicologia.html, fisioterapia.html i index.html.
   Elements: .faq, .faq__header, .faq__title, .faq__subtitle,
             .faq__accordion, .faq__item, .faq__question, .faq__answer
   ========================================================================= */

/* ── Contenidor principal ── */
.faq {
    padding: 5rem 2rem;
    background-color: var(--color-cream, #faf8f5);
}

.faq__inner {
    max-width: 760px;
    margin: 0 auto;
}

/* ── Header secció ── */
.faq__header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq__overline {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent, #e87d52);
    display: block;
    margin-bottom: 0.75rem;
}

.faq__title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--color-black-soft, #1a1a1a);
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.faq__subtitle {
    font-size: 0.95rem;
    color: var(--color-grey-muted, #888);
    margin: 0;
    line-height: 1.6;
}

/* ── Accordion ── */
.faq__accordion {
    display: flex;
    flex-direction: column;
}

.faq__item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq__question {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-black-soft, #1a1a1a);
    text-align: left;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: color 0.2s ease;
}

.faq__question:hover {
    color: var(--color-accent, #e87d52);
}

/* Icona +/× */
.faq__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.3s ease;
    position: relative;
}

.faq__icon::before,
.faq__icon::after {
    content: '';
    position: absolute;
    background: var(--color-black-soft, #1a1a1a);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.faq__icon::before {
    width: 10px;
    height: 2px;
}

.faq__icon::after {
    width: 2px;
    height: 10px;
}

.faq__item--open .faq__icon::after {
    transform: rotate(90deg);
}

.faq__item--open .faq__icon {
    background: rgba(232, 125, 82, 0.1);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq__item--open .faq__answer {
    max-height: 400px;
}

.faq__answer p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-grey-muted, #888);
    padding-bottom: 1.25rem;
    margin: 0;
}

/* ── CTA final ── */
.faq__cta {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.92rem;
    color: var(--color-grey-muted, #888);
}

.faq__cta a {
    color: var(--color-accent, #e87d52);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .faq {
        padding: 4rem 1.25rem;
    }
}