/* Trang Câu hỏi thường gặp: chỉ nạp khi Page chứa class="lh-faq" (custom-api/faq-page.php). */
.lh-faq {
    --lh-faq-accent: #ff566b;
    --lh-faq-accent-dark: #df1831;
    --lh-faq-link: #c4142b;
    --lh-faq-soft: #fff0f3;
    --lh-faq-tint: #fff7f8;
    --lh-faq-line: #ffe1e6;
    --lh-faq-open-line: #ffc9d2;
    --lh-faq-step-bg: #ffe3e8;
    --lh-faq-step-text: #b0102a;
    --lh-faq-text: #111827;
    --lh-faq-body: #3a414f;
    --lh-faq-muted: #5b6270;
    --lh-faq-border: #eceef2;
    --lh-faq-note: #f4f5f7;
    --lh-faq-focus: rgba(255, 86, 107, .45);
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin: 4px 0 40px;
    color: var(--lh-faq-text);
}

body:has(.lh-faq) .entry-title {
    margin: 20px 0 14px;
    color: #111827;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.lh-faq h2, .lh-faq h3, .lh-faq p, .lh-faq ol {
    margin: 0;
}

.lh-faq a {
    color: var(--lh-faq-link);
}

.lh-faq a:hover {
    color: #9e0f22;
}

.lh-faq a:focus-visible, .lh-faq summary:focus-visible, .lh-faq button:focus-visible, .lh-faq input:focus-visible {
    outline: 3px solid var(--lh-faq-focus);
    outline-offset: 2px;
}

/* Phần đầu trang */
.lh-faq .lh-faq-hero {
    display: grid;
    gap: 16px;
    padding: 18px 16px;
    border: 1px solid var(--lh-faq-line);
    border-radius: 24px;
    background: var(--lh-faq-tint);
}

.lh-faq .lh-faq-intro {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.lh-faq .lh-faq-lead {
    max-width: 52ch;
    color: #4b5260;
    font-size: 16px;
    line-height: 1.55;
}

.lh-faq .lh-faq-search {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 560px;
}

.lh-faq .lh-faq-search label {
    margin: 0;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.lh-faq .lh-faq-search input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid #f3d3d9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(223, 24, 49, .06);
    color: var(--lh-faq-text);
    font: inherit;
    font-size: 16px;
}

.lh-faq .lh-faq-search input::placeholder {
    color: #6b7280;
    font-size: 15px;
}

.lh-faq .lh-faq-search input:focus {
    border-color: var(--lh-faq-accent);
}

.lh-faq .lh-faq-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--lh-faq-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(223, 24, 49, .08);
}

.lh-faq .lh-faq-steps h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.lh-faq .lh-faq-steps ol {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    list-style: none;
    counter-reset: lh-faq-step;
}

.lh-faq .lh-faq-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 30px;
    padding-left: 42px;
    counter-increment: lh-faq-step;
}

.lh-faq .lh-faq-steps li::before, .lh-faq .lh-faq-step-list li::before {
    content: counter(lh-faq-step);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--lh-faq-step-bg);
    color: var(--lh-faq-step-text);
    font-size: 15px;
    font-weight: 700;
}

.lh-faq .lh-faq-steps strong {
    font-size: 15px;
    font-weight: 600;
}

.lh-faq .lh-faq-steps span {
    color: var(--lh-faq-muted);
    font-size: 14px;
    line-height: 1.5;
}

