/**
 * FAQ - Specific CSS
 * Nordersun v6.2
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0071dc;
    --secondary-color: #ffc220;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --modal-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --modal-accent: #667eea;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Animated Background Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 30px;
    animation: fadeIn 1s ease 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    animation: fadeIn 1s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    animation: fadeIn 1s ease 0.8s both;
}

.category-tab {
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid transparent;
    background: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.category-tab i {
    font-size: 18px;
}

.category-tab:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-tab.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 113, 220, 0.3);
}

.category-tab[data-category="getting-started"] {
    --tab-color: #667eea;
}

.category-tab[data-category="technical"] {
    --tab-color: #4facfe;
}

.category-tab[data-category="coverage"] {
    --tab-color: #43e97b;
}

.category-tab[data-category="management"] {
    --tab-color: #fa709a;
}

.category-tab:not(.active) {
    color: var(--tab-color);
}

.category-tab.active[data-category="getting-started"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.category-tab.active[data-category="technical"] {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-color: #4facfe;
}

.category-tab.active[data-category="coverage"] {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    border-color: #43e97b;
}

.category-tab.active[data-category="management"] {
    background: linear-gradient(135deg, #fa709a, #fee140);
    border-color: #fa709a;
}

/* FAQ Grid */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

/* FAQ Card Premium */
.faq-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: none;
}

.faq-card.visible {
    display: block;
    animation: slideUp 0.5s ease both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-gradient, linear-gradient(135deg, #667eea, #764ba2));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.faq-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.faq-card:hover::before {
    transform: scaleX(1);
}

.faq-card:active {
    transform: translateY(-4px) scale(0.98);
}

/* Card Header */
.faq-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.faq-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--card-gradient, linear-gradient(135deg, #667eea, #764ba2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
}

.faq-card:hover .faq-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-lg);
}

.faq-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    background: var(--card-gradient, linear-gradient(135deg, #667eea, #764ba2));
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
}

.faq-card-content {
    flex: 1;
}

.faq-card-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.faq-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-category {
    background: var(--card-gradient, linear-gradient(135deg, #667eea, #764ba2));
    color: white;
}

.badge-popular {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #56ab2f, #a8e063);
    color: white;
}

.faq-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.faq-card-preview {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.faq-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.faq-read-time {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.faq-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.faq-card:hover .faq-arrow {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

/* Modal Premium */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(50px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Progress Bar */
.modal-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--modal-gradient, linear-gradient(135deg, #667eea, #764ba2));
    width: 0%;
    transition: width 0.1s ease;
    z-index: 10;
}

/* Modal Header */
.modal-header {
    padding: 40px 40px 30px;
    background: var(--modal-gradient, linear-gradient(135deg, #667eea, #764ba2));
    color: white;
    position: relative;
    overflow: visible;
    min-height: 180px;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

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

.modal-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 14px;
    opacity: 0.9;
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Modal Body */
.modal-body {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.modal-answer {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

.modal-answer strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* Steps */
.modal-steps {
    margin: 30px 0;
}

.modal-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--modal-accent, #667eea);
    position: relative;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--modal-gradient, linear-gradient(135deg, #667eea, #764ba2));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.step-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* CTA Button */
.modal-cta {
    margin-top: 30px;
    text-align: center;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--modal-gradient, linear-gradient(135deg, #667eea, #764ba2));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Related Questions */
.related-questions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.related-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.related-items {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.related-item {
    flex: 0 0 250px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.related-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.related-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.related-item-preview {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

/* Feedback */
.modal-feedback {
    margin-top: 30px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
    text-align: center;
}

.feedback-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.feedback-btn {
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feedback-btn:hover {
    transform: scale(1.2);
    border-color: var(--primary-color);
}

.feedback-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Jump to Top */
.jump-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 2px solid var(--primary-color);
}

.jump-top.visible {
    display: flex;
}

.jump-top:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-4px);
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    position: absolute;
    animation: confetti-fall 3s linear forwards;
    pointer-events: none;
    z-index: 10000;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Footer */
.footer {
    background-color: white;
    border-top: 1px solid #e0e0e0;
    padding: 40px 30px;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #0071dc;
}

.footer-text {
    color: #999;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 24px;
    }

    .search-input {
        padding: 16px 50px 16px 20px;
        font-size: 15px;
    }

    .category-tabs {
        gap: 8px;
    }

    .category-tab {
        padding: 10px 20px;
        font-size: 14px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .faq-card {
        padding: 20px;
    }

    .faq-icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .faq-card-title {
        font-size: 16px;
    }

    .faq-card-preview {
        font-size: 13px;
    }

    /* Mobile Modal */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }

    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }

    .modal-header {
        padding: 30px 20px 25px;
        min-height: 160px;
    }

    .modal-icon-large {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 15px;
    }

    .modal-title {
        font-size: 20px;
        line-height: 1.4;
        word-wrap: break-word;
    }

    .modal-body {
        padding: 24px;
    }

    .modal-answer {
        font-size: 16px;
    }

    .jump-top {
        bottom: 20px;
        right: 20px;
        width: 46px;
        height: 46px;
    }

    .related-items {
        flex-direction: column;
    }

    .related-item {
        flex: 1;
    }
}

/* Print Styles */
@media print {
    .header, .search-container, .category-tabs, .jump-top, .footer {
        display: none;
    }

    .faq-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
