/* FAQ Page Specific Styles - Apple AI Theme */

/* Import CSS Variables from main style.css */
:root {
    --primary-navy: #1a1d29;
    --secondary-navy: #252936;
    --light-navy: #2f3349;
    --accent-navy: #3a3f5c;
    --text-primary: #ffffff;
    --text-secondary: #b8bcc8;
    --text-muted: #6b7280;
    --accent-blue: #007aff;
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    --gradient-accent: linear-gradient(135deg, var(--accent-blue), #0056d3);
    --blur-bg: rgba(26, 29, 41, 0.8);
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* Body styling for FAQ page */
body {
    background: var(--gradient-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header modifications for FAQ page */
.header {
    position: relative;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.header .logo {
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.header .logo h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.header .logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.back-to-ai {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-accent);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-light);
    z-index: 1000;
}

.back-to-ai:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    color: white;
}

/* Search Section */
.search-section {
    background: var(--blur-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-heavy);
}

.search-form {
    width: 100%;
}

.search-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    gap: 12px;
    position: relative;
}

.search-input {
    flex: 1;
    background: var(--secondary-navy);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    background: var(--light-navy);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--gradient-accent);
    border: none;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow-light);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.filter-wrapper {
    min-width: 200px;
}

.category-filter {
    width: 100%;
    background: var(--secondary-navy);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.category-filter:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.category-filter option {
    background: var(--secondary-navy);
    color: var(--text-primary);
}

/* FAQ Modal System */
.faq-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 29, 41, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

.faq-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-modal-content {
    background: var(--secondary-navy);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-heavy);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.faq-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.faq-modal-title {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    margin-right: 20px;
}

.faq-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-modal-close:hover {
    background: var(--light-navy);
    color: var(--text-primary);
}

.faq-modal-body {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
}

.faq-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: var(--shadow-light);
}

.faq-modal-body video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: var(--shadow-light);
}

.faq-modal-body p {
    margin-bottom: 15px;
}

.faq-modal-body h1,
.faq-modal-body h2,
.faq-modal-body h3,
.faq-modal-body h4,
.faq-modal-body h5,
.faq-modal-body h6 {
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 15px;
}

.faq-modal-body ul,
.faq-modal-body ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.faq-modal-body li {
    margin-bottom: 8px;
}

.faq-modal-body code {
    background: var(--light-navy);
    color: var(--accent-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.faq-modal-body pre {
    background: var(--light-navy);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

.faq-modal-body pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 122, 255, 0.15);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.remove-filter {
    color: var(--accent-blue);
    text-decoration: none;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.remove-filter:hover {
    opacity: 1;
    color: var(--danger);
}

.clear-all-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.clear-all-filters:hover {
    background: rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

/* Results Section */
.results-section {
    animation: fadeInUp 0.6s ease-out;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.results-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.page-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* FAQ Items */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.faq-item {
    background: var(--blur-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: slideInLeft 0.5s ease-out;
}

.faq-item:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
    background: rgba(26, 29, 41, 0.9);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.faq-question h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 122, 255, 0.15);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.faq-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat i {
    font-size: 0.8rem;
}

.stat:first-child i {
    color: var(--accent-blue);
}

.stat:nth-child(2) i {
    color: var(--success);
}

.stat:nth-child(3) i {
    color: var(--danger);
}

/* Container and Language Selector */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-selector select {
    background: var(--secondary-navy);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.language-selector select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.language-selector option {
    background: var(--secondary-navy);
    color: var(--text-primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px 20px;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-light);
    margin-top: 40px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.no-results p {
    margin-bottom: 25px;
    font-size: 1rem;
    color: var(--text-muted);
}

.clear-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-accent);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: rgba(40, 40, 40, 0.8);
    border-color: #6c5ce7;
    color: #e0e0e0;
    transform: translateY(-1px);
}

.pagination-numbers {
    display: flex;
    gap: 5px;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #444;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background: rgba(40, 40, 40, 0.8);
    border-color: #6c5ce7;
    color: #e0e0e0;
}

.pagination-number.active {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-color: #6c5ce7;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .search-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .filter-wrapper {
        width: 100%;
        min-width: auto;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .results-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .faq-question {
        flex-direction: column;
        gap: 10px;
    }
    
    .category-badge {
        align-self: flex-start;
    }
    
    .faq-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 20px;
    }
    
    .faq-item {
        padding: 20px;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
    }
    
    .faq-answer {
        font-size: 0.95rem;
    }
    
    .active-filters {
        justify-content: center;
    }
    
    .filter-tag,
    .clear-all-filters {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Animation delays for staggered effect */
.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(n+6) { animation-delay: 0.6s; }

/* Loading state for search */
.search-form.loading .search-btn {
    opacity: 0.7;
    pointer-events: none;
}

.search-form.loading .search-btn i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}