.faq-section {
    padding-bottom: 70px;
}

.faq-section h4, .faq-item-section h4 {
    padding-left: 0;
}

.faq-section .title-row {
    margin-bottom: 16px;
}

.faq-search-form {
    flex-shrink: 0;
}

.faq-search-wrap {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    padding: 4px 8px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.faq-search-label {
    display: flex;
    align-items: center;
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.faq-search-input {
    width: 100%;
    border: none;
    background: none;
    outline: none;
    padding: 0;
}

.faq-search-btn {
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.faq-search-btn img {
    width: 31px;
}

.faq-search-wrap:hover .faq-search-label,
.faq-search-wrap:focus-within .faq-search-label {
    width: 180px;
    padding-right: 8px;
}

.faq-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(259px, 1fr));
    gap: 27px;
    row-gap: 35px;
    margin-bottom: 36px;
}

.faq-chip {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 21px;
    background: #EFF2F8;
    color: #2F3137;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
}

.faq-chip:hover {
    background: #DFE4EE;
    color: #000000;
}

.faq-chip-active {
    background: var(--accent, #4670ED);
    color: #fff;
}

.faq-chip-active:hover {
    color: #fff;
}

.faq-chip img {
    max-height: 108px;
    height: 100%;
    padding: 20px;
    margin-bottom: 26px;
    margin-top: 26px;
}

.faq-chip span {
    width: 100%;
    text-align: left;
    font-size: 1.37rem;
    font-family: "Syne Regular", serif;
}

.faq-popular {
    margin-bottom: 0;
    margin-top: 81px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 43px;
}

.faq-card {
    border-radius: 20px;
    overflow: hidden;
    background: #F1F3F7;
    display: flex;
    flex-direction: column;
    transition: transform .2s;
}

.faq-card:hover {
    transform: translateY(-2px);
}

.faq-card-img-link {
    display: block;
    text-decoration: none;
}

.faq-card-img {
    height: 220px;
    background: #D9D9D9 center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-card-img-fallback {
    color: #bdbdbd;
}

.faq-card-img-fallback svg {
    width: 48px;
    height: 48px;
}

.faq-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.faq-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 38px;
}

.faq-card-date {
    font-size: 16px;
    color: #80868b;
    font-family: "SF Pro Light", serif;
}

.faq-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 11px;
}

.faq-card-title a {
    color: #202124;
    text-decoration: none;
    font-family: 'Syne Medium', serif;
}

.faq-card-title a:hover {
    color: var(--accent, #8b7cf7);
}

.faq-card-desc {
    font-size: 1.15rem;
    color: #5f6368;
    flex: 1;
    margin: 0;
    white-space: pre-wrap;
    font-family: "SF Pro Light", serif;
}

.faq-read-more {
    font-size: 1rem;
    font-weight: 300;
    color: var(--accent, #4670ED);
    background: #E5E8EE;
    text-decoration: none;
    margin-top: auto;
    margin-left: auto;
    padding: 7px 10px;
    border-radius: 25px;
    font-family: "SF Pro Light", serif;
}

/* Pagination */
.faq-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 121px;
    flex-wrap: wrap;
}

.faq-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    padding: 8px;
    border-radius: 50%;
    font-size: 28px;
    color: #202124;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
    font-family: "DM Sans", serif;
}

.faq-page-num-btn {
    background: #EFF2F8;
}

.faq-page-btn svg {
    height: 25px;
}

.faq-page-btn:hover {
    background: #f1f3f4;
}

