/* ==========================================================================
   Forge & Finite - FAQ Section Stylesheet
   ========================================================================== */

.faq-section {
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(at 100% 100%, hsla(253, 16%, 97%, 1) 0, transparent 50%), 
        radial-gradient(at 0% 0%, hsla(225, 39%, 70%, 0.15) 0, transparent 50%), 
        radial-gradient(at 50% 100%, hsla(339, 49%, 70%, 0.08) 0, transparent 50%);
    background-color: #ffffff;
    transition: background-color 0.5s ease, background-image 0.5s ease;
}

.dark-mode .faq-section {
    background-image: 
        radial-gradient(at 100% 100%, hsla(253, 16%, 7%, 1) 0, transparent 50%), 
        radial-gradient(at 0% 0%, hsla(225, 39%, 30%, 0.1) 0, transparent 50%), 
        radial-gradient(at 50% 100%, hsla(339, 49%, 30%, 0.06) 0, transparent 50%);
    background-color: #0a0a0a !important;
}

/* Section Header */
.faq-header {
    position: relative;
    z-index: 10;
}

.faq-badge {
    background: rgba(79, 70, 229, 0.08);
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(79, 70, 229, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.dark-mode .faq-badge {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
}

.faq-badge:hover {
    transform: translateY(-2px);
    background: rgba(79, 70, 229, 0.12);
}

.faq-badge-line {
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    width: 3px;
    height: 16px;
    border-radius: 9999px;
}

.faq-badge-text {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dark-mode .faq-badge-text {
    color: #a78bfa;
}

.faq-title {
    background: linear-gradient(135deg, var(--color-text-dark, #111827), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    line-height: 1.2;
}

.dark-mode .faq-title {
    background: linear-gradient(135deg, #ffffff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-title::after {
    content: "";
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    border-radius: 9999px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-header:hover .faq-title::after {
    width: 90px;
}

.faq-description {
    color: var(--color-text-light);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 42rem;
    margin: 0 auto;
}

.dark-mode .faq-description {
    color: #9ca3af;
}

/* FAQ Accordion Items */
.faq-items {
    position: relative;
    z-index: 10;
}

.faq-item {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.02);
    margin-bottom: 1rem;
}

.dark-mode .faq-item {
    background: rgba(17, 24, 39, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.15);
}

.faq-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.08);
}

.dark-mode .faq-item:hover {
    background: rgba(31, 41, 55, 0.55);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35);
}

/* Parent styling when active */
.faq-item.active {
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 20px 30px -10px rgba(79, 70, 229, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode .faq-item.active {
    border-color: rgba(124, 58, 237, 0.45);
    box-shadow: 0 20px 30px -10px rgba(124, 58, 237, 0.25);
    background: rgba(31, 41, 55, 0.65);
}

/* Also support modern CSS has selector just in case */
.faq-item:has(.faq-question.active) {
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 20px 30px -10px rgba(79, 70, 229, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode .faq-item:has(.faq-question.active) {
    border-color: rgba(124, 58, 237, 0.45);
    box-shadow: 0 20px 30px -10px rgba(124, 58, 237, 0.25);
    background: rgba(31, 41, 55, 0.65);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.faq-question-text {
    color: var(--color-text-dark, #111827);
    font-size: 1.15rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.dark-mode .faq-question-text {
    color: #e5e7eb;
}

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

.dark-mode .faq-question:hover .faq-question-text {
    color: #c084fc;
}

.faq-question.active .faq-question-text {
    color: var(--color-primary);
}

.dark-mode .faq-question.active .faq-question-text {
    color: #a78bfa;
}

.faq-icon-wrapper {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark-mode .faq-icon-wrapper {
    background: rgba(167, 139, 250, 0.05);
    border-color: rgba(167, 139, 250, 0.1);
}

.faq-question:hover .faq-icon-wrapper {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.2);
    transform: scale(1.05);
}

.dark-mode .faq-question:hover .faq-icon-wrapper {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.2);
}

.faq-question.active .faq-icon-wrapper {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-color: transparent;
    transform: rotate(180deg);
}

.dark-mode .faq-question.active .faq-icon-wrapper {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.faq-icon {
    color: var(--color-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.dark-mode .faq-icon {
    color: #a78bfa;
}

.faq-question.active .faq-icon {
    color: #ffffff !important;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(
        to bottom,
        rgba(79, 70, 229, 0.02),
        transparent
    );
}

.dark-mode .faq-answer {
    background: linear-gradient(
        to bottom,
        rgba(167, 139, 250, 0.01),
        transparent
    );
}

.faq-answer-content {
    padding: 0 2rem 1.75rem 2rem;
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.7;
}

.dark-mode .faq-answer-content {
    color: #9ca3af;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 1024px) {
    .faq-section {
        padding: 6rem 2rem;
    }

    .faq-title {
        font-size: 2.75rem;
    }

    .faq-description {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .faq-section {
        padding: 5rem 1.5rem;
    }

    .faq-header {
        margin-bottom: 3rem;
    }

    .faq-badge {
        padding: 0.5rem 1rem;
        margin-bottom: 1rem;
    }

    .faq-title {
        font-size: 2.25rem;
    }

    .faq-description {
        font-size: 1rem;
    }

    .faq-item {
        border-radius: 0.875rem;
    }

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

    .faq-question-text {
        font-size: 1.05rem;
    }

    .faq-icon-wrapper {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .faq-icon {
        font-size: 0.875rem;
    }

    .faq-answer-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .faq-section {
        padding: 3.5rem 1rem;
    }

    .faq-badge {
        padding: 0.4rem 0.875rem;
    }

    .faq-badge-line {
        height: 14px;
        width: 2.5px;
    }

    .faq-badge-text {
        font-size: 0.8125rem;
    }

    .faq-title {
        font-size: 1.85rem;
    }

    .faq-description {
        font-size: 0.95rem;
    }

    .faq-item {
        border-radius: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .faq-question {
        padding: 1rem 1.125rem;
        gap: 1rem;
    }

    .faq-question-text {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .faq-icon-wrapper {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .faq-icon {
        font-size: 0.8rem;
    }

    .faq-answer-content {
        padding: 0 1.125rem 1.25rem 1.125rem;
        font-size: 0.875rem;
        line-height: 1.6;
    }
}

@media (max-width: 350px) {
    .faq-question {
        padding: 0.875rem 1rem;
    }
    
    .faq-question-text {
        font-size: 0.875rem;
        padding-right: 0px;
    }
    
    .faq-answer-content {
        padding: 0 1rem 1rem 1rem;
        font-size: 0.8125rem;
    }
}

/* Animation for FAQ items */
@keyframes fadeInFAQ {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInFAQ 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.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; }

