/* ==========================================================================
   FAQ Page Styles - AEO Optimized
   
   Comprehensive FAQ styling with:
   - Sticky table of contents
   - Accessible accordions using native HTML
   - Category-based organization
   - Mobile-responsive design
   ========================================================================== */

/* ==========================================================================
   Page Layout
   ========================================================================== */

.faq-page {
    background-color: #f8fafc;
    min-height: 100vh;
}

.faq-content {
    padding-top: 100px;
    padding-bottom: 80px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.faq-hero {
    text-align: center;
    padding: 40px 0 50px;
    margin-bottom: 40px;
}

.faq-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.faq-hero-intro {
    font-size: 1.125rem;
    color: var(--text-secondary, #6b7280);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Search Bar */
.faq-search-container {
    max-width: 600px;
    margin: 0 auto;
}

.faq-search {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.faq-search:focus-within {
    border-color: var(--ion-violet, #6B5BFF);
    box-shadow: 0 0 0 4px rgba(107, 91, 255, 0.1);
}

.faq-search i {
    color: var(--text-muted, #9ca3af);
    font-size: 1.125rem;
    margin-right: 0.75rem;
}

.faq-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary, #1a1a1a);
    outline: none;
}

.faq-search input::placeholder {
    color: var(--text-muted, #9ca3af);
}

/* ==========================================================================
   Table of Contents (Sticky Sidebar)
   ========================================================================== */

.faq-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

.faq-toc {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-toc-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.faq-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-toc-list li {
    margin-bottom: 0.25rem;
}

.faq-toc-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary, #6b7280);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.faq-toc-list a:hover,
.faq-toc-list a.active {
    background: rgba(107, 91, 255, 0.08);
    color: var(--ion-violet, #6B5BFF);
}

.faq-toc-list a i {
    font-size: 0.875rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.faq-toc-count {
    margin-left: auto;
    background: #f3f4f6;
    color: var(--text-muted, #9ca3af);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
}

/* ==========================================================================
   FAQ Categories & Items
   ========================================================================== */

.faq-main {
    max-width: 800px;
}

.faq-category {
    margin-bottom: 3rem;
    scroll-margin-top: 120px;
}

.faq-category-header {
    margin-bottom: 1.5rem;
}

.faq-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-category-title i {
    color: var(--ion-violet, #6B5BFF);
    font-size: 1.25rem;
}

.faq-category-summary {
    font-size: 0.9375rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.6;
    margin: 0;
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individual FAQ Item */
.faq-item {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-item[open] {
    border-color: rgba(107, 91, 255, 0.2);
    box-shadow: 0 4px 16px rgba(107, 91, 255, 0.08);
}

/* Question (Summary) */
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.4;
    transition: all 0.2s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::marker {
    display: none;
}

.faq-question:hover {
    color: var(--ion-violet, #6B5BFF);
}

.faq-question-text {
    flex: 1;
    padding-right: 1rem;
}

.faq-toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    color: var(--text-muted, #9ca3af);
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.faq-item[open] .faq-toggle-icon {
    background: var(--ion-violet, #6B5BFF);
    color: white;
    transform: rotate(45deg);
}

/* Answer Content */
.faq-answer {
    padding: 0 1.5rem 1.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Short Answer (Snippet-friendly) */
.faq-short-answer {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    background: linear-gradient(135deg, rgba(107, 91, 255, 0.06) 0%, rgba(0, 215, 200, 0.06) 100%);
    border-left: 3px solid var(--ion-violet, #6B5BFF);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 0 8px 8px 0;
    line-height: 1.6;
}

/* Expanded Answer */
.faq-expanded-answer {
    font-size: 0.9375rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.7;
}

.faq-expanded-answer p {
    margin-bottom: 1rem;
}

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

.faq-expanded-answer ul,
.faq-expanded-answer ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-expanded-answer li {
    margin-bottom: 0.5rem;
}

.faq-expanded-answer strong {
    color: var(--text-primary, #1a1a1a);
    font-weight: 600;
}

/* Internal Links in Answers */
.faq-link {
    color: var(--ion-violet, #6B5BFF);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.faq-link:hover {
    color: var(--ion-violet-hover, #5a4ad9);
    text-decoration: underline;
}

/* Copy Link Button */
.faq-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-copy-link:hover {
    background: #e5e7eb;
    color: var(--text-secondary, #6b7280);
}

.faq-copy-link.copied {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* ==========================================================================
   Alternate Question Phrasings (Accordion)
   ========================================================================== */

.faq-variants {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.faq-variants-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.faq-variants-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.faq-variants-list li {
    background: #f3f4f6;
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
}

/* ==========================================================================
   People Also Ask Section
   ========================================================================== */

.faq-paa {
    margin-top: 2rem;
    padding: 1.25rem;
    background: #fafafa;
    border-radius: 10px;
    border: 1px dashed #e5e7eb;
}

.faq-paa-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-paa-title i {
    color: var(--secondary-color, #00D7C8);
}

.faq-paa-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-paa-list li {
    margin-bottom: 0.375rem;
}

.faq-paa-list a {
    color: var(--ion-violet, #6B5BFF);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

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

/* ==========================================================================
   Bottom CTA Section
   ========================================================================== */

.faq-cta {
    margin-top: 4rem;
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    border-radius: 20px;
    color: white;
}

.faq-cta h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.faq-cta p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
}

.faq-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: var(--primary-color, #FF3D5A);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-cta-primary:hover {
    background: var(--primary-hover, #E6355C);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 61, 90, 0.3);
    color: white;
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .faq-layout {
        grid-template-columns: 240px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .faq-layout {
        grid-template-columns: 1fr;
    }
    
    .faq-toc {
        position: static;
        margin-bottom: 2rem;
    }
    
    .faq-toc-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .faq-main {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .faq-hero h1 {
        font-size: 2rem;
    }
    
    .faq-hero-intro {
        font-size: 1rem;
    }
    
    .faq-category-title {
        font-size: 1.25rem;
    }
    
    .faq-question {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }
    
    .faq-cta {
        padding: 2rem 1.5rem;
    }
    
    .faq-cta h3 {
        font-size: 1.5rem;
    }
    
    .faq-cta-buttons {
        flex-direction: column;
    }
    
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .faq-content {
        padding-top: 80px;
        padding-bottom: 60px;
    }
    
    .faq-hero {
        padding: 30px 0 40px;
    }
    
    .faq-hero h1 {
        font-size: 1.75rem;
    }
    
    .faq-toc-list {
        grid-template-columns: 1fr;
    }
    
    .faq-short-answer {
        padding: 0.875rem 1rem;
    }
    
    .faq-variants-list {
        flex-direction: column;
    }
}

/* ==========================================================================
   Search Highlight
   ========================================================================== */

.faq-item.highlight {
    border-color: var(--ion-violet, #6B5BFF);
    box-shadow: 0 0 0 4px rgba(107, 91, 255, 0.1);
}

.faq-highlight-text {
    background: linear-gradient(135deg, rgba(107, 91, 255, 0.2) 0%, rgba(0, 215, 200, 0.2) 100%);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .faq-answer {
        animation: none;
    }
    
    .faq-toggle-icon,
    .faq-item,
    .btn-cta-primary,
    .btn-cta-secondary {
        transition: none;
    }
}

