/* ================================
   FAQ PAGE STYLES
   CS2G - Counter-Strike 2 Database
   ================================ */

/* FAQ Hero Section */
.faq-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><circle cx="100" cy="100" r="20" fill="rgba(255,255,255,0.1)"/><circle cx="300" cy="200" r="15" fill="rgba(255,255,255,0.08)"/><circle cx="500" cy="80" r="25" fill="rgba(255,255,255,0.06)"/><circle cx="700" cy="300" r="30" fill="rgba(255,255,255,0.1)"/><circle cx="900" cy="150" r="18" fill="rgba(255,255,255,0.08)"/><circle cx="1100" cy="250" r="22" fill="rgba(255,255,255,0.09)"/></svg>') center/cover;
    z-index: 1;
}

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

/* Main FAQ Section */
.faq-main {
    padding: 4rem 0;
    background: var(--background-color);
}

.faq-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* FAQ Search */
.faq-search-section {
    margin-bottom: 3rem;
}

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

.faq-search-input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 4rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1.1rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(74, 105, 255, 0.15);
}

.faq-search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.25rem;
}

/* FAQ Categories */
.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.category-button {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.category-button.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.category-button i {
    margin-right: 0.5rem;
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.faq-item.active {
    border-color: var(--accent-color);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    border: none;
    background: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

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

.faq-question-text {
    flex: 1;
    line-height: 1.4;
}

.faq-icon {
    font-size: 1.25rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
    margin-left: 1rem;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 2rem 1.5rem 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-answer-content p {
    margin: 0 0 1rem 0;
}

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

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

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

.faq-answer-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

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

.faq-answer-content code {
    background: var(--background-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
}

/* FAQ Category Labels */
.faq-category-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.category-general { background: #6366f1; }
.category-trading { background: #10b981; }
.category-technical { background: #f59e0b; }
.category-skins { background: #ef4444; }
.category-cases { background: #8b5cf6; }

/* Help Section */
.help-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.help-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.help-description {
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.help-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.help-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.help-button.primary {
    background: var(--accent-color);
    color: #ffffff;
}

.help-button.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.help-button.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.help-button.secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Popular Questions */
.popular-questions {
    margin-bottom: 3rem;
}

.popular-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.popular-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popular-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.popular-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.popular-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Search Results */
.search-results {
    margin-bottom: 2rem;
}

.search-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.search-highlight {
    background: rgba(74, 105, 255, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-weight: 600;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.no-results p {
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.no-results .help-button {
    margin: 0;
}

/* Animation for FAQ Items */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: slideDown 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-container {
        padding: 0 1rem;
    }

    .faq-search-input {
        padding: 1rem 1.25rem 1rem 3rem;
        font-size: 1rem;
    }

    .faq-search-icon {
        left: 1.25rem;
        font-size: 1rem;
    }

    .faq-categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .category-button {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .faq-question {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }

    .faq-answer-content {
        padding: 0 1.5rem 1.25rem 1.5rem;
    }

    .popular-grid {
        grid-template-columns: 1fr;
    }

    .help-actions {
        flex-direction: column;
        align-items: center;
    }

    .help-button {
        min-width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .faq-main {
        padding: 2rem 0;
    }

    .help-section {
        padding: 1.5rem;
    }

    .popular-item {
        padding: 1.25rem;
    }

    .faq-question {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }

    .faq-answer-content {
        padding: 0 1.25rem 1rem 1.25rem;
        font-size: 0.9rem;
    }
}
