/* =====================================================
   FAQ PAGE — Premium Sidebar + Accordion Layout
   Inspired by enterprise SaaS knowledge-base patterns
   ===================================================== */

/* Section wrapper */
.faq-premium-section {
    padding: 80px 0 100px;
    background-color: #ffffff;
    position: relative;
}

/* Main grid: sidebar + content */
.faq-premium-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
}

/* ─── LEFT SIDEBAR ─── */
.faq-sidebar {
    position: sticky;
    top: 120px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e8ecf0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.faq-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    color: #3a3f47;
    transition: all 0.25s ease;
    user-select: none;
}

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

.faq-sidebar-item:hover {
    background-color: #f7f9fb;
    color: #003042;
}

.faq-sidebar-item.active {
    background-color: #003042;
    color: #ffffff;
    font-weight: 600;
}

.faq-sidebar-item .faq-cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.faq-sidebar-item .faq-cat-count {
    flex-shrink: 0;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #5a6068;
    margin-left: 12px;
    transition: all 0.25s ease;
}

.faq-sidebar-item.active .faq-cat-count {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.faq-sidebar-item:hover .faq-cat-count {
    background: #e4e8ec;
}

.faq-sidebar-item.active:hover .faq-cat-count {
    background: rgba(255, 255, 255, 0.25);
}


/* ─── RIGHT CONTENT AREA ─── */
.faq-content-area {
    min-width: 0;
}

/* Category group block */
.faq-category-group {
    margin-bottom: 48px;
}

.faq-category-group:last-child {
    margin-bottom: 0;
}

/* Category header row */
.faq-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #003042;
}

.faq-category-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #003042;
    margin: 0;
    letter-spacing: -0.3px;
}

.faq-category-badge {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #7a8290;
    background: #f0f2f5;
    padding: 5px 14px;
    border-radius: 20px;
    white-space: nowrap;
}


/* ─── ACCORDION ITEMS ─── */
.faq-accordion-item {
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    background: #ffffff;
}

.faq-accordion-item:last-child {
    margin-bottom: 0;
}

.faq-accordion-item:hover {
    border-color: #d0d5dc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.faq-accordion-item.open {
    border-color: #003042;
    box-shadow: 0 4px 16px rgba(0, 48, 66, 0.08);
}

/* Question button */
.faq-question-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 16px;
    outline: none;
}

.faq-question-btn:focus-visible {
    outline: 2px solid #003042;
    outline-offset: -2px;
    border-radius: 12px;
}

.faq-question-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1f26;
    line-height: 1.5;
    flex: 1;
    transition: color 0.25s ease;
}

.faq-accordion-item.open .faq-question-text {
    color: #003042;
}

.faq-toggle-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 300;
    color: #5a6068;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
}

.faq-accordion-item.open .faq-toggle-icon {
    background: #003042;
    color: #ffffff;
    transform: rotate(45deg);
}

/* Answer panel */
.faq-answer-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    opacity: 0;
}

.faq-accordion-item.open .faq-answer-panel {
    opacity: 1;
}

.faq-answer-content {
    padding: 0 24px 24px 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
    color: #4a5060;
    border-top: 1px solid #f0f2f5;
    padding-top: 20px;
}

.faq-answer-content p {
    margin: 0;
}


/* ─── CTA SECTION AT BOTTOM ─── */
.faq-cta-block {
    margin-top: 64px;
    background: linear-gradient(135deg, #003042 0%, #006382 100%);
    border-radius: 18px;
    padding: 48px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.faq-cta-text {
    flex: 1;
}

.faq-cta-text h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.faq-cta-text p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.6;
}

.faq-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #ffffff;
    color: #003042;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 2px solid transparent;
}

.faq-cta-btn:hover {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
    text-decoration: none;
}

.faq-cta-btn i {
    transition: transform 0.3s ease;
}

.faq-cta-btn:hover i {
    transform: translateX(4px);
}


/* ─── RESPONSIVE BREAKPOINTS ─── */

/* Tablet landscape */
@media (max-width: 1024px) {
    .faq-premium-section {
        padding: 60px 0 80px;
    }

    .faq-premium-layout {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }

    .faq-category-title {
        font-size: 20px;
    }

    .faq-cta-block {
        padding: 40px 36px;
        flex-direction: column;
        text-align: center;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .faq-premium-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .faq-sidebar {
        position: static;
        display: flex;
        overflow-x: auto;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .faq-sidebar::-webkit-scrollbar {
        display: none;
    }

    .faq-sidebar-list {
        display: flex;
        flex-direction: row;
        width: max-content;
    }

    .faq-sidebar-item {
        border-bottom: none;
        border-right: 1px solid #f0f2f5;
        white-space: nowrap;
        padding: 14px 20px;
        font-size: 13.5px;
    }

    .faq-sidebar-item:last-child {
        border-right: none;
    }

    .faq-question-btn {
        padding: 16px 20px;
    }

    .faq-question-text {
        font-size: 15px;
    }

    .faq-answer-content {
        padding: 0 20px 20px;
        font-size: 14px;
        padding-top: 16px;
    }

    .faq-cta-block {
        padding: 36px 28px;
        flex-direction: column;
        text-align: center;
    }

    .faq-cta-text h3 {
        font-size: 22px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .faq-premium-section {
        padding: 40px 0 60px;
    }

    .faq-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .faq-category-title {
        font-size: 18px;
    }

    .faq-question-btn {
        padding: 14px 16px;
    }

    .faq-question-text {
        font-size: 14px;
    }

    .faq-toggle-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .faq-answer-content {
        padding: 0 16px 16px;
        font-size: 13.5px;
        padding-top: 14px;
    }

    .faq-cta-block {
        padding: 32px 20px;
        border-radius: 14px;
    }

    .faq-cta-text h3 {
        font-size: 20px;
    }

    .faq-cta-text p {
        font-size: 14px;
    }

    .faq-cta-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
