/* ===== faq.css ===== */
/* FAQ page specific styles – expandable questions, search, category filters */
/* Fixed: search button no longer causes horizontal overflow */

/* ---------- CONTROLS SECTION ---------- */
.faq-controls {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    overflow-x: hidden; /* prevent overflow */
}

.controls-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    overflow-x: hidden; /* extra safety */
}

.search-wrapper {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
    max-width: 100%; /* ensure no overflow */
}

.search-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 2rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    min-width: 0; /* allows flex shrinking */
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--gold);
}

.search-wrapper button {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    white-space: nowrap; /* keep text on one line */
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    background: var(--light-gray);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-dark);
}

.category-btn:hover {
    background: var(--gold);
    color: var(--deep-blue);
}

.category-btn.active {
    background: var(--gold);
    color: var(--deep-blue);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn-outline {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ---------- FAQ ITEMS ---------- */
.faq-list {
    background: var(--white);
}

.faq-items {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--light-gray);
    border-radius: var(--card-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-blue);
    flex: 1;
}

.toggle-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--gold);
    transition: transform 0.3s ease;
    width: 24px;
    text-align: center;
}

.faq-answer {
    max-height: 0;
    padding: 0 1.5rem;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--white);
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* enough for most answers */
    padding: 1rem 1.5rem;
    border-top-color: var(--border-light);
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

.faq-answer p {
    margin-bottom: 0;
    line-height: 1.6;
}

.faq-answer a {
    color: var(--gold);
    text-decoration: underline;
}

/* ---------- NO RESULTS ---------- */
.no-results {
    text-align: center;
    padding: 3rem;
    background: var(--light-gray);
    border-radius: var(--card-radius);
    margin-top: 2rem;
    display: none;
}

.no-results p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.no-results .btn {
    background: var(--gold);
    color: var(--deep-blue);
    border: none;
}

.no-results .btn:hover {
    background: var(--gold-hover);
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- RESPONSIVE (NO OVERFLOW) ---------- */
@media (max-width: 768px) {
    .controls-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .search-wrapper {
        width: 100%;
        flex-wrap: wrap; /* allows button to move to next line if needed */
    }
    .search-wrapper button {
        white-space: nowrap;
    }
    .category-tabs {
        justify-content: center;
    }
    .action-buttons {
        justify-content: center;
    }
    .faq-question {
        padding: 1rem;
    }
    .faq-question h3 {
        font-size: 1rem;
    }
}