/* =========================================================
   KSR Realty — Homepage FAQ section
   Soft white · cyan/blue accents · 40/60 desktop split
   ========================================================= */

.home-faq-section {
    --hf-cyan: var(--blue-primary, #11CFE0);
    --hf-blue-deep: var(--blue-deep, #087FAF);
    --hf-text: var(--text-dark, #231f18);
    --hf-muted: var(--text-muted, #2F3437);
    --hf-cream: var(--cream-bg-soft, #fcf9f2);
    --hf-border: rgba(35, 31, 24, 0.1);
    --hf-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --header-height: var(--nav-height, 58px);

    scroll-margin-top: calc(var(--header-height) + 24px);
    padding: 48px 0 56px;
    background: #ffffff;
    color: var(--hf-text);
    font-family: var(--font-primary, "Manrope", sans-serif);
}

.home-faq-container {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
    gap: 56px 64px;
    align-items: start;
}

/* ---------- Intro (left) ---------- */
.home-faq-intro {
    position: sticky;
    top: calc(var(--header-height) + 28px);
    align-self: start;
}

.home-faq-label {
    display: inline-block;
    margin: 0 0 10px;
    font-family: var(--font-primary, "Manrope", sans-serif);
    color: var(--gold-deep, #B8860B);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.home-faq-label::after {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    margin-top: 10px;
    border-radius: 1px;
    background: var(--gold-gradient, linear-gradient(110deg, #B8860B 0%, #D4AF37 28%, #F4D06F 50%, #FFE8A3 62%, #D4AF37 82%, #B8860B 100%));
}

.home-faq-title {
    margin: 0 0 14px;
    max-width: 12ch;
    color: var(--hf-text);
    font-family: var(--font-primary, "Manrope", sans-serif);
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.home-faq-desc {
    margin: 0 0 24px;
    max-width: 38ch;
    color: var(--hf-muted);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
}

/* Filters */
.home-faq-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    max-width: 100%;
    min-width: 0;
}

.home-faq-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid var(--hf-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--hf-muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease;
}

.home-faq-filter:hover,
.home-faq-filter:focus-visible {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--hf-text);
    outline: none;
}

.home-faq-filter:focus-visible {
    box-shadow: 0 0 0 3px rgba(27, 228, 235, 0.18);
}

.home-faq-filter.is-active {
    background: var(--blue-gradient, linear-gradient(90deg, #1BE4EB 0%, #11CFE0 48%, #087FAF 100%));
    border-color: transparent;
    color: #1a150c;
    box-shadow: 0 6px 16px rgba(8, 127, 175, 0.2);
}

/* Support CTA */
.home-faq-support {
    padding: 20px 20px 22px;
    border: 1px solid rgba(27, 228, 235, 0.22);
    border-radius: 18px;
    background: #ffffff;
}

.home-faq-support__title {
    margin: 0 0 8px;
    color: var(--hf-text);
    font-family: var(--font-primary, "Manrope", sans-serif);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
}

.home-faq-support__text {
    margin: 0 0 16px;
    color: var(--hf-muted);
    font-size: 15px;
    line-height: 1.65;
}

.home-faq-support__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-faq-support__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.home-faq-support__btn--primary {
    background: var(--blue-gradient, linear-gradient(90deg, #1BE4EB 0%, #11CFE0 48%, #087FAF 100%));
    color: #1a150c;
    border: 0;
}

.home-faq-support__btn--primary:hover,
.home-faq-support__btn--primary:focus-visible {
    background: var(--blue-gradient-hover, linear-gradient(90deg, #64EEF3 0%, #1BE4EB 48%, #11CFE0 100%));
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    outline: none;
}

.home-faq-support__btn--ghost {
    background: transparent;
    color: var(--hf-text);
    border: 1px solid rgba(27, 228, 235, 0.4);
}

.home-faq-support__btn--ghost:hover,
.home-faq-support__btn--ghost:focus-visible {
    border-color: var(--hf-cyan);
    color: var(--hf-blue-deep);
    outline: none;
}

.home-faq-support__btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(27, 228, 235, 0.25);
}

/* ---------- Accordion list ---------- */
.home-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.home-faq-item {
    border: 1px solid var(--hf-border);
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    transition:
        border-color 220ms ease,
        box-shadow 220ms ease,
        transform 220ms ease;
}

.home-faq-item:hover {
    box-shadow: 0 8px 22px rgba(35, 31, 24, 0.05);
}

.home-faq-item.is-open {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 12px 28px rgba(184, 134, 11, 0.08);
}

.home-faq-item.is-open .home-faq-item__num {
    color: #B8860B;
}

.home-faq-item__trigger {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: start;
    width: 100%;
    padding: 18px 18px 18px 20px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.home-faq-item__trigger:focus-visible {
    outline: 2px solid rgba(27, 228, 235, 0.55);
    outline-offset: -2px;
}

.home-faq-item__num {
    margin-top: 3px;
    color: var(--hf-cyan);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.home-faq-item__copy {
    min-width: 0;
}

.home-faq-item__question {
    margin: 0 0 6px;
    color: var(--hf-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.home-faq-item__category {
    display: inline-block;
    color: var(--hf-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-faq-item__icon {
    position: relative;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border-radius: 50%;
    border: 1px solid rgba(27, 228, 235, 0.35);
    color: var(--hf-cyan);
    transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.home-faq-item__icon::before,
.home-faq-item__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    border-radius: 1px;
    transition: transform 220ms var(--hf-ease), opacity 180ms ease;
}

.home-faq-item__icon::before {
    width: 12px;
    height: 1.5px;
    transform: translate(-50%, -50%);
}

.home-faq-item__icon::after {
    width: 1.5px;
    height: 12px;
    transform: translate(-50%, -50%);
}

.home-faq-item.is-open .home-faq-item__icon {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.6);
    color: #B8860B;
}

.home-faq-item.is-open .home-faq-item__icon::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

.home-faq-item__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 280ms var(--hf-ease);
}

.home-faq-item.is-open .home-faq-item__panel {
    grid-template-rows: 1fr;
}

.home-faq-item__panel-inner {
    overflow: hidden;
    min-height: 0;
}

.home-faq-item__answer {
    margin: 0;
    padding: 0 20px 20px 54px;
    color: var(--hf-muted);
    font-size: 16px;
    line-height: 1.75;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 220ms ease 40ms, transform 220ms ease 40ms;
}

.home-faq-item.is-open .home-faq-item__answer {
    opacity: 1;
    transform: translateY(0);
}

.home-faq-item__answer a {
    color: var(--hf-blue-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-faq-item__answer a:hover,
.home-faq-item__answer a:focus-visible {
    color: var(--hf-cyan);
    outline: none;
}

/* Empty state */
.home-faq-empty {
    padding: 36px 24px;
    border: 1px dashed rgba(27, 228, 235, 0.35);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    text-align: left;
}

.home-faq-empty[hidden] {
    display: none;
}

.home-faq-empty__title {
    margin: 0 0 8px;
    color: var(--hf-text);
    font-family: var(--font-primary, "Manrope", sans-serif);
    font-size: 1.4rem;
    font-weight: 600;
}

.home-faq-empty__text {
    margin: 0;
    color: var(--hf-muted);
    font-size: 16px;
    line-height: 1.65;
}

/* Reveal */
.home-faq-section [data-hf-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.5s var(--hf-ease),
        transform 0.5s var(--hf-ease);
    transition-delay: var(--hf-delay, 0ms);
}

.home-faq-section.is-visible [data-hf-reveal] {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .home-faq-section [data-hf-reveal],
    .home-faq-item__panel,
    .home-faq-item__answer,
    .home-faq-item__icon::before,
    .home-faq-item__icon::after {
        transition: none !important;
    }

    .home-faq-section [data-hf-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }

    .home-faq-item__answer {
        opacity: 1;
        transform: none;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .home-faq-section {
        padding: 40px 0 48px;
    }

    .home-faq-container {
        grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
        gap: 40px 36px;
        width: min(1240px, calc(100% - 40px));
    }

    .home-faq-intro {
        position: static;
    }

    .home-faq-title {
        max-width: none;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .home-faq-section {
        padding: 36px 0 44px;
    }

    .home-faq-container {
        display: flex;
        flex-direction: column;
        gap: 28px;
        width: calc(100% - 36px);
    }

    .home-faq-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-left: 0;
        margin-right: 0;
        padding: 2px 2px 8px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .home-faq-filters::-webkit-scrollbar {
        display: none;
    }

    .home-faq-filter {
        min-height: 40px;
        flex-shrink: 0;
    }

    .home-faq-item__trigger {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        padding: 16px;
    }

    .home-faq-item__question {
        font-size: 15px;
    }

    .home-faq-item__answer {
        padding: 0 16px 18px 16px;
    }

    .home-faq-support__actions {
        flex-direction: column;
    }

    .home-faq-support__btn {
        width: 100%;
    }
}
