.sf-faq-section,
.sf-faq-section * {
    box-sizing: border-box;
}

.sf-faq-section {
    --sf-red: #c9000d;
    --sf-red-dark: #a50009;
    --sf-ink: #0d1b2a;
    --sf-muted: #6b7280;
    --sf-line: #e8e8e8;
    --sf-soft: #f8f8f8;
    width: 100%;
    padding: 60px 20px;
    background: #fff;
}

.sf-faq-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.sf-faq-sidebar {
    position: sticky;
    top: 110px;
}

.sf-faq-sidebar-title {
    margin-bottom: 16px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sf-faq-categories {
    display: grid;
    gap: 4px;
}

.sf-faq-category {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--sf-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.sf-faq-category:hover {
    background: var(--sf-soft);
}

.sf-faq-category.is-active {
    background: rgba(201, 0, 13, .08);
    color: var(--sf-red);
}

.sf-faq-count {
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #9ca3af;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.sf-faq-category.is-active .sf-faq-count {
    background: var(--sf-red);
    color: #fff;
}

.sf-faq-side-card {
    margin-top: 32px;
    padding: 24px 20px;
    border-radius: 16px;
    background: var(--sf-ink);
    text-align: center;
}

.sf-faq-side-card p {
    margin: 0 0 16px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
}

.sf-faq-open-modal {
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--sf-red);
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}

.sf-faq-open-modal:hover {
    background: var(--sf-red-dark);
}

.sf-faq-search {
    position: relative;
    display: block;
    margin-bottom: 40px;
}

.sf-faq-search-input {
    width: 100%;
    height: auto;
    padding: 8px 50px 6px 20px !important;
    border: 1px solid var(--sf-line) !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: var(--sf-ink) !important;
    font: inherit;
    font-size: 15px;
    box-shadow: none !important;
    outline: none;
}

.sf-faq-search-input:focus {
    border-color: var(--sf-red) !important;
}

.sf-faq-search-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
    pointer-events: none;
}

.sf-faq-empty {
    padding: 40px 20px;
    border: 1px dashed var(--sf-line);
    border-radius: 16px;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
}

.sf-faq-group {
    margin-bottom: 12px;
    scroll-margin-top: 130px;
}

.sf-faq-list {
    display: grid;
    gap: 12px;
}

.sf-faq-item {
    overflow: hidden;
    border: 1px solid var(--sf-line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .25s ease;
}

.sf-faq-item.is-open {
    border-color: var(--sf-red);
}

.sf-faq-question {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border: 0;
    background: var(--sf-soft);
    color: var(--sf-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .25s ease;
}

.sf-faq-question:hover {
    background: #f0f0f0;
}

.sf-faq-item.is-open .sf-faq-question {
    background: rgba(201, 0, 13, .08);
}

.sf-faq-question-text {
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.45;
}

.sf-faq-plus {
    display: inline-flex;
    padding: 6px 10px 3px 10px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sf-line);
    border-radius: 50%;
    background: #fff;
    color: #9ca3af;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}

.sf-faq-item.is-open .sf-faq-plus {
    transform: rotate(45deg);
    border-color: var(--sf-red);
    background: var(--sf-red);
    color: #fff;
}

.sf-faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    background: #fff;
    transition: grid-template-rows .35s ease;
}

.sf-faq-item.is-open .sf-faq-answer {
    grid-template-rows: 1fr;
}

.sf-faq-answer-inner {
    overflow: hidden;
}

.sf-faq-answer p {
    margin: 0;
    padding: 16px 22px 22px;
    color: var(--sf-muted);
    font-size: 14.5px;
    line-height: 1.85;
}

.sf-faq-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(13, 27, 42, .62);
}

.sf-faq-modal.is-open {
    display: flex;
}

.sf-faq-modal-dialog {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 34px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .25);
}

.sf-faq-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sf-line);
    border-radius: 50%;
    background: var(--sf-soft);
    color: var(--sf-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.sf-faq-modal-close:hover {
    border-color: var(--sf-red);
    background: var(--sf-red);
    color: #fff;
}

.sf-faq-modal h3 {
    margin: 0 45px 8px 0;
    color: var(--sf-ink);
    font-size: 28px;
    line-height: 1.2;
}

.sf-faq-modal-intro {
    margin: 0 0 24px;
    color: #9ca3af;
    font-size: 13.5px;
    line-height: 1.6;
}

.sf-faq-cf7-wrap .wpcf7-form p {
    margin-bottom: 14px;
}

.sf-faq-cf7-wrap label {
    display: block;
    color: var(--sf-ink);
    font-size: 12.5px;
    font-weight: 600;
}

.sf-faq-cf7-wrap input:not([type="submit"]),
.sf-faq-cf7-wrap textarea,
.sf-faq-cf7-wrap select {
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px !important;
    border: 1px solid var(--sf-line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.sf-faq-cf7-wrap input:focus,
.sf-faq-cf7-wrap textarea:focus,
.sf-faq-cf7-wrap select:focus {
    border-color: var(--sf-red) !important;
    outline: none;
}

.sf-faq-cf7-wrap input[type="submit"] {
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--sf-red);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.sf-faq-cf7-wrap input[type="submit"]:hover {
    background: var(--sf-red-dark);
}

body.sf-faq-modal-lock {
    overflow: hidden;
}

@media (max-width: 900px) {
    .sf-faq-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sf-faq-sidebar {
        position: static;
    }

    .sf-faq-sidebar-title {
        display: none;
    }

    .sf-faq-categories {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .sf-faq-category {
        width: auto;
        min-width: max-content;
    }

    .sf-faq-side-card {
        display: none;
    }
}

@media (max-width: 575px) {
    .sf-faq-section {
        padding: 40px 15px;
    }

    .sf-faq-question {
        padding: 16px 17px;
    }

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

    .sf-faq-answer p {
        padding: 14px 17px 18px;
    }

    .sf-faq-modal-dialog {
        padding: 28px 20px 22px;
        border-radius: 14px;
    }
}