/* FAQ Section Styles */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-margin-top: 100px;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.faq-item.active {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px -2px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.01em;
}

.faq-question:hover {
    color: rgba(255, 255, 255, 0.9);
}

.faq-question span {
    flex: 1;
    padding-right: 28px;
    line-height: 1.5;
}

.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.9);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
}

.faq-answer p {
    padding: 0 32px 32px 32px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* FAQ Answer Lists */
.faq-answer ul {
    padding: 0 32px 16px 52px;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.faq-answer ul li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.faq-answer ul li:last-child {
    margin-bottom: 0;
}

/* FAQ Answer Links */
.faq-answer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2px 6px;
    margin: 0 -2px;
    border-radius: 4px;
    display: inline-block;
}

.faq-answer a:hover {
    color: #93c5fd;
    background: rgba(96, 165, 250, 0.1);
}

.faq-answer a:focus {
    outline: 2px solid rgba(96, 165, 250, 0.5);
    outline-offset: 2px;
}

.faq-answer a:active {
    transform: translateY(1px);
}

/* Link with icon effect */
.faq-answer a::after {
    content: '?';
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(-4px);
}

.faq-answer a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Separator for multiple links */
.faq-answer p a + a::before {
    content: '|';
    display: inline-block;
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

/* Center alignment helper */
.text-center {
    text-align: center;
}

/* FAQ Section spacing */
#faq {
    padding-top: 80px;
    padding-bottom: 80px;
    background: #040b1d;
}

#faq .section-title {
    margin-bottom: 48px;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Boxicons integration for enhanced visual appeal */
.faq-item::before {
    content: '\ea5f'; /* Boxicon: bx-help-circle */
    font-family: 'boxicons' !important;
    position: absolute;
    left: 32px;
    top: 28px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.faq-item {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active::before {
    opacity: 0.08;
}

/* Subtle pattern for active state */
.faq-item.active .faq-answer {
    position: relative;
}

.faq-item.active .faq-answer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
}

/* Enhanced focus states for accessibility */
.faq-question:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: -2px;
    border-radius: 12px;
}

.faq-question:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.faq-question:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth scrolling when FAQ opens */
.faq-item.active {
    scroll-margin-top: 100px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-container {
        padding: 10px 16px;
    }

    .faq-question {
        font-size: 16px;
        padding: 24px 24px;
    }

    .faq-question span {
        padding-right: 20px;
    }

    .faq-answer p {
        font-size: 14px;
        padding: 0 24px 28px 24px;
        line-height: 1.65;
    }

    .faq-answer ul {
        padding: 0 24px 16px 44px;
        font-size: 14px;
    }

    .faq-answer a {
        padding: 2px 4px;
        margin: 0 -2px;
    }

    .faq-item {
        border-radius: 10px;
        margin-bottom: 12px;
        scroll-margin-top: 80px;
    }

    #faq {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    #faq .section-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .faq-icon {
        width: 22px;
        height: 22px;
    }

    .faq-item::before {
        left: 24px;
        top: 24px;
    }
}

@media (max-width: 480px) {
    .faq-question {
        font-size: 15px;
        padding: 20px 20px;
    }

    .faq-question span {
        padding-right: 16px;
    }

    .faq-answer p {
        font-size: 14px;
        padding: 0 20px 24px 20px;
    }

    .faq-answer ul {
        padding: 0 20px 16px 40px;
        font-size: 14px;
    }

    .faq-answer a {
        padding: 2px 4px;
    }

    #faq .section-title {
        font-size: 24px;
    }

    .faq-item::before {
        left: 20px;
        top: 20px;
    }
}

/* Animation for FAQ items on scroll - Optimized */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-item:nth-child(5) { animation-delay: 0.25s; }
.faq-item:nth-child(6) { animation-delay: 0.3s; }
.faq-item:nth-child(7) { animation-delay: 0.35s; }
.faq-item:nth-child(8) { animation-delay: 0.4s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .faq-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .faq-item,
    .faq-question,
    .faq-icon,
    .faq-answer {
        transition-duration: 0.01ms;
    }
}

/* Performance optimization */
.faq-item {
    will-change: transform, opacity;
}

.faq-item:hover,
.faq-item.active {
    will-change: auto;
}
