/* style/faq.css */

/* Variables (using shared.css variables as base) */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --accent-register: #C30808;
    --accent-login: #C30808;
    --border-color: #e0e0e0;
    --background-light: #f9f9f9;
}

/* Base styles for the FAQ page content */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--secondary-color); /* Body background is white */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a8d5f 100%); /* Green gradient */
    color: var(--text-light);
}

.page-faq__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-faq__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-faq__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    filter: none; /* Ensure no filter is applied */
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-faq__hero-content h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-faq__intro-text {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-light);
}

/* CTA Buttons in Hero */
.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 600px; /* Limit button group width */
    margin-left: auto;
    margin-right: auto;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-faq__btn-primary {
    background: var(--accent-register); /* Red for register */
    color: var(--text-light); /* White font for contrast */
    border: 2px solid var(--accent-register);
}

.page-faq__btn-primary:hover {
    background: #a90707; /* Darker red for hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
    background: var(--accent-login); /* Red for login */
    color: var(--text-light); /* White font for contrast */
    border: 2px solid var(--accent-login);
}

.page-faq__btn-secondary:hover {
    background: #a90707; /* Darker red for hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Content Sections */
.page-faq__content-section {
    padding: 60px 20px;
    background-color: var(--secondary-color);
}

.page-faq__container {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.page-faq__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.page-faq__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__section-title--light,
.page-faq__section-description--light {
    color: var(--text-light);
}

/* FAQ List Specific Styles */
.page-faq__faq-list {
    background-color: var(--background-light);
    padding-top: 40px;
    padding-bottom: 40px;
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-faq__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-faq__faq-question:active {
    background: #eeeeee;
}

.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-dark);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-faq__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg); /* Rotate for 'x' or '-' effect */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 20px; /* Initial padding */
    opacity: 0;
    color: var(--text-dark);
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to contain any content */
    padding: 20px !important; /* Final padding */
    opacity: 1;
    background: var(--background-light);
    border-radius: 0 0 5px 5px;
    border: 1px solid var(--border-color);
    border-top: none;
}

.page-faq__faq-answer p {
    margin-bottom: 10px;
    font-size: 0.95em;
}

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

.page-faq__faq-answer ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 10px;
}

.page-faq__faq-answer li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

.page-faq__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-faq__faq-answer a:hover {
    color: #005a2d; /* Darker primary color for hover */
}

.page-faq__image-content {
    margin-top: 20px;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    filter: none; /* Ensure no filter is applied */
}

/* Bottom CTA Section */
.page-faq__cta-bottom-section {
    padding: 80px 20px;
    text-align: center;
    background-color: var(--primary-color);
}

.page-faq__cta-bottom-section .page-faq__container {
    background-color: var(--primary-color); /* Ensure container has primary color background */
    color: var(--text-light);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.page-faq__cta-bottom-section .page-faq__btn-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
}

.page-faq__cta-bottom-section .page-faq__btn-primary:hover {
    background: #e0e0e0;
    color: var(--primary-color);
}

.page-faq__cta-bottom-section .page-faq__btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.page-faq__cta-bottom-section .page-faq__btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__hero-content h1 {
        font-size: 2.4em;
    }
    .page-faq__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-faq__hero-content h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-faq__intro-text {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-faq__hero-image img {
        border-radius: 4px;
    }

    .page-faq__content-section {
        padding: 40px 15px;
    }

    .page-faq__container {
        padding-left: 0;
        padding-right: 0;
    }

    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-faq__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-faq__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-faq__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px); /* Adjust width to make space for toggle */
    }
    
    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px !important;
    }

    .page-faq__faq-answer p,
    .page-faq__faq-answer li {
        font-size: 0.9em;
    }

    .page-faq__cta-bottom-section {
        padding: 60px 15px;
    }
    .page-faq__cta-bottom-section .page-faq__container {
        padding: 30px;
    }

    /* All images in content area must be responsive */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure content area images are not scaled down below 200px by CSS rules */
    .page-faq__image-content {
        min-width: 200px; /* Enforce minimum display size for content images */
        min-height: 150px; /* Adjust as needed to maintain aspect ratio with min-width */
    }

    /* Specific container padding for mobile */
    .page-faq__content-section .page-faq__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-faq__cta-bottom-section .page-faq__container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Color contrast enforcement */
/* Body background is light (white), so default text is dark */
.page-faq {
    color: var(--text-dark);
}

/* Dark background sections should have light text */
.page-faq__hero-section,
.page-faq__cta-bottom-section .page-faq__container {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Ensure all image elements within .page-faq do not have CSS dimensions that make them smaller than 200px */
.page-faq img {
    min-width: 200px;
    min- /* Assuming a common aspect ratio, adjust as needed */
}

/* Override for specific image-content if it has explicit width/height in HTML */
.page-faq__image-content {
    min-width: unset; /* Allow specific image-content to use its HTML width/height */
    min-height: unset;
    width: auto; /* Revert to auto width for responsiveness unless explicitly set */
    height: auto; /* Revert to auto height for responsiveness unless explicitly set */
}

/* Re-apply min-width/height for image-content if it's not explicitly sized to be large */
.page-faq__image-content:not([width]):not([height]) {
    min-width: 200px;
    min-height: 150px;
}

/* For images with explicit width/height in HTML, ensure they are at least 200x150 and responsive */
.page-faq img[width][height] {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    min-width: 200px; /* Ensure minimum display size */
    min- /* Ensure minimum display size */
}