/* FAQ Page Custom Accordion Styles */

.faq-section {
    background-color: #f3f4f6;
    padding: 80px 0;
    min-height: 600px;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-section-title-area {
    text-align: center;
    margin-bottom: 50px;
}

.faq-section-title-area h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
}

.faq-section-title-area h2 span {
    color: #7E7FFD; /* Match the "Support" color from image */
}

.faq-section-title-area p {
    color: var(--muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Category Title Styling */
.faq-category-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin: 50px 0 30px;
    padding-left: 15px;
    border-left: 4px solid var(--blue);
    letter-spacing: -0.5px;
}

.faq-category-title:first-of-type {
    margin-top: 0;
}

/* Accordion Item Container */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-left: 45px; /* Offset to make space for the left badge */
}

.faq-item {
    background-color: var(--white);
    border-radius: 20px;
    position: relative;
    overflow: visible;
    /* We use filter: drop-shadow instead of box-shadow so that the shadow */
    /* conforms to the SVG speech-bubble tail sticking out on the left! */
    filter: drop-shadow(0 10px 20px rgba(8, 29, 58, 0.06));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .faq-item:hover {
        transform: translateY(-3px);
        filter: drop-shadow(0 15px 30px rgba(8, 29, 58, 0.1));
    }
}

/* Accordion Header */
.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 24px 45px;
    cursor: pointer;
    user-select: none;
    position: relative;
    min-height: 80px;
}

.faq-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
    line-height: 1.4;
    padding-right: 15px;
    transition: color 0.2s ease;
}

@media (hover: hover) {
    .faq-header:hover h3 {
        color: var(--blue-accent);
    }
}

/* Custom Speech Bubble SVG Tab */
.faq-tab-svg {
    position: absolute;
    left: -48px;
    top: 0;
    width: 90px;
    height: 100px;
    pointer-events: none;
    z-index: 1;
}

/* Gradient Number Badge */
.faq-number {
    position: absolute;
    left: -27px;
    top: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5F60EC 0%, #8A8BFF 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    border: 3.5px solid var(--white);
    box-shadow: 0 4px 12px rgba(8, 29, 58, 0.12);
    z-index: 2;
    transition: transform 0.3s ease;
}

.faq-item:hover .faq-number {
    transform: scale(1.05);
}

/* Chevron Icon styling */
.faq-chevron {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #a0aec0;
    font-size: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    color: var(--blue);
    background-color: #f0f2f5;
}

/* Smooth Accordion Height Transition using CSS Grid */
.faq-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.faq-item.active .faq-content-wrapper {
    grid-template-rows: 1fr;
}

.faq-content {
    min-height: 0;
    transition: visibility 0.3s;
    visibility: hidden;
}

.faq-item.active .faq-content {
    visibility: visible;
}

.faq-content-inner {
    padding: 0 32px 30px 45px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    font-weight: 500;
}

.faq-content-inner p {
    margin: 0 0 15px;
}

.faq-content-inner p:last-child {
    margin-bottom: 0;
}

.faq-content-inner ul, .faq-content-inner ol {
    margin: 12px 0;
    padding-left: 20px;
}

.faq-content-inner li {
    margin-bottom: 8px;
}

.faq-content-inner li:last-child {
    margin-bottom: 0;
}

/* Bold highlights inside answer */
.faq-content-inner strong {
    color: var(--navy);
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-section {
        padding: 50px 0;
    }
    
    .faq-container {
        padding: 0 15px;
    }

    .faq-section-title-area h2 {
        font-size: 28px;
    }
    
    .faq-category-title {
        font-size: 19px;
        margin: 35px 0 20px;
    }

    .faq-list {
        padding-left: 35px;
        gap: 20px;
    }
    
    .faq-header {
        padding: 20px 20px 20px 35px;
        min-height: 70px;
    }
    
    .faq-header h3 {
        font-size: 15px;
    }

    .faq-number {
        width: 38px;
        height: 38px;
        font-size: 14px;
        left: -24px;
        top: 16px;
        border-width: 2.5px;
    }
    
    .faq-tab-svg {
        left: -40px;
        width: 80px;
        height: 90px;
    }

    .faq-content-inner {
        padding: 0 20px 24px 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .faq-list {
        padding-left: 0;
        gap: 20px;
    }
    
    .faq-item {
        filter: drop-shadow(0 5px 15px rgba(8, 29, 58, 0.05));
    }
    
    /* On extremely small screens, we place the badge inside the card to save horizontal space */
    .faq-tab-svg {
        display: none;
    }
    
    .faq-number {
        position: static;
        margin-bottom: 12px;
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-width: 2px;
        box-shadow: none;
    }
    
    .faq-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        min-height: auto;
    }
    
    .faq-header h3 {
        padding-right: 0;
        margin-bottom: 10px;
    }
    
    .faq-chevron {
        align-self: flex-end;
    }
    
    .faq-content-inner {
        padding: 0 20px 20px 20px;
    }
}

/* FAQ-specific banner image */
.hero-art.faqs {
    background-image: url("../images/faq-banner.png");
    background-size: cover;
    background-position: right center;
}