.faq-page-active {
    background: var(--accent, #4670ED) !important;
    border-color: var(--accent, #4670ED) !important;
    color: #fff !important;
}

.faq-page-disabled {
    color: #bdbdbd;
    cursor: default;
    pointer-events: none;
}

/* Empty */
.faq-empty {
    text-align: center;
    padding: 64px 0;
    color: #80868b;
}

.faq-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.faq-empty p {
    font-size: 15px;
    margin: 0;
}


/* ===== ITEM section: master/detail layout ===== */
/* `overflow-x: clip` keeps horizontal overflow hidden (like the global body rule)
   but, unlike `hidden`, does not create a scroll container — so the sticky left
   nav can stick relative to the viewport. */
body.faq-detail-page {
    overflow-x: clip;
}

.faq-item-section.faq-detail {
    display: flex;
    align-items: stretch;
    padding: 0;
}

/* Left: list of all articles in the category */
.faq-nav-col {
    flex: 0 0 340px;
    max-width: 340px;
    border-right: 1px solid #E8EAEF;
    padding: 40px 22px;
}

.faq-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* The left list follows the scroll so it stays usable while the right side scrolls.
   Cap it to the viewport and let it scroll internally so every item stays reachable
   when a category has more questions than fit on screen. */
.faq-nav-col .faq-nav {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    /* room so the scrollbar doesn't sit on top of the item text */
    padding-right: 6px;
}

.faq-nav-item {
    display: block;
    padding: 12px 20px;
    border-radius: 26px;
    color: #2F3137;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.35;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: 'DM Sans-Light', serif;
}

.faq-nav-item:hover {
    background: #F4F6FA;
    color: #000;
}

.faq-nav-item-active {
    background: #EFF2F8;
    color: #000;
}

/* Right: selected article */
.faq-detail-content {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: 40px 60px 90px;
}

.faq-item-section h4.faq-detail-title {
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 800;
    color: #16161d;
    line-height: 1.15;
    margin-bottom: 30px;
    padding-bottom: 0;
    font-family: 'Syne Medium', serif;
}

/* All articles are shown stacked; the left list scrolls to each one. */
.faq-panel {
    padding: 32px 0;
    border-top: 1px solid #EEF0F4;
    scroll-margin-top: 96px;
}

.faq-panel:first-child {
    padding-top: 4px;
    border-top: none;
}

.faq-panel:last-child {
    padding-bottom: 0;
}

.faq-item-question {
    font-size: clamp(1.3rem, 1.8vw, 1.75rem);
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.25;
    margin-bottom: 14px;
    font-family: 'Syne Medium', serif;
}

.faq-empty-msg {
    color: #80868b;
    font-size: 18px;
    font-family: 'DM Sans-Light', serif;
    margin: 0;
}

.faq-item-body {
    font-size: 22px;
    line-height: 1.8;
    color: #202124;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'DM Sans-Light', serif;
}

.faq-mobile-toggle {
    border: none;
    background: transparent;
    margin-bottom: 14px;
    cursor: pointer;
    line-height: 0;
}

.faq-mobile-toggle svg {
    width: 70px;
    height: 70px;
}

.faq-mobile-menu {
    display: none;
}

@media (max-width: 991px) {
    .faq-search-label {
        width: 180px;
    }

    .faq-item-section.faq-detail {
        display: flow-root;
        overflow: visible;
        margin-top: 170px;
    }

    .faq-detail-content {
        padding: 22px 22px 60px;
    }

    .faq-item-section h4.faq-detail-title {
        font-size: clamp(1.7rem, 7vw, 3.2rem);
        margin-bottom: 20px;
    }

    .faq-item-body {
        font-size: 25px;
        line-height: 1.7;
    }

    .faq-panel {
        scroll-margin-top: 120px;
    }

    .faq-item-question {
        font-size: clamp(1.2rem, 5.5vw, 2.5rem);
    }

    .faq-mobile-menu.open {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 50px;
        z-index: 20;
        width: 100%;
        padding: 14px;
        border-radius: 26px;
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        box-shadow: 0 24px 48px rgba(20, 28, 56, 0.14);
    }

    .faq-mobile-menu .faq-nav {
        gap: 2px;
    }

    .faq-mobile-menu .faq-nav-item {
        font-size: 35px;
        padding: 21px;
    }

    .faq-chip span {
        font-size: 1.77rem;
    }

    .faq-search-input {
        font-size: 26px;
    }
}
