/**
 * FAQ Block Styles
 * Based on about-faq section from EverSmith HTML
 */

/**
 * FAQ Block - Main Container
 * Note: Do NOT add overflow:hidden here as it breaks position:sticky
 */
.faq-block {
    position: relative;
    padding: 100px 80px 80px;
    background: #fff;
}

.faq-block__container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 64px;
    align-items: flex-start;
}

/* Decorative watermark */
.faq-block__watermark {
    position: absolute;
    left: -200px;
    bottom: -100px;
    width: 736px;
    height: 440px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Background ES logo icon on the left */
.faq-block__bg-icon-left {
    position: absolute;
    left: 0;
    top: 50px;
    width: 718px;
    height: 426px;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    opacity: 0.6;
}

.faq-block__bg-icon-left img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Left column: header - sticky positioning */
.faq-block__header {
    flex: 0 0 573px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: -webkit-sticky;  /* Safari support */
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: fit-content;
    z-index: 1;
}

/* Label styling */
.faq-block__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.faq-block__label span {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: #0097a7;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Label crown: theme .es-icon-titles */

/* Header copy uses theme .es-section-title / .es-section-subtitle */

/* Right column: FAQ list */
.faq-block__list {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
    margin-top: -27px;
}

/* FAQ item */
.faq-block__item {
    border-bottom: 1px solid #e5e7eb;
}

/* FAQ question button */
.faq-block__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.4;
    color: var(--smith-grey, #404a50);
    transition: color 0.2s ease;
}

.faq-block__question:hover {
    color: var(--orange, #e57440);
}

.faq-block__question span {
    flex: 1 1 0;
    min-width: 0;
}

/* Chevron icon */
.faq-block__chevron {
    flex-shrink: 0;
    width: 12px;
    height: 7px;
    transition: transform 0.3s ease;
}

/* Rotate chevron when expanded */
.faq-block__item.is-expanded .faq-block__chevron {
    transform: rotate(180deg);
}

/* FAQ answer - collapsible */
.faq-block__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-block__answer > * {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
}

.faq-block__item.is-expanded .faq-block__answer {
    max-height: 500px;
    padding-bottom: 24px;
}

.faq-block__answer p {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--smith-grey, #404a50);
    margin: 0;
}

/* ==========================================================================
   Tablet Styles (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
    .faq-block {
        padding: 80px 48px;
    }

    .faq-block__list {
        margin-top: 0px;
    }

    .faq-block__container {
        flex-direction: column;
        gap: 48px;
    }

    .faq-block__header {
        flex: 1 1 0;
        position: static;
        align-self: auto;
        top: auto;
    }

}

/* ==========================================================================
   Tablet Styles (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .faq-block__watermark {
        width: 400px;
        height: auto;
        left: -100px;
        bottom: -50px;
    }
}

/* ==========================================================================
   Mobile Styles (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .faq-block {
        padding: 60px 24px;
    }

    .faq-block__bg-icon-left {
        display: none;
    }

    .faq-block__header {
        position: static;
        align-self: auto;
        top: auto;
    }

    .faq-block__question {
        font-size: 16px;
        padding: 20px 0;
    }

    .faq-block__answer p,
    .faq-block__answer > * {
        font-size: 16px;
    }

}

/* ==========================================================================
   Small Mobile Styles (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .faq-block {
        padding: 40px 16px;
    }

}