.lh-faq .lh-faq-steps > a {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    min-height: 36px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

/* Chevron SVG cùng nét với icon câu hỏi; mask + currentColor để đổi màu theo link. */
.lh-faq .lh-faq-steps > a::after, .lh-faq .lh-faq-more::after {
    content: "";
    flex: none;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s;
}

.lh-faq .lh-faq-steps > a:hover::after, .lh-faq .lh-faq-more:hover::after {
    transform: translateX(2px);
}

/* Chủ đề và danh sách câu hỏi */
.lh-faq .lh-faq-body {
    display: grid;
    gap: 16px;
}

.lh-faq .lh-faq-nav {
    display: flex;
    gap: 8px;
    min-width: 0;
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.lh-faq .lh-faq-nav-title {
    display: none;
    margin: 0 0 8px 14px;
    color: var(--lh-faq-muted);
    font-size: 13px;
    font-weight: 600;
}

.lh-faq .lh-faq-nav a {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid var(--lh-faq-border);
    border-radius: 999px;
    background: #fff;
    color: var(--lh-faq-body);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    scroll-snap-align: start;
}

.lh-faq .lh-faq-nav a:hover {
    background: var(--lh-faq-soft);
    color: var(--lh-faq-step-text);
}

.lh-faq .lh-faq-nav span {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 26px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f2f4;
    color: #4b5260;
    font-size: 12px;
    font-weight: 600;
}

.lh-faq .lh-faq-groups {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.lh-faq .lh-faq-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-margin-top: 110px;
}

.lh-faq .lh-faq-group > h2 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.lh-faq .lh-faq-item {
    border: 1px solid var(--lh-faq-border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.lh-faq .lh-faq-item[open] {
    border-color: var(--lh-faq-open-line);
    box-shadow: 0 14px 34px rgba(223, 24, 49, .08);
}

.lh-faq .lh-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 16px;
    list-style: none;
    cursor: pointer;
}

.lh-faq .lh-faq-item summary::-webkit-details-marker {
    display: none;
}

.lh-faq .lh-faq-item summary:hover, .lh-faq .lh-faq-item[open] summary {
    background: #fffafb;
}

.lh-faq .lh-faq-item summary h3 {
    color: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.lh-faq .lh-faq-item summary::after {
    content: "";
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background-color: #f4f5f7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a414f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px;
    transition: transform .25s cubic-bezier(.16, 1, .3, 1), background-color .2s;
}

.lh-faq .lh-faq-item[open] summary::after {
    background-color: var(--lh-faq-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    transform: rotate(180deg);
}

.lh-faq .lh-faq-answer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 14px;
    background: #fffafb;
    color: var(--lh-faq-body);
    font-size: 15px;
    line-height: 1.6;
}

.lh-faq .lh-faq-answer p {
    max-width: 68ch;
}

.lh-faq .lh-faq-step-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    list-style: none;
    counter-reset: lh-faq-step;
}

.lh-faq .lh-faq-step-list li {
    position: relative;
    padding: 8px 12px 8px 44px;
    border-radius: 10px;
    background: #fff;
    counter-increment: lh-faq-step;
}

.lh-faq .lh-faq-step-list li::before {
    top: 8px;
    left: 10px;
    width: 24px;
    height: 24px;
    font-size: 13px;
}

.lh-faq .lh-faq-note {
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--lh-faq-note);
    font-size: 14px;
    line-height: 1.55;
}

.lh-faq .lh-faq-note strong {
    font-weight: 600;
}

.lh-faq .lh-faq-more {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--lh-faq-soft);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* Kết quả tìm kiếm (faq.js chèn) */
.lh-faq .lh-faq-status {
    color: #4b5260;
    font-size: 15px;
}

.lh-faq .lh-faq-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    border: 1.5px dashed var(--lh-faq-open-line);
    border-radius: 20px;
    text-align: center;
}

.lh-faq .lh-faq-empty h2 {
    font-size: 20px;
    font-weight: 700;
}

.lh-faq .lh-faq-empty p {
    max-width: 44ch;
    color: #4b5260;
    font-size: 15px;
    line-height: 1.6;
}

.lh-faq [hidden] {
    display: none !important;
}

/* Khối liên hệ */
.lh-faq .lh-faq-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    padding: 20px 18px;
    border-radius: 24px;
    background: var(--lh-faq-soft);
}

.lh-faq .lh-faq-contact h2 {
    flex: 1 1 100%;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.lh-faq .lh-faq-contact p {
    flex: 999 1 380px;
    color: #4b5260;
    font-size: 16px;
    line-height: 1.6;
}

.lh-faq .lh-faq-btn {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 46px;
    padding: 0 20px;
    border: 1.5px solid var(--lh-faq-accent-dark);
    border-radius: 999px;
    background: var(--lh-faq-accent-dark);
    box-shadow: 0 10px 24px rgba(223, 24, 49, .22);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lh-faq .lh-faq-btn:hover {
    border-color: var(--lh-faq-link);
    background: var(--lh-faq-link);
    color: #fff;
}

.lh-faq .lh-faq-btn.lh-faq-btn-ghost {
    background: transparent;
    box-shadow: none;
    color: var(--lh-faq-link);
}

.lh-faq .lh-faq-btn.lh-faq-btn-ghost:hover {
    background: #fff;
    color: #9e0f22;
}

.lh-faq .lh-faq-btn:active {
    transform: translateY(1px);
}

@media (min-width: 576px) {
    .lh-faq .lh-faq-btn {
        flex: 0 0 auto;
    }
}

@media (min-width: 992px) {
    .lh-faq .lh-faq-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
        gap: 28px;
        align-items: center;
        padding: 28px 32px;
    }

    .lh-faq .lh-faq-steps {
        padding: 20px;
    }

    .lh-faq .lh-faq-search input {
        padding: 0 18px;
    }

    .lh-faq .lh-faq-body {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 28px;
        align-items: start;
    }

    .lh-faq .lh-faq-nav {
        flex-direction: column;
        gap: 2px;
        overflow: visible;
    }

    .lh-faq .lh-faq-nav-title {
        display: block;
    }

    .lh-faq .lh-faq-nav a {
        border: 0;
        border-radius: 12px;
        white-space: normal;
    }

    .lh-faq .lh-faq-contact {
        padding: 24px 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lh-faq .lh-faq-item, .lh-faq .lh-faq-item summary::after, .lh-faq .lh-faq-steps > a::after, .lh-faq .lh-faq-more::after {
        transition: none;
    }
}
