/* style/faq.css */

/* Base styles for the page-faq scope */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    background-color: #017439; /* Brand primary color for hero */
    color: #ffffff;
    text-align: center;
    overflow: hidden; /* Prevent image overflow */
    box-sizing: border-box;
}

.page-faq__hero-content {
    max-width: 900px;
    margin-bottom: 40px;
    z-index: 1;
}

.page-faq__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
    font-weight: bold;
}

.page-faq__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
    background-color: #e00a0a;
    border-color: #e00a0a;
    transform: translateY(-2px);
}

.page-faq__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-faq__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
    transform: translateY(-2px);
}

.page-faq__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.page-faq__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4); /* Darken image for text readability */
    display: block;
}

/* Content Area */
.page-faq__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    color: #e0e0e0; /* Light text for dark body background */
    background-color: #0d0d0d; /* Slightly lighter dark background for content */
    box-sizing: border-box;
}

.page-faq__section-title {
    font-size: 2.5em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
}

.page-faq__section-intro {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #cccccc;
}

/* FAQ List */
.page-faq__faq-list {
    margin-top: 40px;
}

.page-faq__faq-category {
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    box-sizing: border-box;
}

.page-faq__faq-category:last-child {
    margin-bottom: 0;
}

.page-faq__category-title {
    font-size: 2em;
    color: #017439; /* Brand color for category titles */
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #017439;
    padding-bottom: 15px;
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
}

.page-faq__faq-item:last-child {
    border-bottom: none;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #017439; /* Brand color for toggle icon */
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg); /* Change to 'x' or '-' */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #cccccc;
    background-color: rgba(255, 255, 255, 0.05);
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 25px;
}

.page-faq__faq-answer p {
    margin-bottom: 15px;
}

.page-faq__faq-answer p:last-child {
    margin-bottom: 0;
}

.page-faq__button-wrapper {
    margin-top: 20px;
    text-align: center;
}

/* CTA Section */
.page-faq__cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
    box-sizing: border-box;
}

.page-faq__cta-content {
    max-width: 800px;
    margin-bottom: 40px;
}

.page-faq__cta-title {
    font-size: 2.8em;
    color: #ffffff;
    margin-bottom: 20px;
}

.page-faq__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-faq__cta-image-wrapper {
    max-width: 800px;
    width: 100%;
    margin-top: 40px;
    box-sizing: border-box;
    overflow: hidden;
}

.page-faq__cta-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Section Spacing */
.page-faq__section-spacing {
    margin-bottom: 0; /* Sections are contained within main */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 2.8em;
    }

    .page-faq__cta-title {
        font-size: 2.4em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure space for fixed header on mobile */
        max-width: 100% !important;
        width: 100% !important;
    }

    .page-faq__main-title {
        font-size: 2.2em;
    }

    .page-faq__hero-description {
        font-size: 1em;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px; /* Add padding to container to prevent edge-to-edge buttons */
        flex-wrap: wrap !important;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .page-faq__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-faq__content-area {
        padding: 40px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-faq__section-title {
        font-size: 2em;
    }

    .page-faq__section-intro {
        font-size: 0.95em;
    }

    .page-faq__faq-category {
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-faq__category-title {
        font-size: 1.8em;
    }

    .page-faq__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }

    .page-faq__faq-answer {
        padding: 0 20px;
    }

    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px 20px;
    }

    .page-faq__cta-section {
        padding: 60px 15px;
        max-width: 100% !important;
        width: 100% !important;
    }

    .page-faq__cta-title {
        font-size: 2em;
    }

    .page-faq__cta-description {
        font-size: 1em;
    }

    .page-faq__cta-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-faq__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* General image responsiveness for content area */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-faq__section,
    .page-faq__card,
    .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* padding-left: 15px; */
        /* padding-right: 15px; */
    }
}

/* Color Contrast Fixes (as per instructions for dark body background) */
.page-faq p,
.page-faq li,
.page-faq__faq-answer {
    color: #cccccc; /* Slightly darker white for contrast on dark background */
}

.page-faq__faq-question {
    color: #ffffff;
}

.page-faq__faq-category {
    background-color: rgba(255, 255, 255, 0.05); /* Light transparent background for cards */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-faq__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.page-faq__faq-answer {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Ensure images do not have filters */
.page-faq img {
    filter: none; /* Reset any potential filters */
}