/* style/faq.css */

/* Custom color variables based on provided palette */
:root {
    --page-faq-bg: #08160F;
    --page-faq-card-bg: #11271B;
    --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;
    --page-faq-btn-gradient-start: #2AD16F;
    --page-faq-btn-gradient-end: #13994A;
}

.page-faq {
    background-color: var(--page-faq-bg); /* Use specified background color */
    color: var(--page-faq-text-main); /* Ensure text is visible on dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.page-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Add some padding for smaller screens */
    box-sizing: border-box;
}

/* 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;
    text-align: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px; /* Ample bottom padding */
    overflow: hidden; /* Prevent content overflow */
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height of hero image for better layout */
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(0.7); /* Slightly darken image for text readability */
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    margin-top: -80px; /* Safer overlap, content visually above image */
    padding: 30px;
    max-width: 900px;
    background: rgba(8, 22, 15, 0.85); /* Semi-transparent dark background for text readability */
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.page-faq__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
    color: var(--page-faq-text-main);
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 100%; /* Ensure buttons don't overflow */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-faq__btn-primary {
    background: linear-gradient(180deg, var(--page-faq-btn-gradient-start) 0%, var(--page-faq-btn-gradient-end) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-faq__btn-secondary {
    background-color: transparent;
    color: var(--page-faq-text-main);
    border: 2px solid var(--page-faq-glow);
}

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

/* Intro Section */
.page-faq__intro-section {
    padding: 60px 0;
    text-align: center;
}

.page-faq__dark-section {
    background-color: var(--page-faq-card-bg); /* Use card background for dark sections */
}

.page-faq__section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--page-faq-gold);
    margin-bottom: 30px;
    font-weight: bold;
}

.page-faq__text-block {
    font-size: 1rem;
    color: var(--page-faq-text-secondary);
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__link {
    color: var(--page-faq-glow);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-faq__link:hover {
    color: var(--page-faq-gold);
    text-decoration: underline;
}

.page-faq__image {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.page-faq__image--centered {
    margin-left: auto;
    margin-right: auto;
}

/* FAQ List Section */
.page-faq__faq-list {
    padding: 60px 0;
}

.page-faq__category-section {
    margin-bottom: 50px;
    border: 1px solid var(--page-faq-divider);
    border-radius: 10px;
    padding: 30px;
    background-color: var(--page-faq-card-bg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-faq__category-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    color: var(--page-faq-gold);
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid var(--page-faq-deep-green);
    padding-bottom: 15px;
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--page-faq-divider);
    border-radius: 8px;
    background-color: rgba(17, 39, 27, 0.7); /* Slightly lighter card bg for items */
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
    background-color: var(--page-faq-deep-green);
    border-color: var(--page-faq-glow);
    box-shadow: 0 0 15px rgba(87, 227, 141, 0.2);
}

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

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

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

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

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

.page-faq__faq-item[open] .page-faq__faq-toggle {
    color: var(--page-faq-gold);
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: var(--page-faq-text-secondary);
    line-height: 1.7;
}

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

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

/* CTA Bottom Section */
.page-faq__cta-bottom-section {
    padding: 60px 0;
    text-align: center;
}

/* Ensure content area images are at least 200px */
.page-faq img:not(.page-faq__hero-image) {
    min-width: 200px;
    min-height: 200px;
}

/* Specific rule for content images to prevent filter usage */
.page-faq__image {
    filter: none; /* Ensure no CSS filter is applied to content images */
}

/* Responsive Styles */
@media (max-width: 992px) {
    .page-faq__hero-content {
        margin-top: -60px; /* Adjust overlap */
    }
    .page-faq__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-faq__description {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding-bottom: 40px;
    }
    .page-faq__hero-image-wrapper {
        max-height: 400px;
    }
    .page-faq__hero-content {
        margin-top: -40px; /* Further adjust overlap */
        padding: 20px;
    }
    .page-faq__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: 15px;
    }
    .page-faq__description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 0.95rem;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__intro-section,
    .page-faq__faq-list,
    .page-faq__cta-bottom-section {
        padding: 40px 0;
    }
    .page-faq__section-title {
        font-size: clamp(1.5rem, 5vw, 2.2rem);
        margin-bottom: 20px;
    }
    .page-faq__text-block {
        font-size: 0.9rem;
    }
    .page-faq__category-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    .page-faq__category-title {
        font-size: clamp(1.3rem, 4.5vw, 1.8rem);
        margin-bottom: 20px;
    }
    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    .page-faq__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95rem;
    }

    /* Mobile image responsiveness */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .page-faq__container,
    .page-faq__category-section,
    .page-faq__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no horizontal scroll */
    }
    .page-faq__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
    .page-faq__hero-image-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 480px) {
    .page-faq__hero-image-wrapper {
        max-height: 300px;
    }
    .page-faq__hero-content {
        margin-top: -30px;
    }
    .page-faq__main-title {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}