/* style/faq.css */

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

.page-faq {
    font-family: Arial, sans-serif;
    background-color: var(--page-faq-main-bg); /* Ensure main content background matches the dark theme */
    color: var(--page-faq-text-main); /* Light text for dark background */
}

/* Container for max-width and centering */
.page-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Default padding for desktop */
    box-sizing: border-box;
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: var(--page-faq-main-bg); /* Match body background */
    overflow: hidden; /* Ensure no overflow */
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 400px; /* Ensure hero image is not too small */
    filter: brightness(0.7); /* Slightly darken image for text contrast, allowed as it's not changing color */
}

.page-faq__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    z-index: 1; /* Ensure content is above image if any slight overlap */
    color: var(--page-faq-text-main); /* Light text */
}

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

.page-faq__description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 40px;
    color: var(--page-faq-text-secondary);
}

.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 600px; /* Limit button group width */
    margin: 0 auto;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    text-align: center;
}

.page-faq__btn-primary {
    background: var(--page-faq-btn-gradient);
    color: var(--page-faq-text-main); /* White text for dark button */
    border: none;
}

.page-faq__btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

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

.page-faq__btn-secondary:hover {
    background: var(--page-faq-border);
    color: var(--page-faq-text-main);
    transform: translateY(-2px);
}

/* Introduction Section */
.page-faq__introduction-section {
    padding: 80px 0;
    background-color: var(--page-faq-dark-section); /* Use a darker background */
    color: var(--page-faq-text-main);
}

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

.page-faq__light-bg {
    background-color: var(--page-faq-main-bg); /* Use main bg for FAQ list to contrast with card bg */
    color: var(--page-faq-text-main);
}

.page-faq__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--page-faq-text-main);
}

.page-faq__section-title--dark {
    color: var(--page-faq-text-main); /* Ensure light text on dark background */
}

.page-faq__text-block {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 20px auto;
    color: var(--page-faq-text-secondary);
}

.page-faq__highlight {
    color: var(--page-faq-gold);
    font-weight: 700;
}

.page-faq__text-block a {
    color: var(--page-faq-glow);
    text-decoration: underline;
}
.page-faq__text-block a:hover {
    color: var(--page-faq-gold);
}


/* FAQ List Section */
.page-faq__faq-list-section {
    padding: 80px 0;
    background-color: var(--page-faq-main-bg); /* Main background for the overall section */
}

.page-faq__faq-category {
    margin-bottom: 60px;
    border-bottom: 1px solid var(--page-faq-divider);
    padding-bottom: 40px;
}
.page-faq__faq-category:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.page-faq__category-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--page-faq-gold);
    text-align: center;
}

.page-faq__faq-item {
    background-color: var(--page-faq-card-bg); /* Dark card background */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--page-faq-border);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--page-faq-text-main); /* Light text */
    cursor: pointer;
    background-color: var(--page-faq-deep-green); /* Slightly different dark background for question */
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

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

.page-faq__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-faq__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--page-faq-glow);
    font-weight: 300;
    width: 25px;
    text-align: center;
}

/* For <details> tag, hide default marker */
.page-faq__faq-item summary {
    list-style: none;
}
.page-faq__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-faq__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--page-faq-text-secondary); /* Secondary light text */
    max-height: 0; /* For JS based toggle */
    overflow: hidden; /* For JS based toggle */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* For JS based toggle */
}

/* Styles for <details> open state */
.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 2000px; /* Sufficiently large for content */
    padding-top: 20px;
}

/* Styles for JS-based active class */
.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important;
    padding-top: 20px;
}
.page-faq__faq-item.active .page-faq__faq-question .page-faq__faq-toggle {
    content: '−'; /* Updated by JS */
}


/* Contact Section */
.page-faq__contact-section {
    padding: 80px 0;
    background-color: var(--page-faq-card-bg); /* Dark background */
    color: var(--page-faq-text-main);
    text-align: center;
}
.page-faq__contact-section .page-faq__section-title {
    margin-bottom: 20px;
}
.page-faq__contact-section .page-faq__text-block {
    margin-bottom: 40px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-faq__description {
        font-size: 1.1rem;
    }
    .page-faq__section-title {
        font-size: 2.2rem;
    }
    .page-faq__category-title {
        font-size: 1.8rem;
    }
    .page-faq__faq-question {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .page-faq__container {
        padding: 0 15px;
    }

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

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

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

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to button container */
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .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;
      overflow: hidden !important;
    }


    .page-faq__introduction-section,
    .page-faq__faq-list-section,
    .page-faq__contact-section {
        padding: 40px 0;
    }

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

    .page-faq__text-block {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .page-faq__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }
    .page-faq__faq-answer {
        font-size: 0.9rem;
        padding: 0 20px 15px 20px;
    }
    .page-faq__faq-item[open] .page-faq__faq-answer,
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding-top: 15px;
    }

    /* Mobile image responsiveness */
    .page-faq img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-faq__section,
    .page-faq__card,
    .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-faq__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }

    /* Mobile video responsiveness (if any) */
    .page-faq video,
    .page-faq__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    .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;
    }
    .page-faq__video-section {
      padding-top: 10px !important;
    }
    .page-faq__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }
}