/* FAQ Section Styles */

.faq-section {
    background: transparent;
    position: relative;
    overflow: hidden;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(105, 5, 233, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(124, 1, 221, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(192, 112, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Section Titles */
.section-title {
    background: linear-gradient(135deg, #6905E9, #7C01DD, #C070FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(105, 5, 233, 0.3);
}

.section-subtitle {
    letter-spacing: 1px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
}

/* FAQ Controls */
.faq-controls {
    position: relative;
    z-index: 2;
}

.search-filter-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.search-box {
    margin-bottom: 1.5rem;
}

.search-box .input-group-text {
    background: rgba(105, 5, 233, 0.1);
    border: 1px solid rgba(105, 5, 233, 0.3);
    color: #6905E9;
    border-right: none;
}

.search-box .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-left: none;
}

.search-box .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(105, 5, 233, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(105, 5, 233, 0.25);
    color: var(--text-light);
}

.search-box .form-control::placeholder {
    color: var(--text-muted);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.filter-btn:hover {
    background: rgba(105, 5, 233, 0.1);
    border-color: rgba(105, 5, 233, 0.3);
    color: var(--text-light);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: rgba(105, 5, 233, 0.5);
    color: white;
    box-shadow: var(--shadow-glow);
}

/* FAQ Container */
.faq-container {
    position: relative;
    z-index: 2;
}

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

.faq-item-wrapper {
    transition: var(--transition);
}

.faq-item-wrapper.hidden {
    display: none;
}

/* FAQ Item */
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    width: 100%; /* Ensure full width */
    max-width: 100%; /* Prevent overflow */
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(105, 5, 233, 0.3);
}

.faq-item[data-featured="true"] {
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.05);
}

.faq-item[data-featured="true"]:hover {
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.2);
}

/* FAQ Question */
.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    overflow: hidden;
    min-width: 0;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.question-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    max-width: calc(100% - 3rem);
    overflow: hidden;
}

.question-text {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

:root {
    --warning-gradient: linear-gradient(135deg, #ffc107, #ff8f00);
}

.faq-item .featured-badge,
.faq-question .featured-badge,
.question-content .featured-badge {
    background: var(--warning-gradient, linear-gradient(135deg, #ffc107, #ff8f00)) !important;
    color: white !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 15px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    max-width: fit-content !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    animation: none !important;
}

.question-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .question-icon {
    transform: rotate(180deg);
    color: #6905E9;
}

/* FAQ Answer */
.faq-answer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.faq-answer.show {
    max-height: 1000px;
}

.answer-content {
    padding: 1.5rem;
}

.answer-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

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

/* Answer Footer */
.answer-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.answer-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.answer-helpful,
.answer-share {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: var(--transition);
}

.answer-helpful:hover {
    background: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.5);
    color: #198754;
}

.answer-share:hover {
    background: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.5);
    color: #0dcaf0;
}

/* Hover Effects */
.faq-hover-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.hover-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(105, 5, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition);
}

.faq-item:hover .hover-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
}

.hover-particles {
    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 100 100"><circle cx="20" cy="20" r="1" fill="%236905E9" opacity="0.3"><animate attributeName="opacity" values="0.3;0.8;0.3" dur="2s" repeatCount="indefinite"/></circle><circle cx="80" cy="30" r="1" fill="%237C01DD" opacity="0.2"><animate attributeName="opacity" values="0.2;0.6;0.2" dur="3s" repeatCount="indefinite"/></circle><circle cx="40" cy="70" r="1" fill="%23C070FF" opacity="0.4"><animate attributeName="opacity" values="0.4;0.7;0.4" dur="2.5s" repeatCount="indefinite"/></circle></svg>');
    opacity: 0;
    transition: var(--transition);
}

.faq-item:hover .hover-particles {
    opacity: 1;
}

/* No Results */
.no-results {
    position: relative;
    z-index: 2;
}

.no-results-icon {
    font-size: 3rem;
    color: var(--text-muted);
}

.no-results-title {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-results-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* FAQ Stats */
.faq-stats {
    position: relative;
    z-index: 2;
}

.stats-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    overflow: hidden;
    word-wrap: break-word;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.stat-number {
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* FAQ CTA */
.faq-cta {
    position: relative;
    z-index: 2;
}

.cta-content {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    transition: var(--transition);
}

.cta-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.cta-title {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cta-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

.cta-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.cta-buttons .btn i {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-filter-container {
        padding: 1.5rem;
    }
    
    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .question-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        min-width: 0; /* Ensure proper flex behavior on mobile */
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .answer-content {
        padding: 1rem;
    }
    
    .answer-actions {
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .cta-buttons .btn i {
        display: inline-flex;
        align-items: center;
        vertical-align: middle;
    }
}

@media (max-width: 576px) {
    .faq-section {
        padding: 2rem 0;
    }
    
    .search-filter-container {
        padding: 1rem;
    }
    
    .faq-question {
        padding: 0.75rem;
    }
    
    .answer-content {
        padding: 0.75rem;
    }
    
    .stats-card {
        padding: 1.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        min-height: 70px;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .cta-content {
        padding: 2rem 1rem;
    }
}

/* Animation Delays for Staggered Effect */
.faq-item-wrapper[data-aos="fade-up"] {
    animation-delay: calc(var(--aos-delay, 0) * 100ms);
}

/* Smooth Collapse Animation */
.collapse {
    transition: height 0.3s ease-in-out;
}

.collapsing {
    transition: height 0.3s ease-in-out;
}
