/* public/css/faq.css - Complete FAQ page styling */

/* FAQ Hero Section */
.faq-hero {
    padding: 140px 0 80px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.15) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb i {
    font-size: 10px;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Enhanced FAQ Search */
.faq-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: visible;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 18px 60px 18px 60px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-button {
    position: absolute;
    right: 8px;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.search-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-primary);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(0, 212, 255, 0.05);
}

.suggestion-item strong {
    color: var(--primary-color);
}

/* Search Results Header */
.search-results-header {
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
}

.search-results-header.loading {
    border-color: var(--border-primary);
    justify-content: center;
}

.search-results-info h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: var(--font-size-lg);
}

.search-results-info h3 i {
    color: var(--primary-color);
}

.search-query {
    color: var(--primary-color);
    font-weight: 700;
}

.search-results-info p {
    color: var(--text-secondary);
    margin: 0;
    font-size: var(--font-size-sm);
}

.clear-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: var(--font-size-sm);
}

.clear-search-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.05);
}

/* Search Highlight */
.faq-item.search-highlight {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.02);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
    animation: searchResultAppear 0.5s ease;
}

.search-highlight-text {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.2));
    color: var(--primary-color);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* FAQ Categories */
.faq-categories {
    padding: var(--section-padding);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-2xl);
    padding: 30px;
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: var(--transition-slow);
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: var(--font-size-2xl);
}

.category-card h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.question-count {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* FAQ Content */
.faq-content {
    padding: var(--section-padding);
}

/* FAQ Filter */
.faq-filter {
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.05);
}

.filter-tab.active {
    background: var(--gradient-primary);
    color: white;
}

.filter-tab.search-active {
    background: var(--gradient-primary);
    color: white;
    order: -1;
}

.filter-tab i {
    font-size: var(--font-size-sm);
}

/* FAQ List */
.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.faq-question:hover {
    background: rgba(0, 212, 255, 0.02);
}

.faq-question h3 {
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 600;
    margin: 0;
    flex: 1;
    padding-right: 20px;
    line-height: 1.4;
}

.faq-question i {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-secondary);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.answer-content {
    padding: 30px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.answer-content p {
    margin-bottom: 16px;
}

.answer-content p:last-child {
    margin-bottom: 0;
}

.answer-content ul {
    margin: 16px 0;
    padding-left: 0;
}

.answer-content li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.answer-content li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #22c55e;
    font-size: var(--font-size-sm);
    margin-top: 2px;
    flex-shrink: 0;
}

.answer-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.answer-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.answer-content a:hover {
    text-decoration: underline;
}

/* Special content styles */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.pricing-item {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: var(--transition-normal);
}

.pricing-item.popular {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.05);
}

.pricing-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: var(--font-size-base);
}

.pricing-item .price {
    display: block;
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-item p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

.system-requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.req-category {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.req-category strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: var(--font-size-base);
}

.req-category ul {
    margin: 0;
}

.req-category li {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.installation-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.warning-box {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.warning-box i {
    color: #f59e0b;
    font-size: var(--font-size-lg);
    margin-top: 2px;
    flex-shrink: 0;
}

.warning-box p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Enhanced No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-results i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.search-suggestions-alt {
    margin: 20px 0;
    text-align: center;
}

.search-suggestions-alt p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: var(--font-size-sm);
}

.suggestion-chips {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.suggestion-chip {
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-lg);
    color: var(--primary-color);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.suggestion-chip:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.search-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}

/* FAQ Contact Section */
.faq-contact {
    padding: var(--section-padding);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h2 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: var(--font-size-2xl);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
} 

.stat-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-content span {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition-normal);
    cursor: pointer;
}

.contact-method:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-method.telegram {
    border-color: #0088cc;
}

.contact-method.telegram:hover {
    border-color: #0088cc;
    background: rgba(0, 136, 204, 0.05);
}

.contact-method.zalo {
    border-color: #0068ff;
}

.contact-method.zalo:hover {
    border-color: #0068ff;
    background: rgba(0, 104, 255, 0.05);
}

.contact-method.email {
    border-color: #22c55e;
    background: none;
}

.contact-method.email:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.method-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.contact-method.telegram .method-icon {
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: white;
}

.contact-method.zalo .method-icon {
    background: linear-gradient(135deg, #0068ff, #0056dd);
    color: white;
}

.contact-method.email .method-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.method-info h4 {
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: var(--font-size-base);
}

.method-info p {
    color: var(--text-secondary);
    margin: 0;
    font-size: var(--font-size-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .search-box input {
        padding: 16px 50px 16px 50px;
        font-size: var(--font-size-sm);
    }
    
    .search-box i {
        left: 16px;
        font-size: var(--font-size-base);
    }
    
    .search-button {
        width: 36px;
        height: 36px;
        right: 6px;
    }
    
    .search-results-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 16px 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        padding: 24px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-xl);
    }
    
    .filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 6px;
    }
    
    .filter-tab {
        padding: 10px 16px;
        font-size: var(--font-size-xs);
    }
    
    .faq-question {
        padding: 20px;
    }
    
    .faq-question h3 {
        font-size: var(--font-size-sm);
        padding-right: 16px;
    }
    
    .answer-content {
        padding: 20px;
    }
    
    .pricing-table {
        grid-template-columns: 1fr;
    }
    
    .system-requirements {
        grid-template-columns: 1fr;
    }
    
    .installation-steps {
        gap: 16px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-stats {
        gap: 16px;
    }
    
    .stat-item {
        padding: 16px;
    }
    
    .stat-item i {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }
    
    .contact-method {
        padding: 16px;
    }
    
    .method-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .suggestion-chips {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .faq-search {
        margin: 0 20px;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .faq-question {
        padding: 16px;
    }
    
    .answer-content {
        padding: 16px;
    }
    
    .contact-info h2 {
        font-size: var(--font-size-xl);
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .search-results-info h3 {
        font-size: var(--font-size-base);
    }
    
    .suggestion-chips {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-chip {
        min-width: 120px;
    }
}

/* Animations */
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.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; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes searchResultAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Print styles */
@media print {
    .faq-hero::before,
    .faq-categories,
    .faq-filter,
    .faq-contact,
    .search-results-header {
        display: none;
    }
    
    .faq-item {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .faq-answer {
        max-height: none !important;
    }
    
    .answer-content {
        padding: 16px 0;
    }
}