/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared, fallback to white */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

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

.page-faq__hero-content {
    max-width: 800px;
    padding: 20px;
    z-index: 1;
}

.page-faq__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #FFFFFF;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* General button styles */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

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

.page-faq__btn-secondary:hover {
    background-color: #FFFFFF;
    color: #017439;
}

/* Content Area */
.page-faq__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #FFFFFF; /* Explicitly white background for content area */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-top: -50px; /* Overlap with hero section slightly for visual effect */
    position: relative;
    z-index: 2;
}

.page-faq__section-title,
.page-faq__category-title,
.page-faq__conclusion-title {
    color: #017439;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: bold;
}

.page-faq__category-title {
    font-size: 1.8em;
    text-align: left;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.page-faq__section-intro {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-faq__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #333333;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: #e5e5e5;
}

.page-faq__faq-item.active .page-faq__faq-question {
    background-color: #017439;
    color: #FFFFFF;
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg);
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
}

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

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

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

.page-faq__faq-link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    margin-right: 15px;
    display: inline-block;
    margin-top: 5px;
}

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

/* Image content within FAQ answers */
.page-faq__image-content {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Conclusion Section */
.page-faq__conclusion-section {
    text-align: center;
    padding: 60px 20px;
    background-color: #f0f0f0;
    border-radius: 8px;
    margin-top: 60px;
}

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

.page-faq__conclusion-cta {
    font-size: 1.3em;
    font-weight: bold;
    color: #017439;
    margin-bottom: 40px;
}

.page-faq__btn-large {
    padding: 15px 35px;
    font-size: 1.2em;
    border-radius: 10px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: 2.5em;
    }
    .page-faq__hero-description {
        font-size: 1.1em;
    }
    .page-faq__section-title {
        font-size: 2em;
    }
    .page-faq__category-title {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-faq__hero-title {
        font-size: 2em;
    }
    .page-faq__hero-description {
        font-size: 1em;
    }
    .page-faq__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .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-left: 15px;
        padding-right: 15px;
    }
    .page-faq__content-area {
        padding: 20px 15px;
        margin-top: -30px;
    }
    .page-faq__section-title,
    .page-faq__category-title,
    .page-faq__conclusion-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .page-faq__category-title {
        font-size: 1.4em;
    }
    .page-faq__section-intro {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-faq__faq-question {
        padding: 12px 15px;
    }
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px !important;
    }
    .page-faq__conclusion-section {
        padding: 40px 15px;
    }
    .page-faq__conclusion-cta {
        font-size: 1.1em;
    }
    .page-faq__btn-large {
        font-size: 1.1em;
        padding: 12px 25px;
    }

    /* Mobile image responsiveness */
    .page-faq img {
        max-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;
    }
    /* Specific content images */
    .page-faq__image-content {
        max-width: 100% !important;
        height: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Ensure content area images are not too small */
.page-faq__content-area img:not(.page-faq__hero-image) { /* Exclude hero image from this rule if it applies globally */
    min-width: 200px;
    min-height: 200px;
}

/* Color contrast enforcement */
/* All text within .page-faq will default to #333333 on light backgrounds */
/* Sections with specific backgrounds: */
.page-faq__hero-section {
    background-color: #017439; /* Use main brand color for hero background */
}
.page-faq__faq-item.active .page-faq__faq-question {
    background-color: #017439; /* Brand color for active FAQ question */
    color: #FFFFFF; /* White text for brand color background */
}
.page-faq__faq-question {
    background-color: #f0f0f0; /* Light grey for inactive FAQ question */
    color: #333333; /* Dark text for light background */
}
.page-faq__faq-answer {
    background-color: #ffffff; /* White background for answer */
    color: #555555; /* Slightly lighter dark text for paragraph */
}
.page-faq__btn-primary {
    background-color: #C30808; /* Custom red for primary button */
    color: #FFFF00; /* Custom yellow for button text */
}
.page-faq__btn-secondary {
    background-color: transparent;
    color: #FFFFFF; /* White text for transparent button on dark hero */
    border-color: #FFFFFF;
}
/* For secondary buttons on light backgrounds, adjust color */
.page-faq__content-area .page-faq__btn-secondary {
    background-color: transparent;
    color: #017439; /* Brand green text for secondary button on light background */
    border-color: #017439;
}
.page-faq__content-area .page-faq__btn-secondary:hover {
    background-color: #017439;
    color: #FFFFFF;
}

/* Specific image styling to prevent filter usage and ensure min size */
.page-faq img {
    filter: none !important; /* Absolutely no filter */
}

/* Ensure content images are large enough and responsive */
.page-faq__image-content {
    min-width: 200px;
    min-height: 200px;
    width: auto; /* Allow width to be determined by content if not 100% */
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .page-faq__image-content {
        min-width: 200px !important;
        min-height: 200px !important;
        width: 100% !important; /* Force 100% width on mobile */
        height: auto !important;
    }
}