/* =====================================================================
   FAQ Page Specific Styles
   ===================================================================== */

/* Hero Section */
.faq-hero {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl) 0;
    margin-bottom: var(--space-2xl);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('{{ image_url("/images/faq-hero.jpg") }}') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.faq-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, #ffffff 0%, var(--gold-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-icon {
    font-size: 8rem;
    color: var(--gold-accent);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Search Section */
.faq-search-section {
    margin-top: -60px;
    position: relative;
    z-index: 10;
    margin-bottom: var(--space-2xl);
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.search-input {
    border: none;
    background: transparent;
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--text-lg);
    color: var(--text-dark);
    width: 100%;
    outline: none;
}

.search-input::placeholder {
    color: #666;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-gold);
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md);
}

.search-btn:hover {
    background: linear-gradient(135deg, #f2c94c 0%, #d4af37 100%);
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.search-results-count {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Category Filter */
.category-filter-section {
    margin-bottom: var(--space-2xl);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.category-filter {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-transform: capitalize;
    position: relative;
    overflow: hidden;
}

.category-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.category-filter:hover::before,
.category-filter.active::before {
    left: 0;
}

.category-filter:hover,
.category-filter.active {
    color: var(--primary-color);
    border-color: var(--gold-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Sidebar */
.faq-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sidebar-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-smooth);
}

.sidebar-container:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-lg);
}

.sidebar-title {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--gold-accent);
}

.sidebar-title i {
    color: var(--gold-accent);
}

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

.toc-category {
    font-weight: 700;
    color: var(--gold-accent);
    margin: var(--space-lg) 0 var(--space-md) 0;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc-category:first-child {
    margin-top: 0;
}

.toc-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    transition: all var(--transition-smooth);
    font-size: var(--text-sm);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
    position: relative;
    overflow: hidden;
}

.toc-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-gold);
    opacity: 0.1;
    transition: left 0.3s ease;
    z-index: -1;
}

.toc-link:hover::before,
.toc-link.active::before {
    left: 0;
}

.toc-link:hover,
.toc-link.active {
    color: var(--text-primary);
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(var(--space-sm));
    border-left: 3px solid var(--gold-accent);
}

/* FAQ Articles */
.faq-content-section {
    padding: var(--space-lg) 0;
}

.faq-article {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.faq-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.faq-article:hover::before {
    left: 100%;
}

.faq-article:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.faq-article-title {
    color: var(--text-primary);
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.faq-article-title i {
    color: var(--gold-accent);
    font-size: var(--text-xl);
    margin-top: 2px;
    min-width: 24px;
}

.faq-article-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--text-base);
    position: relative;
    z-index: 2;
}

.faq-article-content p {
    margin-bottom: var(--space-md);
}

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

.faq-article-content ul,
.faq-article-content ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
}

.faq-article-content li {
    margin-bottom: var(--space-sm);
}

.faq-article-content a {
    color: var(--gold-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base);
}

.faq-article-content a:hover {
    border-bottom-color: var(--gold-accent);
}

.faq-article-footer {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    position: relative;
    z-index: 2;
}

.faq-category-badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-accent);
    border: 1px solid var(--gold-accent);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.faq-actions {
    display: flex;
    gap: var(--space-sm);
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.action-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.action-btn.helpful-active {
    background: var(--gradient-gold);
    color: var(--primary-color);
    border-color: var(--gold-accent);
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-xl);
}

.no-results-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.no-results-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.no-results-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Related Articles */
.related-articles-section {
    padding: var(--space-3xl) 0;
    background: rgba(255, 255, 255, 0.02);
}

.related-article-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transition: all var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.related-article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
}

.related-article-card:hover::before {
    left: 100%;
}

.related-article-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.related-article-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: var(--text-3xl);
    color: var(--primary-color);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-gold);
}

.related-article-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    opacity: 0.3;
    z-index: -1;
    animation: pulse 4s infinite;
}

.related-article-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.related-article-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.related-article-btn {
    background: transparent;
    color: var(--gold-accent);
    border: 2px solid var(--gold-accent);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-smooth);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.related-article-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.related-article-btn:hover::before {
    left: 0;
}

.related-article-btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* CTA Section */
.faq-cta-section {
    background: var(--gradient-primary);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.faq-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.cta-text {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--gradient-gold);
    color: var(--primary-color);
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 700;
    font-size: var(--text-lg);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
    color: var(--primary-color);
}

.cta-btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--gold-accent);
}

.cta-btn-outline:hover {
    background: var(--gradient-gold);
    color: var(--primary-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-smooth);
    font-size: var(--text-xl);
}

.social-link:hover {
    background: var(--gradient-gold);
    border-color: var(--gold-accent);
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Mobile Optimizations */
@media (max-width: 767.98px) {
    .faq-hero {
        padding: var(--space-2xl) 0;
        min-height: 50vh;
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .hero-icon {
        font-size: 6rem;
    }
    
    .faq-search-section {
        margin-top: -40px;
    }
    
    .search-wrapper {
        margin: 0 var(--space-md);
    }
    
    .search-input {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-base);
    }
    
    .search-btn {
        padding: var(--space-sm) var(--space-md);
    }
    
    .category-filters {
        padding: 0 var(--space-md);
    }
    
    .faq-sidebar {
        position: static;
        margin-bottom: var(--space-xl);
    }
    
    .sidebar-container {
        padding: var(--space-lg);
    }
    
    .faq-article {
        padding: var(--space-lg);
    }
    
    .faq-article-title {
        font-size: var(--text-xl);
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .faq-article-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .social-links {
        gap: var(--space-md);
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .category-filter {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-md);
    }
    
    .related-article-card {
        padding: var(--space-lg);
    }
    
    .related-article-icon {
        width: 60px;
        height: 60px;
        font-size: var(--text-2xl);
    }
}

/* Accessibility and Performance */
@media (prefers-reduced-motion: reduce) {
    .faq-article,
    .related-article-card,
    .hero-icon,
    .cta-btn {
        transition: none;
        animation: none;
    }
}

.faq-article:focus-within,
.related-article-card:focus-within {
    outline: 2px solid var(--gold-accent);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .faq-hero,
    .faq-search-section,
    .category-filter-section,
    .faq-sidebar,
    .faq-cta-section {
        display: none;
    }
    
    .faq-article {
        border: 1px solid #000;
        background: white;
        color: black;
        break-inside: avoid;
        margin-bottom: var(--space-md);
    }
    
    .faq-article-title {
        color: #000;
    }
}