/* ==========================================================================
   Section: FAQ Group List (2-Column Categorized FAQ + Live Search)
   Path: template-parts/sections/faq-group-list/style.css
   ========================================================================== */

.faq-group-list {
    position: relative;
    overflow-x: clip;
    width: 100%;
    padding: 100px 0 60px;
    background-color: var(--color-primary, #FFFFFF);
    color: var(--text-primary, #333333);
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    box-sizing: border-box;
}

.faq-group-list__container {
    max-width: 1250px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* 1. Header & Section Title */
.faq-group-list__header {
    text-align: center;
    margin-bottom: 30px;
}

.faq-group-list__title {
    font-family: var(--font-heading, 'Cormorant SC', serif);
    font-size: var(--fs-h2, 55px);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-title, #456967);
    margin: 0;
    text-transform: uppercase;
}

/* 2. Search Bar */
.faq-group-list__search {
    max-width: 820px;
    margin: 0 auto 60px;
}

.faq-group-list__search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #EDEDED;
    border-radius: 8px;
    padding: 6px 18px;
    transition: var(--transition-base, all 0.3s ease);
}

.faq-group-list__search-box:focus-within {
    background-color: #E8EEEE;
    box-shadow: 0 0 0 2px rgba(69, 105, 103, 0.25);
}

.faq-group-list__search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-second, #456967);
    margin-right: 12px;
    flex-shrink: 0;
}

.faq-group-list__search-input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary, #333333);
    padding: 8px 0;
    outline: none;
}

.faq-group-list__search-input::placeholder {
    color: #718096;
    font-size: 14.5px;
}

.faq-group-list__search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #718096;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base, all 0.3s ease);
}

.faq-group-list__search-clear:hover {
    color: var(--text-primary, #333333);
}

/* 3. Groups & 2-Column Structure */
.faq-group-list__groups {
    display: flex;
    flex-direction: column;
}

.faq-group-list__group {
    position: relative;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 48px;
    padding: 48px 0;
}

/* Đường line phân cách toàn màn hình */
.faq-group-list__group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background-color: #ECECEC;
    pointer-events: none;
}

.faq-group-list__group:first-child {
    padding-top: 10px;
}

/* Ở group / câu hỏi cuối cùng không hiển thị đường line */
.faq-group-list__group:last-child::after,
.faq-group-list__group:last-of-type::after {
    display: none !important;
}

/* Group Sidebar (Left Column) */
.faq-group-list__sidebar {
    padding-top: 2px;
}

.faq-group-list__group-title {
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text-title, #456967);
    margin: 0;
}

/* Group Content (Right Column Accordions) */
.faq-group-list__content {
    min-width: 0;
}

.faq-group-list__items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* FAQ Item */
.faq-group-list__item {
    padding-bottom: 6px;
}

.faq-group-list__trigger {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    background: none;
    border: none;
    padding: 2px 0 8px;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    transition: var(--transition-base, all 0.3s ease);
}

.faq-group-list__trigger:hover .faq-group-list__question {
    color: var(--color-primary-third, #74A59F);
}

.faq-group-list__question {
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    font-size: 19px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--text-title, #456967);
    transition: var(--transition-base, all 0.3s ease);
    margin: 0;
}

.faq-group-list__icon {
    font-size: 22px;
    line-height: 1;
    font-weight: 400;
    color: var(--color-primary-second, #456967);
    user-select: none;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition-base, all 0.3s ease);
}

/* Panel & Answer Content */
.faq-group-list__panel {
    overflow: hidden;
}

.faq-group-list__body {
    padding-top: 6px;
    padding-bottom: 10px;
}

.faq-group-list__answer {
    font-family: var(--font-body, 'Nunito Sans', sans-serif);
    font-size: var(--fs-body-m, 18px);
    line-height: var(--lh-body-m, 1.65);
    color: var(--text-primary, #333333);
    margin: 0;
}

.faq-group-list__answer p {
    margin: 0 0 12px;
}

.faq-group-list__answer p:last-child {
    margin-bottom: 0;
}

/* No Results Notice */
.faq-group-list__no-results {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    font-size: 16px;
}

/* ==========================================================================
   TABLET RESPONSIVE (< 992px) - Đồng bộ theo content-image-block
   ========================================================================== */
@media (max-width: 992px) {
    .faq-group-list {
        padding: 60px 0 45px;
    }

    .faq-group-list__title {
        font-size: 38px;
        margin-bottom: 18px;
    }

    .faq-group-list__search {
        margin-bottom: 40px;
    }

    .faq-group-list__group {
        grid-template-columns: 240px 1fr;
        gap: 32px;
        padding: 36px 0;
    }

    .faq-group-list__group-title {
        font-size: 22px;
    }

    .faq-group-list__question {
        font-size: 18px;
        line-height: 1.4;
    }

    .faq-group-list__answer {
        font-size: 16px;
        line-height: 1.6;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVE (< 768px) - Đồng bộ theo content-image-block
   ========================================================================== */
@media (max-width: 767px) {
    .faq-group-list {
        padding: 45px 0 35px;
    }

    .faq-group-list__container {
        padding: 0 16px;
    }

    .faq-group-list__header {
        margin-bottom: 20px;
    }

    .faq-group-list__title {
        font-size: 30px;
        line-height: 1.25;
        letter-spacing: 0.05em;
    }

    .faq-group-list__search {
        margin-bottom: 30px;
    }

    .faq-group-list__group {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 28px 0;
    }

    .faq-group-list__group-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .faq-group-list__question {
        font-size: 16.5px;
        line-height: 1.4;
    }

    .faq-group-list__answer {
        font-size: 15px;
        line-height: 1.55;
    }
}