/**
 * @license
 * Copyright (c) 2026 Elson Lleshi
 * All Rights Reserved.
 * SPDX-License-Identifier: UNLICENSED
 *
 * Styles for content-heavy pages: FAQ, Terms of Service, Privacy Policy.
 */

/* ── Shared container for Terms / Privacy ─────────────────────────────────── */
.terms-section {
    padding: 60px 0;
    background: var(--background-color);
    color: var(--text-color);
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px 48px;
    box-shadow: var(--box-shadow);
    line-height: 1.7;
}

.terms-container h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 28px 0 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
}

.terms-container h2:first-child {
    margin-top: 0;
    font-size: 1.9rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 12px;
}

.terms-container p {
    margin: 0 0 14px;
    color: var(--text-color);
}

.terms-container ul {
    list-style: disc;
    padding-left: 22px;
    margin: 0 0 16px;
}

.terms-container li {
    margin-bottom: 8px;
    color: var(--text-color);
}

.terms-container a {
    color: var(--primary-color);
    text-decoration: none;
}
.terms-container a:hover { text-decoration: underline; }

.terms-container strong { color: var(--light-text); }

/* Bold label used at the start of a list item (e.g. "Identity data:") */
.data-label {
    font-weight: 600;
    color: var(--light-text);
}

.terms-date {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--muted-text);
    text-align: right;
    font-style: italic;
}

/* ── FAQ page ─────────────────────────────────────────────────────────────── */
.faq-page {
    padding: 60px 0;
    background: var(--background-color);
    color: var(--text-color);
}

.faq-intro {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 36px;
}

.faq-container {
    max-width: 980px;
    margin: 0 auto;
}

/* Category nav (chips) */
.faq-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-button {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.category-button:hover {
    border-color: var(--primary-color);
    color: var(--light-text);
}

.category-button.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
}

/* Category sections */
.faq-category {
    display: none;
    margin-bottom: 32px;
}

.faq-category.active {
    display: block;
}

.category-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

/* Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(249,115,22,0.35);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    cursor: pointer;
    user-select: none;
}

.faq-question h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--light-text);
    font-weight: 600;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    margin-left: 14px;
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 22px;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
    max-height: 1500px;
    padding: 0 22px 18px;
}

.faq-answer p {
    margin: 0 0 10px;
    line-height: 1.65;
}

.faq-answer ul {
    list-style: disc;
    padding-left: 22px;
    margin: 6px 0 12px;
}

.faq-answer li { margin-bottom: 6px; }

.faq-answer strong { color: var(--light-text); }

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

/* Empty state when search returns nothing */
.faq-not-found {
    display: none;
    text-align: center;
    padding: 30px;
    color: var(--muted-text);
}

.faq-not-found.visible { display: block; }

/* Bottom buttons row */
.faq-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .terms-container { padding: 28px 22px; }
    .terms-container h2 { font-size: 1.25rem; }
    .terms-container h2:first-child { font-size: 1.55rem; }

    .faq-question { padding: 14px 16px; }
    .faq-question h4 { font-size: 0.98rem; }
    .faq-item.active .faq-answer { padding: 0 16px 14px; }
    .category-button { padding: 7px 14px; font-size: 0.9rem; }
}
