/* ============================================================
   FAQ ACCORDION — B2B Modern Design
   Matches navy/white editorial theme from description.css
   ============================================================ */

/* Section heading — base styles (description.css overrides color/margin inside .cat-desc-content) */
.faq-h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.01em;
    margin: 0 0 24px;
    padding: 0 0 14px;
    border-top: none;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

/* Navy accent underline on heading */
.faq-h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: #2563a0;
}

/* ---- List structure resets ---- */
.faq-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-ul > .faq-li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-ul > .faq-li > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---- Each FAQ row ---- */
.faq-slide {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s ease;
}

.faq-slide:first-child {
    border-top: 1px solid #e2e8f0;
}

.faq-slide:last-child {
    border-bottom: none;
}

/* ---- Question row (h3) — layout/interaction only; color/spacing overridden by description.css ---- */
.faq-slide-title {
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

/* Active / expanded state */
.faq-title-active {
    color: #2563a0;
}

/* ---- Arrow icon ---- */
.faq-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override FontAwesome pseudo — navy circle-arrow via mask */
.fa-arrow-alt-circle-down::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background-color: #2563a0;
    -webkit-mask: url('../images/icons/arrow-alt-circle-down-solid.svg') no-repeat center / contain;
    mask: url('../images/icons/arrow-alt-circle-down-solid.svg') no-repeat center / contain;
    transition: background-color 0.2s ease;
}

/* Rotate the icon when the slide is expanded */
.faq-title-active .faq-icon {
    transform: rotate(180deg);
}

.faq-title-active .fa-arrow-alt-circle-down::before {
    background-color: #1a3353;
}

/* ---- Answer panel ---- */
/* display: none removed — it made overflow:hidden irrelevant (inline elements ignore it) */
/* max-height: 0 + overflow: hidden is the correct collapse technique */
.faq-slide-data {
    max-height: 0;
    overflow: hidden;
    display: block; /* explicit block so overflow:hidden actually works */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-slide-data > span {
    display: block;
    padding: 4px 4px 18px;
    font-size: 14px;
    color: #475569; /* Slate 600 — slightly lighter than body text */
    line-height: 1.75;
    font-family: 'Inter', system-ui, sans-serif;
}

/* JS adds .show to .faq-slide-data when expanded */
.faq-slide-data.show {
    max-height: 800px; /* large enough for any answer */
}

/* ---- Responsive ---- */
@media screen and (max-width: 767px) {
    .faq-h2 {
        font-size: 17px;
    }

    .faq-slide-title {
        font-size: 14px;
        padding: 14px 4px;
    }

    .faq-slide-data > span {
        font-size: 13px;
        padding-bottom: 14px;
    }

    .faq-li > ul {
        padding: 0;
    }

    .faq-slide-data {
        overflow: auto; /* allow scroll on very long answers */
    }
}
