/* style/faq.css */

/* Custom colors from palette */
:root {
    --page-faq-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-faq-card-bg: #11271B;
    --page-faq-background: #08160F; /* This will be the body background */
    --page-faq-text-main: #F2FFF6;
    --page-faq-text-secondary: #A7D9B8;
    --page-faq-border: #2E7A4E;
    --page-faq-glow: #57E38D;
    --page-faq-gold: #F2C14E;
    --page-faq-divider: #1E3A2A;
    --page-faq-deep-green: #0A4B2C;
}

/* Base styles for the page content, considering dark body background */
.page-faq {
    background-color: var(--page-faq-background); /* Ensure consistent background */
    color: var(--page-faq-text-main); /* Light text for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.page-faq h1,
.page-faq h2,
.page-faq h3,
.page-faq h4,
.page-faq h5,
.page-faq h6 {
    color: var(--page-faq-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* H1 specific styling - no fixed font-size, use weight/spacing */
.page-faq__main-title {
    font-weight: bold;
    letter-spacing: -0.02em;
    max-width: 900px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    /* Using clamp for responsive font size, within limits */
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Example clamp: min 2.5rem, preferred 5vw, max 3.5rem */
}

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

/* Section general styling */
.page-faq__section {
    padding: 60px 0;
    border-bottom: 1px solid var(--page-faq-divider);
}

.page-faq__section:last-of-type {
    border-bottom: none;
}

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

.page-faq__section-title {
    text-align: center;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 40px;
    color: var(--page-faq-gold); /* Using gold for section titles for emphasis */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, text below */
    align-items: center;
    padding-bottom: 60px; /* Space below content */
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--page-faq-deep-green); /* A complementary background for the hero */
}

.page-faq__hero-image {
    width: 100%;
    max-width: 1200px; /* Constrain image width */
    height: auto;
    display: block;
    margin-bottom: 30px; /* Space between image and text */
    border-radius: 8px;
    object-fit: cover;
}

.page-faq__hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

/* CTA Buttons */
.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%; /* Ensure container takes full width for mobile adaptation */
    max-width: 600px; /* Max width for button group */
    box-sizing: border-box;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons adapt to container */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
}

.page-faq__btn-primary {
    background: var(--page-faq-button-gradient);
    color: var(--page-faq-text-main); /* Light text on green button */
    border: none;
}

.page-faq__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary {
    background: transparent;
    color: var(--page-faq-text-main); /* Light text on transparent button */
    border: 2px solid var(--page-faq-border);
}

.page-faq__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* FAQ List Styling */
.page-faq__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__faq-item {
    background-color: var(--page-faq-card-bg);
    border: 1px solid var(--page-faq-border);
    border-radius: 8px;
    overflow: hidden;
    color: var(--page-faq-text-main);
}

/* Details tag specific styles */
.page-faq__faq-item[open] .page-faq__faq-question {
    border-bottom: 1px solid var(--page-faq-border);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--page-faq-text-main);
    background-color: var(--page-faq-card-bg);
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default marker */
}

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* Remove default marker for Webkit */
}

.page-faq__faq-question:hover {
    background-color: var(--page-faq-deep-green); /* Slightly darker on hover */
}

.page-faq__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--page-faq-gold);
}

.page-faq__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--page-faq-text-secondary);
}

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

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

.page-faq__faq-answer a {
    color: var(--page-faq-gold); /* Links within answers */
    text-decoration: underline;
}

.page-faq__faq-answer a:hover {
    color: var(--page-faq-glow);
}

/* Inline images within FAQ answers */
.page-faq__image-inline {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    border: 1px solid var(--page-faq-border);
}

/* Bottom CTA Section */
.page-faq__cta-bottom {
    text-align: center;
    padding: 80px 0;
    background-color: var(--page-faq-deep-green);
}

.page-faq__cta-bottom .page-faq__section-title {
    color: var(--page-faq-gold);
    margin-bottom: 20px;
}

.page-faq__cta-bottom .page-faq__description {
    font-size: 1.1em;
    color: var(--page-faq-text-secondary);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

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

    .page-faq__hero-section {
        padding: 40px 15px 40px 15px;
        padding-top: 10px !important; /* body handles --header-offset, this is decorative */
    }

    .page-faq__hero-image {
        margin-bottom: 20px;
    }

    .page-faq__main-title {
        font-size: clamp(2rem, 8vw, 2.5rem); /* Adjust clamp for smaller screens */
        margin-bottom: 20px;
    }

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

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent overflow */
    }

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

    .page-faq__section {
        padding: 40px 0;
    }

    .page-faq__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 30px;
    }

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

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

    /* Mobile image adaptation - crucial for preventing overflow */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important; /* Ensure images take full width of their container */
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Ensure containers with images also adapt */
    .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;
    }

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

    .page-faq__cta-bottom .page-faq__description {
        font-size: 1em;
        margin-bottom: 30px;
    }
}