/* Base styles and box-sizing for all elements */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #fff; /* Ensure default text color is white for the section */
}

/* --- Animations --- */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- FAQ Section Styling --- */
#faq {
    background: rgba(1, 49, 83, 0.6);
    border-bottom: 5px solid #013153;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1.5rem; /* Add consistent padding */
    text-align: center; /* Center main text elements */
    overflow: hidden; /* Hide overflow during animations */
}

.faq-subtitle {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem); /* Fluid font size */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    opacity: 0; /* Initial state for JS animation */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.faq-subtitle.is-in-view {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.8s ease-out forwards;
}


.faq-title {
    font-size: clamp(2rem, 5vw, 3rem); /* Fluid font size */
    font-weight: bold;
    margin-bottom: 1rem;
    opacity: 0; /* Initial state for JS animation */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.faq-title.is-in-view {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.8s ease-out forwards 0.1s; /* Staggered */
}

.faq-description {
    font-size: clamp(1rem, 2.5vw, 1.3rem); /* Fluid font size */
    margin-bottom: 3rem; /* More space before questions */
    line-height: 1.5;
    color: #f5f5f5;
    width: 60%; /* Occupy more width on larger screens */
    max-width: 800px; /* Prevent it from getting too wide */
    opacity: 0; /* Initial state for JS animation */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.faq-description.is-in-view {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.8s ease-out forwards 0.2s; /* Staggered */
}


.faq-wrap {
    width: 100%;
    max-width: 900px; /* Max width for the FAQ items container */
    padding: 0 1rem; /* Padding for the wrap container */
}

/* Individual FAQ Item */
.faq-item {
    background-color: rgba(1, 49, 83, 0.7); /* Slightly darker background for items */
    border-radius: 8px;
    margin-bottom: 1.5rem; /* Space between items */
    overflow: hidden; /* Important for accordion transition */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */

    /* Initial state for JS animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.faq-item.is-in-view {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.8s ease-out forwards;
}
/* Staggered animation for faq items (handled by JS for better control) */


.faq-question {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem); /* Fluid font size */
    font-weight: bold;
    color: #dcdcdc;
    padding: 1rem 1.5rem; /* Adjust padding */
    cursor: pointer; /* Indicate clickable */
    display: flex;
    justify-content: space-between; /* Space out question and icon */
    align-items: center;
    background-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth hover */
    margin-bottom: 0; /* Remove default margin */
}

.faq-question::after {
    content: '+'; /* Plus icon */
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.3s ease; /* Smooth rotation */
}

.faq-question.active::after {
    content: '-'; /* Minus icon when active */
    transform: rotate(0deg); /* No rotation for minus */
}

.faq-question:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Light background on hover */
    color: #aad8ff;
}

.faq-answer {
    font-size: clamp(0.95rem, 1.8vw, 1.2rem); /* Fluid font size */
    line-height: 1.6;
    color: #f5f5f5;
    padding: 0 1.5rem 1rem; /* Adjust padding, remove top padding as it's hidden */
    text-align: left;
    max-height: 0; /* Initially hidden for accordion */
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out, opacity 0.4s ease-out; /* Smooth slide down */
    opacity: 0; /* Start hidden */
}

.faq-answer.active {
    max-height: 200px; /* Sufficient height to show content. Adjust if answers are very long. */
    padding: 1rem 1.5rem; /* Restore padding when active */
    opacity: 1; /* Fully visible */
}

/* --- Media Queries for Responsiveness --- */

/* Tablet and Smaller Desktops (approx. 992px and below) */
@media (max-width: 992px) {
    #faq {
        padding: 3rem 1rem;
    }

    .faq-description {
        width: 80%; /* Occupy more width */
    }
}

/* Mobile Phones (approx. 768px and below) */
@media (max-width: 768px) {
    #faq {
        padding: 2rem 0.5rem;
    }

    .faq-description {
        width: 95%; /* Occupy almost full width */
        margin-bottom: 2rem;
    }

    .faq-item {
        margin-bottom: 1rem; /* Less space between items */
    }

    .faq-question {
        padding: 0.8rem 1rem; /* Smaller padding */
    }

    .faq-question::after {
        font-size: 1.5rem; /* Smaller icon */
    }

    .faq-answer {
        padding: 0 1rem 0.8rem; /* Smaller padding */
    }
    .faq-answer.active {
        padding: 0.8rem 1rem; /* Smaller active padding */
    }
}