/* FAQ page ("Ask KPGE", /faq).
   Layout follows the approved reference; colours, type and tokens follow the
   live KPGE design system (var(--red) etc. from styles.css). */

.faq-page {
    background: #fff
}

/* Selected text highlights in the site theme red, not the browser default blue */
.faq-page ::selection {
    background: var(--red);
    color: #fff
}

.faq-page ::-moz-selection {
    background: var(--red);
    color: #fff
}

/* ---- Hero (full-bleed background image, mirrors the site's country-hero) ---- */
.faq-hero {
    position: relative;
    height: clamp(360px, 46vh, 460px);
    min-height: 340px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--soft)
}

/* object-fit:cover fills the banner while keeping the photo's aspect ratio —
   fitted, cropped as needed, never stretched/distorted. */
.faq-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center
}

.faq-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(25, 22, 23, .82) 0%, rgba(25, 22, 23, .52) 46%, rgba(25, 22, 23, .12) 80%)
}

.faq-hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff
}

.faq-hero .eyebrow {
    margin: 0 0 16px;
    color: #fff;
    font-size: .74rem;
    font-weight: 720;
    letter-spacing: .16em;
    text-transform: uppercase
}

.faq-hero h1 {
    max-width: 620px;
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(2.4rem, 4.6vw, 4rem);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -.02em;
    text-transform: none
}

.faq-hero-intro {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 1.06rem;
    line-height: 1.65
}

/* ---- Content shell ---- */
.faq-content {
    padding: 40px 0 88px
}

.searchbox {
    position: relative;
    margin: 0 0 30px
}

.searchbox input {
    width: 100%;
    padding: 16px 18px 16px 50px;
    border: 1px solid var(--line);
    background: #fff;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s
}

.searchbox input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(179, 41, 64, .12)
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: var(--copy);
    font-size: 1.3rem;
    line-height: 1
}

/* ---- Layout: sidebar + list ---- */
.faq-layout {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    gap: 34px;
    align-items: start
}

.category-nav {
    position: sticky;
    top: 98px;
    padding: 10px;
    border: 1px solid var(--line);
    background: #fff
}

.nav-label {
    margin: 0;
    padding: 10px 12px 8px;
    color: var(--copy);
    font-size: .64rem;
    font-weight: 720;
    letter-spacing: .15em;
    text-transform: uppercase
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: .84rem;
    text-align: left;
    cursor: pointer;
    transition: background .2s, color .2s
}

.category-btn:hover {
    background: var(--soft)
}

.category-btn.active {
    background: var(--red);
    color: #fff;
    font-weight: 650
}

.category-btn .count {
    font-size: .78rem;
    opacity: .72
}

/* ---- Section headings ---- */
.section-head {
    margin: 0 0 18px
}

.section-head h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 430;
    line-height: 1.15;
    letter-spacing: -.02em
}

.section-head p {
    margin: 0;
    color: var(--copy);
    font-size: 1rem
}

.faq-category+.faq-category {
    margin-top: 42px
}

/* ---- Accordion items ---- */
.faq-list {
    display: grid;
    gap: 10px
}

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

.faq-item:hover {
    border-color: #c9c4c2
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    list-style: none;
    color: var(--ink);
    font-weight: 620;
    font-size: .95rem;
    line-height: 1.5;
    cursor: pointer
}

.faq-question::-webkit-details-marker {
    display: none
}

.faq-question:hover {
    background: var(--soft)
}

.faq-question .plus {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    background: var(--soft);
    color: var(--red);
    font-size: 1.25rem;
    line-height: 1;
    transition: transform .2s, background .2s
}

.faq-item[open] .faq-question {
    color: var(--red);
    background: var(--soft)
}

.faq-item[open] .plus {
    transform: rotate(45deg);
    background: #ece7e6
}

.answer {
    padding: 0 20px 20px;
    color: var(--copy);
    font-size: .95rem;
    line-height: 1.75
}

.answer p {
    margin: 0 0 12px
}

.answer p:last-child {
    margin-bottom: 0
}

/* ---- Empty / note ---- */
.empty {
    padding: 28px;
    border: 1px dashed var(--line);
    color: var(--copy);
    text-align: center
}

.note {
    margin-top: 16px;
    color: var(--copy);
    font-size: .8rem
}

/* ---- Contact CTA ---- */
.faq-content .contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 52px;
    padding: 34px;
    border: 1px solid var(--line);
    background: var(--soft)
}

.faq-content .contact h2 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 1.5rem;
    font-weight: 500
}

.faq-content .contact p {
    margin: 0;
    max-width: 560px;
    color: var(--copy)
}

.faq-content .contact .contact-link {
    white-space: nowrap
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
    .faq-layout {
        grid-template-columns: 1fr;
        gap: 24px
    }

    .category-nav {
        position: static;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 8px;
        -webkit-overflow-scrolling: touch
    }

    .nav-label {
        display: none
    }

    .category-btn {
        flex: 0 0 auto;
        width: auto;
        white-space: nowrap;
        padding: 10px 14px
    }

    .category-btn .count {
        display: none
    }
}

@media (max-width: 680px) {
    .faq-hero {
        height: 440px;
        min-height: 440px
    }

    .faq-hero-shade {
        background: linear-gradient(180deg, rgba(25, 22, 23, .25) 12%, rgba(25, 22, 23, .86) 100%)
    }

    .faq-hero-content {
        justify-content: flex-end;
        padding-bottom: 48px
    }

    .faq-content {
        padding: 32px 0 64px
    }

    .faq-content .contact {
        flex-direction: column;
        align-items: flex-start
    }

    .faq-content .contact .contact-link {
        white-space: normal
    }

    .faq-question {
        padding: 16px
    }

    .answer {
        padding: 0 16px 17px
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-question,
    .plus,
    .category-btn,
    .searchbox input {
        transition: none
    }
}
