/* style/faq.css */

/* Custom Colors */
:root {
    --color-primary: #11A84E;
    --color-secondary: #22C768;
    --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;
    --btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

.page-faq {
    font-family: Arial, sans-serif;
    color: var(--color-text-main); /* Default text color for the page content */
    background-color: var(--color-background); /* Page background color from custom colors */
    line-height: 1.6;
}

.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; /* Image on top, content below */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px; /* Adjust as needed, body handles top padding */
    padding-top: 10px; /* Small top padding for the section itself */
    background-color: var(--color-deep-green); /* Fallback or accent for hero */
    overflow: hidden;
}

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

.page-faq__hero-content {
    max-width: 800px;
    z-index: 1; /* Ensure text is above any potential background elements */
}

.page-faq__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
    color: var(--color-gold);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-faq__intro-text {
    font-size: 1.15em;
    color: var(--color-text-main);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary {
    background: var(--btn-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-faq__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

.page-faq__btn-secondary {
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
    margin-left: 20px;
}

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

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

/* FAQ List Section */
.page-faq__faq-list-section {
    padding: 80px 0;
    background-color: var(--color-background);
}

.page-faq__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.3);
}

.page-faq__section-title--spacing {
    margin-top: 60px;
}

.page-faq__faq-item-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-faq__faq-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--color-text-main);
    transition: color 0.3s ease;
    list-style: none; /* For <details> summary */
}

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for <details> summary */
}

.page-faq__faq-question:hover {
    color: var(--color-gold);
}

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

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    margin-left: 15px;
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: var(--color-text-secondary);
    max-height: 0; /* For JS-based toggle, if <details> is not used */
    overflow: hidden; /* For JS-based toggle */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* For JS-based toggle */
}

.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 2000px; /* Sufficiently large for content */
    padding-top: 10px;
}

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

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

/* Content Image */
.page-faq__image-wrapper {
    margin: 40px auto;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-faq__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    margin: 0 auto; /* Center the image */
}

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

.page-faq__cta-content {
    max-width: 900px;
}

.page-faq__cta-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    color: var(--color-gold);
    margin-bottom: 20px;
    font-weight: 700;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .page-faq {
        font-size: 15px;
        line-height: 1.5;
    }

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

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

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

    .page-faq__main-title {
        font-size: 2.2em; /* Adjust for mobile */
    }

    .page-faq__intro-text {
        font-size: 1em;
    }

    .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__btn-secondary {
        margin-left: 0; /* Remove margin for vertical stacking */
        margin-top: 15px; /* Add spacing between stacked buttons */
    }

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

    .page-faq__faq-list-section,
    .page-faq__cta-section {
        padding: 50px 0;
    }

    .page-faq__section-title,
    .page-faq__cta-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

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

    .page-faq__faq-toggle {
        font-size: 1.3em;
    }

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

    /* Images responsiveness */
    .page-faq img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-faq__image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}