/* style/faq.css */

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

.page-faq {
    background-color: var(--page-faq-background);
    color: var(--page-faq-text-main);
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

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

.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* body handles --header-offset */
    padding-bottom: 60px;
    background-color: var(--page-faq-background);
    overflow: hidden;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    min-height: 200px; /* Ensure minimum size */
}

.page-faq__hero-content {
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
}

.page-faq__main-title {
    font-size: clamp(2em, 3.5vw, 2.8em);
    color: var(--page-faq-text-main);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.page-faq__hero-description {
    font-size: 1.1em;
    color: var(--page-faq-text-secondary);
    margin-bottom: 30px;
}

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

.page-faq__section-title {
    font-size: clamp(1.8em, 3vw, 2.5em);
    color: var(--page-faq-text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

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

.page-faq__faq-item[open] {
    box-shadow: 0 0 20px rgba(87, 227, 141, 0.2);
}

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

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* For details/summary */
}

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

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

.page-faq__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--page-faq-text-secondary);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

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

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

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-faq__faq-answer li {
    margin-bottom: 8px;
}

.page-faq__image-with-caption {
    margin: 25px 0;
    text-align: center;
}

.page-faq__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px;
}

.page-faq__image-caption {
    font-size: 0.9em;
    color: var(--page-faq-text-secondary);
    margin-top: 10px;
}

.page-faq__cta-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--page-faq-background);
}

.page-faq__dark-section {
    background-color: var(--page-faq-deep-green);
    border-radius: 15px;
    padding: 40px 20px;
    color: var(--page-faq-text-main);
    max-width: 900px;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word;
    max-width: 100%;
    width: auto; /* Default for desktop */
}

.page-faq__btn-primary {
    background: var(--page-faq-button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(87, 227, 141, 0.4);
}

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

.page-faq__btn-secondary:hover {
    background-color: var(--page-faq-glow);
    color: var(--page-faq-deep-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(87, 227, 141, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-faq__container,
    .page-faq__hero-content,
    .page-faq__faq-list,
    .page-faq__dark-section,
    .page-faq__cta-buttons {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    .page-faq__hero-section {
        padding-bottom: 40px;
    }

    .page-faq__main-title {
        font-size: clamp(1.8em, 8vw, 2.5em);
        margin-bottom: 15px;
    }

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

    .page-faq__section-title {
        font-size: clamp(1.6em, 7vw, 2em);
    }

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

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

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

    .page-faq__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px;
        padding: 12px 20px;
        font-size: 1em;
    }

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

    .page-faq__hero-image-wrapper {
        max-height: 300px;
    }

    .page-faq__hero-image {
        min-height: 250px;
    }

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

    .page-faq__dark-section {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: clamp(1.6em, 9vw, 2em);
    }
    .page-faq__section-title {
        font-size: clamp(1.4em, 8vw, 1.8em);
    }
}