/**
 * FAQ Page Styles - Lorne & Lyle
 * Premium, elegant design with smooth fade-in animations
 */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* Root Variables */
:root {
    --faq-primary-bg: #f5f0e8;
    --faq-secondary-bg: #ffffff;
    --faq-text-primary: #2d2520;
    --faq-text-secondary: #6b5d52;
    --faq-accent-bronze: #b8936d;
    --faq-border: #d4c4b0;
    --faq-hover-bg: #faf7f2;
    --faq-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   PREVENT FLASH OF UNSTYLED CONTENT (FOUC)
   ======================================== */
.faq-page-wrapper {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

.faq-page-wrapper.loaded {
    opacity: 1;
}

/* ========================================
   OVERRIDE ASTRA THEME CONTAINERS - CRITICAL!
   ======================================== */
.faq-page-wrapper,
.faq-page-wrapper .site-content,
.faq-page-wrapper .ast-container,
.faq-page-wrapper #primary,
.faq-page-wrapper #content,
body .faq-page-wrapper,
.site .faq-page-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* ========================================
   FADE-IN ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PAGE STRUCTURE
   ======================================== */
.faq-page-wrapper {
    background-color: var(--faq-primary-bg);
    min-height: 100vh;
    padding-top: 160px;
    padding-bottom: 120px;
}

.faq-container {
    max-width: 900px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* ========================================
   HEADER
   ======================================== */
.faq-header {
    text-align: center;
    margin: 0 auto 80px auto;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.faq-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--faq-text-primary);
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.faq-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    color: var(--faq-text-secondary);
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.3px;
}

/* ========================================
   SECTIONS
   ======================================== */
.faq-section {
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    scroll-margin-top: 100px; /* Space for sticky header */
    border-radius: 8px;
    transition: background-color 0.5s ease;
}

.faq-section:nth-child(2) { animation-delay: 0.1s; }
.faq-section:nth-child(3) { animation-delay: 0.2s; }
.faq-section:nth-child(4) { animation-delay: 0.3s; }
.faq-section:nth-child(5) { animation-delay: 0.4s; }
.faq-section:nth-child(6) { animation-delay: 0.5s; }
.faq-section:nth-child(7) { animation-delay: 0.6s; }

.faq-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--faq-text-primary);
    margin: 0 0 32px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--faq-border);
    letter-spacing: 0.5px;
}

/* ========================================
   FAQ ITEMS
   ======================================== */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--faq-secondary-bg);
    border: 1px solid var(--faq-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--faq-transition);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.15s; }
.faq-item:nth-child(3) { animation-delay: 0.2s; }
.faq-item:nth-child(4) { animation-delay: 0.25s; }
.faq-item:nth-child(5) { animation-delay: 0.3s; }
.faq-item:nth-child(6) { animation-delay: 0.35s; }
.faq-item:nth-child(7) { animation-delay: 0.4s; }
.faq-item:nth-child(8) { animation-delay: 0.45s; }

.faq-item:hover {
    border-color: var(--faq-accent-bronze);
    box-shadow: 0 4px 16px rgba(184, 147, 109, 0.08);
}

.faq-item.active {
    border-color: var(--faq-accent-bronze);
    box-shadow: 0 8px 24px rgba(184, 147, 109, 0.12);
}

/* ========================================
   QUESTION BUTTON
   ======================================== */
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: var(--faq-transition);
    gap: 20px;
}

.faq-question:hover {
    background: var(--faq-hover-bg);
}

.faq-question:focus {
    outline: 2px solid var(--faq-accent-bronze);
    outline-offset: -2px;
    background: transparent;
}

.faq-question-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--faq-text-primary);
    line-height: 1.5;
    letter-spacing: 0.2px;
    flex: 1;
    text-transform: capitalize;
}

.faq-icon {
    flex-shrink: 0;
    color: var(--faq-accent-bronze);
    transition: var(--faq-transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ========================================
   ANSWER
   ======================================== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-content {
    padding: 0 28px 28px 28px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--faq-text-secondary);
    letter-spacing: 0.2px;
}

.faq-answer-content p {
    margin: 0 0 16px 0;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content a {
    color: var(--faq-accent-bronze);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.faq-answer-content a:hover {
    opacity: 0.7;
}

.faq-answer-content strong {
    font-weight: 600;
    color: var(--faq-text-primary);
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.faq-answer-content li {
    margin-bottom: 8px;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.faq-contact {
    text-align: center;
    padding: 60px 40px;
    background: var(--faq-secondary-bg);
    border: 1px solid var(--faq-border);
    border-radius: 12px;
    margin-top: 80px;
}

.faq-contact-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--faq-text-primary);
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
}

.faq-contact-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;
    color: var(--faq-text-secondary);
    margin: 0 0 32px 0;
    letter-spacing: 0.2px;
}

.faq-contact-button {
    display: inline-block;
    padding: 16px 48px;
    background: var(--faq-accent-bronze);
    color: var(--faq-primary-bg);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--faq-transition);
}

.faq-contact-button:hover {
    background: #a07d5a;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(184, 147, 109, 0.3);
}

/* ========================================
   NO RESULTS MESSAGE
   ======================================== */
.faq-no-results {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;
    color: var(--faq-text-secondary);
    padding: 60px 20px;
    margin: 40px 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media screen and (max-width: 768px) {
    .faq-page-wrapper {
        padding-top: 120px;
        padding-bottom: 80px;
    }

    .faq-title {
        font-size: 2.5rem;
    }

    .faq-subtitle {
        font-size: 1rem;
    }

    .faq-header {
        margin-bottom: 40px;
    }

    .faq-section {
        margin-bottom: 60px;
    }

    .faq-section-title {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }

    .faq-question {
        padding: 20px;
    }

    .faq-question-text {
        font-size: 1rem;
    }

    .faq-answer-content {
        padding: 0 20px 20px 20px;
        font-size: 0.9375rem;
    }

    .faq-contact {
        padding: 40px 24px;
        margin-top: 60px;
    }

    .faq-contact-title {
        font-size: 1.75rem;
    }

    .faq-contact-text {
        font-size: 1rem;
    }

    .faq-contact-button {
        padding: 14px 36px;
        font-size: 0.9375rem;
    }
}

@media screen and (max-width: 480px) {
    .faq-title {
        font-size: 2rem;
    }

    .faq-section-title {
        font-size: 1.5rem;
    }

    .faq-question {
        padding: 18px 16px;
        gap: 12px;
    }

    .faq-question-text {
        font-size: 0.9375rem;
    }

    .faq-answer-content {
        padding: 0 16px 16px 16px;
        font-size: 0.875rem;
    }

    .faq-contact {
        padding: 32px 20px;
    }

    .faq-contact-title {
        font-size: 1.5rem;
    }

    .faq-contact-button {
        padding: 12px 32px;
        font-size: 0.875rem;
        letter-spacing: 1.2px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .faq-contact {
        display: none;
    }

    .faq-item {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 20px;
    }

    .faq-answer {
        max-height: none !important;
        display: block !important;
    }
}