/**
 * Glowstone - FAQ Page
 * SEO-friendly, responsive, smooth accordion
 */

/* Scroll offset for fixed navbar */
.faq-section,
#main-content {
    scroll-margin-top: clamp(70px, 10vw, 90px);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Page header (no full-bleed photo — readable, fast) ===== */
.faq-hero {
    position: relative;
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    border-bottom: 1px solid rgba(201, 169, 98, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(4.5rem + env(safe-area-inset-top, 0px)) 0 2.75rem;
}

.faq-hero-content {
    position: relative;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 700px;
}

.faq-breadcrumb {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.faq-breadcrumb a {
    color: var(--navbar-accent);
    text-decoration: none;
}

.faq-breadcrumb a:hover {
    text-decoration: underline;
}

.faq-breadcrumb span {
    color: rgba(232, 228, 223, 0.7);
}

.faq-hero-content h1 {
    font-size: clamp(2.15rem, 4.75vw, 3.2rem);
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.faq-hero-text {
    font-size: clamp(1rem, 1.55vw, 1.1rem);
    color: rgba(232, 228, 223, 0.9);
    line-height: 1.6;
}

/* ===== FAQ Accordion ===== */
.faq-section {
    padding: 4rem 0 5rem;
}

.faq-accordion {
    max-width: 820px;
    margin: 0 auto 3rem;
}

.faq-item {
    border-bottom: 1px solid rgba(201, 169, 98, 0.2);
    transition: background 0.25s ease;
}

.faq-item:hover {
    background: rgba(235, 228, 216, 0.03);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    margin: 0;
}

.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 0;
    background: transparent;
    border: none;
    color: #e8e4df;
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.25s ease;
}

.faq-btn:hover {
    color: var(--navbar-accent);
}

.faq-btn:focus-visible {
    outline: 2px solid var(--navbar-accent);
    outline-offset: 2px;
}

.faq-btn[aria-expanded="true"] {
    color: var(--navbar-accent);
}

.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.3s ease;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    transition: transform 0.3s ease;
}

.faq-icon::before {
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.faq-icon::after {
    top: 50%;
    left: 50%;
    width: 2px;
    height: 14px;
    transform: translate(-50%, -50%);
}

.faq-btn[aria-expanded="true"] .faq-icon::after {
    opacity: 0;
}

/* Smooth collapse - Bootstrap collapse has transition */
.faq-answer {
    padding: 0 0 1.5rem 0;
}

.faq-answer p {
    font-size: 1rem;
    color: rgba(232, 228, 223, 0.9);
    line-height: 1.75;
    margin: 0 0 1rem 0;
}

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

/* ===== CTA ===== */
.faq-cta {
    text-align: center;
    padding-top: 2rem;
}

.faq-cta p {
    font-size: 1.1rem;
    color: rgba(232, 228, 223, 0.9);
    margin-bottom: 1rem;
}

.btn-faq {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--navbar-accent);
    color: #0f0f0f;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-faq:hover {
    background: #d4b872;
    color: #0f0f0f;
    transform: translateY(-2px);
}

.btn-faq:focus-visible {
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .faq-hero {
        padding: calc(4rem + env(safe-area-inset-top, 0px)) 0 2.25rem;
    }

    .faq-section {
        padding: 3rem 0 4rem;
    }

    .faq-btn {
        padding: 1.15rem 0;
        font-size: 1.05rem;
    }

    .faq-answer p {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .faq-hero-content {
        padding: 1rem;
    }

    .faq-hero-content h1 {
        font-size: 1.85rem;
    }

    .faq-accordion {
        margin-bottom: 2rem;
    }
}

@media (max-width: 400px) {
    .faq-hero-content h1 {
        font-size: 1.6rem;
    }

    .faq-btn {
        font-size: 1rem;
        padding: 1rem 0;
    }
}

@media (max-width: 360px) {
    .faq-hero {
        padding: calc(3.5rem + env(safe-area-inset-top, 0px)) 0 2rem;
    }

    .faq-hero-content h1 {
        font-size: 1.45rem;
    }

    .faq-section {
        padding: 2.5rem 0 3.5rem;
    }

    .faq-btn {
        font-size: 0.95rem;
        padding: 0.9rem 0;
    }
}

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .faq-section .container,
    .faq-hero-content {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* Touch-friendly accordion */
@media (hover: none) and (pointer: coarse) {
    .faq-btn {
        padding: 1.2rem 0;
        min-height: 48px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-btn,
    .faq-icon,
    .btn-faq {
        transition: none;
    }
}
