/* style/faq.css */

/* General styling for the page-faq scope */
.page-faq {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #FFFFFF; /* Explicitly set body background for clarity */
}

.page-faq__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.page-faq__section-title,
.page-faq__cta-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.2;
}

.page-faq__cta-title {
    color: #ffffff; /* White text on dark CTA background */
}

/* Hero Section */
.page-faq__hero-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 60px;
    background-color: #f5f5f5; /* Light background for hero */
}

.page-faq__hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
}

.page-faq__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    text-align: left;
}

.page-faq__main-title {
    font-size: clamp(2em, 4vw, 3em); /* Responsive font size for H1 */
    font-weight: 800;
    color: #017439;
    margin-bottom: 20px;
}

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

.page-faq__hero-image {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
}

.page-faq__hero-side-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* CTA Buttons */
.page-faq__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    text-align: center;
}

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

.page-faq__btn-primary:hover {
    background-color: #005a2e;
    border-color: #005a2e;
}

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

.page-faq__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2e;
    border-color: #005a2e;
}

/* FAQ Section */
.page-faq__faq-section {
    padding: 60px 0;
}

.page-faq__faq-list {
    margin-top: 40px;
}

.page-faq__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    background-color: #f9f9f9;
    user-select: none;
    transition: background-color 0.3s ease;
    list-style: none; /* Hide default marker for details summary */
}

.page-faq__faq-item[open] > .page-faq__faq-question {
    background-color: #e6ffe6; /* Lighter green when open */
    color: #017439;
}

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Chrome/Safari */
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    font-weight: 300;
    color: #017439;
    margin-left: 15px;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    color: #017439;
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
}

.page-faq__faq-answer p,
.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
    margin-top: 15px;
    margin-bottom: 0;
}

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
    padding-left: 20px;
}

.page-faq__faq-answer li {
    margin-bottom: 8px;
}

.page-faq__faq-answer a {
    color: #017439;
    text-decoration: none;
}

.page-faq__faq-answer a:hover {
    text-decoration: underline;
}

.page-faq__image-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.page-faq__content-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: block;
    margin: 0 auto;
}

/* Final CTA Section */
.page-faq__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Dark brand color background */
    text-align: center;
    color: #ffffff;
}

.page-faq__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__cta-section .page-faq__button-group {
    justify-content: center; /* Center buttons in CTA section */
}

/* Ensure buttons in dark section have correct colors */
.page-faq__dark-section .page-faq__btn-primary {
    background-color: #ffffff;
    color: #017439;
    border-color: #ffffff;
}

.page-faq__dark-section .page-faq__btn-primary:hover {
    background-color: #f0f0f0;
    border-color: #f0f0f0;
    color: #005a2e;
}

.page-faq__dark-section .page-faq__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.page-faq__dark-section .page-faq__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #ffffff;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-faq__hero-container {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }

    .page-faq__hero-content {
        order: 2; /* Content below image on smaller screens */
        text-align: center;
    }

    .page-faq__hero-image {
        order: 1; /* Image above content */
        margin-bottom: 30px;
    }

    .page-faq__cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* General mobile adaptations */
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-faq__container {
        padding: 0 15px !important; /* Adjust container padding for mobile */
    }

    .page-faq__section-title,
    .page-faq__cta-title {
        font-size: 2em;
        margin-bottom: 20px;
    }

    /* Hero Section - Mobile */
    .page-faq__hero-section {
        padding-top: 10px !important; /* Small top padding, relying on body for header offset */
        padding-bottom: 40px;
    }

    .page-faq__hero-container {
        padding: 20px 0;
        gap: 20px;
    }

    .page-faq__main-title {
        font-size: 2.2em; /* Smaller H1 for mobile */
        margin-bottom: 15px;
    }

    .page-faq__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-faq__hero-side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* CTA Buttons - Mobile */
    .page-faq__cta-buttons,
    .page-faq__button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq a[class*="button"],
    .page-faq a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 15px;
    }

    /* FAQ Section - Mobile */
    .page-faq__faq-section {
        padding: 40px 0;
    }

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

    .page-faq__faq-toggle {
        font-size: 1.3em;
    }

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

    /* Final CTA Section - Mobile */
    .page-faq__cta-section {
        padding: 50px 0;
    }

    .page-faq__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    /* Universal image responsive for content area */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-faq__section,
    .page-faq__card,
    .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-faq__image-wrapper {
        padding: 0 15px;
        box-sizing: border-box !important;
    }
}