/* style/faq.css */

/* Custom Color Variables */
:root {
    --color-primary: #11A84E;
    --color-secondary: #22C768;
    --color-button-gradient-start: #2AD16F;
    --color-button-gradient-end: #13994A;
    --color-card-bg: #11271B;
    --color-background: #08160F;
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

/* Base styles for the page-faq scope */
.page-faq {
    background-color: var(--color-background); /* Dark background */
    color: var(--color-text-main); /* Light text for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-bottom: 40px; /* General padding for the bottom of the page content */
}

/* Ensure all images are responsive and adhere to minimum size */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents extra space below images */
    min-width: 200px; /* Minimum image width */
    min-height: 200px; /* Minimum image height */
    object-fit: cover; /* Ensures images cover their area without distortion */
    border-radius: 8px; /* Soften edges */
}

/* Headings */
.page-faq h1,
.page-faq h2,
.page-faq h3 {
    color: var(--color-text-main);
    margin-bottom: 20px;
    font-weight: bold;
}

.page-faq h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    text-align: center;
    line-height: 1.2;
    margin-bottom: 15px;
}

.page-faq h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}
.page-faq h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-gold);
    margin: 10px auto 0;
    border-radius: 2px;
}

.page-faq h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-gold);
    margin-bottom: 25px;
    text-align: center;
}

.page-faq p {
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.page-faq a {
    color: var(--color-gold); /* Links in content */
    text-decoration: none;
}
.page-faq a:hover {
    text-decoration: underline;
}

/* Container for main content */
.page-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    text-align: center;
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-faq__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.5); /* Darken image for text readability */
    border-radius: 0; /* Hero image usually full width, no border radius */
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    color: var(--color-text-main);
}

.page-faq__hero-content .page-faq__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--color-text-main);
}

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

.page-faq__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    box-sizing: border-box; /* Include padding in element's total width and height */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-faq__cta-button--primary {
    background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: #ffffff;
    border: none;
}

.page-faq__cta-button--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-button--secondary {
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
}

.page-faq__cta-button--secondary:hover {
    background: rgba(var(--color-gold), 0.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-faq__section-description {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
}

.page-faq__faq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-faq__category-block {
    background-color: var(--color-card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-faq__category-image {
    width: 100%;
    max-width: 400px; /* Constrain image width within card */
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 25px;
    border: 1px solid var(--color-deep-green);
}

.page-faq__category-title {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--color-gold);
    font-size: 1.8rem;
}

/* FAQ Item (using <details>) */
.page-faq__faq-item {
    background-color: var(--color-deep-green);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    width: 100%; /* Ensure it takes full width within category block */
    text-align: left; /* Align text within FAQ item */
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    color: var(--color-text-main);
    font-size: 1.1rem;
    background-color: var(--color-deep-green);
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: rgba(var(--color-deep-green), 0.8);
}

.page-faq__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--color-gold);
}

.page-faq__faq-item[open] .page-faq__faq-question {
    background-color: var(--color-deep-green);
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    color: var(--color-text-secondary);
    font-size: 1rem;
    border-top: 1px solid var(--color-divider);
    margin-top: -1px; /* Overlap border to make it look continuous */
}
.page-faq__faq-answer p {
    margin-bottom: 0; /* Remove bottom margin for paragraphs inside answer */
}

/* Hide default details marker */
.page-faq__faq-item > summary {
    list-style: none;
}
.page-faq__faq-item > summary::-webkit-details-marker {
    display: none;
}

/* Final CTA Section */
.page-faq__cta-section {
    position: relative;
    text-align: center;
    padding: 80px 20px;
    margin-top: 40px;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--color-card-bg); /* Fallback for if image not loaded */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-faq__cta-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.4); /* Darken image for text readability */
    border-radius: 12px;
}

.page-faq__cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: var(--color-text-main);
}

.page-faq__cta-title {
    color: var(--color-text-main);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.page-faq__cta-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--color-text-secondary);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-faq__hero-section {
        padding: 40px 20px;
    }
    .page-faq__faq-section {
        padding: 40px 20px;
    }
    .page-faq__cta-section {
        padding: 60px 20px;
    }
    .page-faq__faq-list {
        grid-template-columns: 1fr; /* Stack categories on smaller screens */
    }
    .page-faq__category-block {
        padding: 25px;
    }
    .page-faq__category-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    /* Mobile specific overrides */
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }
    
    /* General content area for mobile */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__category-block {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Images */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: unset !important; /* Allow smaller images if needed, but still > 200px due to overall constraint */
        min-height: unset !important;
    }
    .page-faq__hero-image,
    .page-faq__cta-image {
        border-radius: 0 !important; /* Full width images should not have border radius on mobile */
    }

    /* Video (if any, though none explicitly added for FAQ page) */
    .page-faq video,
    .page-faq__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-faq__video-section,
    .page-faq__video-container,
    .page-faq__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important;
    }
    .page-faq__video-section {
        padding-top: 10px !important;
    }

    /* Buttons */
    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }
    .page-faq__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px !important; /* Ensure text inside button has padding */
        padding-right: 15px !important;
    }

    .page-faq__hero-section {
        padding: 30px 15px;
    }
    .page-faq__hero-content .page-faq__description {
        font-size: 1rem;
    }
    .page-faq__faq-section {
        padding: 30px 15px;
    }
    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    .page-faq__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95rem;
    }
    .page-faq__cta-section {
        padding: 50px 15px;
    }
    .page-faq__cta-title {
        font-size: 1.8rem;
    }
    .page-faq__cta-description {
        font-size: 1rem;
    }
}