/* style/faq.css */

/* Custom Colors */
: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;
}

.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text-main); /* Main text should be light for dark background */
    background-color: var(--color-background); /* Use the specified background color */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Ensure image is above content */
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    overflow: hidden;
    text-align: center;
    background-color: var(--color-deep-green); /* Use a dark brand color for hero background */
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px; /* Space between image and content */
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 1200px; /* Adjust based on typical content width */
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-faq__hero-content {
    max-width: 900px;
    z-index: 1;
    position: relative;
}

.page-faq__hero-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    color: var(--color-gold); /* Gold for emphasis on dark background */
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-description {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for button responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-faq__btn-primary {
    background: var(--color-button-gradient-start); /* Fallback for gradient */
    background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: var(--color-text-main); /* Light text on dark button */\    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
}

.page-faq__btn-secondary {
    background: none;
    color: var(--color-gold); /* Gold text for secondary button */
    border: 2px solid var(--color-gold);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary:hover {
    background: rgba(242, 193, 78, 0.1); /* Light gold hover effect */
    color: var(--color-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-faq__section-title {
    font-size: 2.5rem;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-faq__text-block {
    font-size: 1.1rem;
    color: var(--color-text-main);
    margin-bottom: 20px;
    text-align: justify;
}

.page-faq__text-block a {
    color: var(--color-secondary); /* Link color */
    text-decoration: underline;
}

.page-faq__text-block a:hover {
    color: var(--color-gold);
}

/* FAQ Section */
.page-faq__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-faq__faq-item {
    background-color: var(--color-card-bg); /* Darker green for card background */
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__faq-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-text-main);
    cursor: pointer;
    background-color: var(--color-deep-green); /* Slightly darker for question header */
    border-bottom: 1px solid var(--color-divider);
}

/* For <details> tag, remove default marker */
.page-faq__faq-item summary {
    list-style: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.page-faq__faq-item summary::-webkit-details-marker {
    display: none;
}


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

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

.page-faq__faq-answer {
    padding: 20px 25px;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    background-color: var(--color-card-bg);
    max-height: 0; /* For JS-controlled collapse */
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px; /* Large enough to accommodate content */
    padding: 20px 25px;
    transition: max-height 0.7s ease-in, padding 0.7s ease-in;
}

/* For native <details> tag, the answer is shown by default when open */
.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: none; /* Let content dictate height */
    padding: 20px 25px;
    overflow: visible;
}

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

.page-faq__faq-answer img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

/* Call to Action Section */
.page-faq__cta-section {
    background-color: var(--color-deep-green);
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid var(--color-divider);
}

.page-faq__cta-title {
    font-size: 2.2rem;
    color: var(--color-gold);
    margin-bottom: 20px;
    font-weight: bold;
}

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

.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-faq__download-cta {
    margin-top: 20px;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .page-faq__section-title {
        font-size: 2rem;
    }
    .page-faq__cta-title {
        font-size: 1.8rem;
    }
}

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

    .page-faq__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-faq__hero-content {
        padding: 0 15px;
    }

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

    .page-faq__hero-description {
        font-size: 1rem;
    }

    .page-faq__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

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

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

    .page-faq__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .page-faq__text-block {
        font-size: 1rem;
    }

    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1.1rem;
    }

    .page-faq__faq-toggle {
        font-size: 1.5rem;
    }

    .page-faq__faq-answer {
        padding: 15px 20px;
        font-size: 0.95rem;
    }

    .page-faq__faq-answer img,
    .page-faq__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Ensure min size on mobile too */
        min-height: 200px !important; /* Ensure min size on mobile too */
    }

    /* All image containers must be responsive */
    .page-faq__hero-image-wrapper,
    .page-faq__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

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

    .page-faq__cta-title {
        font-size: 1.6rem;
    }

    .page-faq__cta-description {
        font-size: 1rem;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-faq__faq-item {
        padding: 0 !important;
    }

    /* Ensure no content causes horizontal scroll */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__faq-item,
    .page-faq__hero-section,
    .page-faq__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal overflow */
    }
}

/* Ensure content area images meet minimum size requirements */
.page-faq img {
    min-width: 200px;
    min-height: 200px;
}