/**
 * AlloDentiste FAQ Widget – Stylesheet
 */

/* ============================================================
   Container
   ============================================================ */
.allo-faq-widget {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px var(--allo-gutter);
    box-sizing: border-box;
}

.faq-inner {
    margin: 0 auto;
    width: 100%;
}

/* ============================================================
   Section Heading
   ============================================================ */
.faq-heading {
    margin: 0 0 40px;
    font-size: 2.25rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.2;
}

/* ============================================================
   FAQ List
   ============================================================ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================================
   FAQ Item Card
   ============================================================ */
.faq-item {
    background: #ffffff;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   Question Row (button)
   ============================================================ */
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 24px;
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    text-align: left;
    gap: 16px;
    -webkit-appearance: none;
    appearance: none;
    color: inherit;
    font-family: inherit;
    letter-spacing: inherit;
    outline: none;
}

.faq-question:hover,
.faq-question:focus,
.faq-question:active,
.faq-question:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    border-color: transparent !important;
    outline: none;
}

.faq-question-text {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ============================================================
   Chevron Icon
   ============================================================ */
.faq-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1A1A1A;
    transition: transform 0.3s ease;
}

.faq-item.is-open .faq-icon {
    transform: rotate(180deg);
}

/* ============================================================
   Answer Panel – CSS-based collapse
   ============================================================ */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
    border-top: 1px solid transparent;
}

/* When the JS is enabled the [hidden] attribute is removed and is-open class used */
.faq-item.is-open .faq-answer,
.faq-answer:not([hidden]) {
    grid-template-rows: 1fr;
    border-top-color: #E0E0E0;
}

/* For browsers that don't support grid-template-rows animation, hide if [hidden] still set */
.faq-answer[hidden] {
    display: none !important;
}

.faq-answer-inner {
    overflow: hidden;
    padding: 16px 24px 20px;
}

.faq-answer p {
    margin: 0 0 0.75em;
    font-size: 0.9375rem;
    color: #444444;
    line-height: 1.7;
}

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

.faq-answer ul,
.faq-answer ol {
    margin: 0 0 0.75em 1.25em;
    padding: 0;
    color: #444444;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.faq-answer li + li {
    margin-top: 4px;
}

/* ============================================================
   States: only JS-driven open state
   ============================================================ */
.faq-item.is-open .faq-answer {
    /* Handled above */
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .allo-faq-widget {
        padding: 40px var(--allo-gutter);
    }

    .faq-heading {
        font-size: 1.75rem;
        margin-bottom: 28px;
    }

    .faq-question {
        padding: 16px 18px;
    }

    .faq-answer-inner {
        padding: 0 18px 16px;
    }

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