/* style/faq.css */

/* --- Global Color Variables (must be defined in shared.css, but for context here) --- */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --background: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border: #2E7A4E;
    --glow: #57E38D;
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* --- Base Styles --- */
.page-faq {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Default text color for the page */
    background-color: var(--background); /* Body background is handled by shared.css, this is for main content area if needed */
    line-height: 1.6;
    font-size: 16px;
}

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

.page-faq__section {
    padding: 60px 0;
    background-color: var(--background);
}

.page-faq__section--intro {
    background-color: var(--card-bg); /* Slightly different background for intro section */
}

.page-faq__section-title {
    font-size: 2.5em;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-faq__highlight-text {
    color: var(--gold); /* Highlight with gold color */
}

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

/* --- Buttons --- */
.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
    max-width: 100%; /* Ensure button doesn't exceed container */
}

.page-faq__btn-primary {
    background: var(--button-gradient); /* Custom button gradient */
    color: #ffffff; /* White text for contrast */
    border: none;
}

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

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

.page-faq__btn-secondary:hover {
    background: var(--deep-green); /* Darker green on hover */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-inline {
    background: var(--deep-green);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 15px;
    font-size: 0.95em;
    margin-top: 10px;
    margin-right: 10px; /* Spacing for multiple inline buttons */
}

.page-faq__btn-inline:hover {
    background: var(--glow);
    color: var(--background);
}


/* --- Hero Section --- */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Stack image and content vertically */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background);
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Constrain image width */
    margin-bottom: 30px; /* Space between image and content */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-faq__hero-content {
    text-align: center;
    max-width: 900px;
    color: var(--text-main);
}

.page-faq__main-title {
    font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive H1 font size */
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

/* --- Content Grid (for intro section) --- */
.page-faq__content-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.page-faq__text-block {
    flex: 1;
    color: var(--text-secondary);
}

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

.page-faq__image-block {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


/* --- FAQ Accordion --- */
.page-faq__faq-list-section {
    background-color: var(--background);
}

.page-faq__faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__faq-item {
    background-color: var(--card-bg); /* Darker card background */
    border: 1px solid var(--divider); /* Subtle border */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-faq__faq-item[open] {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-faq__faq-qtext {
    flex-grow: 1;
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    color: var(--gold); /* Gold color for the toggle icon */
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: var(--text-secondary); /* Lighter text for answers */
    line-height: 1.6;
    max-height: 0; /* Hidden by default for JS fallback */
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 500px; /* Adjust as needed for content length */
    padding-top: 10px;
}

/* For JS-driven accordion (if not using <details> or for active state) */
.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px; /* Sufficiently large for content */
    padding-top: 10px;
}

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


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

.page-faq__cta-section .page-faq__container.page-faq__dark-section {
    background: var(--card-bg); /* Use card background for this specific CTA container */
    padding: 60px 40px;
    border-radius: 15px;
    position: relative;
    overflow: hidden; /* Ensure image doesn't spill */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-faq__cta-section .page-faq__section-title {
    color: var(--text-main);
    margin-bottom: 20px;
}

.page-faq__cta-section .page-faq__description {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.page-faq__cta-image {
    width: 100%;
    max-width: 600px; /* Max width for CTA image */
    height: auto;
    display: block;
    margin: 40px auto 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-faq__section-title {
        font-size: 2em;
    }
    .page-faq__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-faq__content-grid {
        flex-direction: column;
    }
    .page-faq__image-block {
        margin-top: 30px;
    }
}

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

    .page-faq__container {
        padding: 0 15px; /* Add side padding for mobile */
    }

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

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

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

    .page-faq__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

    .page-faq__description {
        font-size: 1em;
    }

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq__btn-inline {
        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__cta-buttons,
    .page-faq__button-group,
    .page-faq__btn-container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
    }

    /* Image responsive rules */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .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;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no overflow */
    }

    /* Specific video padding (if video existed in FAQ page) */
    .page-faq__video-section {
        padding-top: 10px !important;
    }

    .page-faq__section-title {
        font-size: 1.8em;
    }
    .page-faq__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-faq__faq-answer {
        padding: 0 20px 15px;
    }
}