/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light background */
    background-color: var(--bg-color, #ffffff); /* Fallback to white if --bg-color is not defined */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    background: linear-gradient(135deg, #017439, #005f2f); /* Brand primary color gradient */
    color: #ffffff; /* White text for dark background */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    box-sizing: border-box;
}

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

.page-faq__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
    line-height: 1.2;
}

.page-faq__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

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

/* Video Section */
.page-faq__video-section {
    padding: 80px 20px;
    background-color: #f5f5f5; /* Light background */
    text-align: center;
    box-sizing: border-box;
}

.page-faq__video-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #017439;
}

.page-faq__video-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555555;
}

.page-faq__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 1000px; /* Limit video width */
    margin: 0 auto;
    background-color: #000;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer; /* Indicate clickability */
}

.page-faq__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

/* Content Area - FAQ List */
.page-faq__content-area {
    padding: 80px 20px;
    background-color: #ffffff; /* Explicitly white background for content */
    box-sizing: border-box;
}

.page-faq__section-title {
    font-size: 2.8em;
    color: #017439;
    text-align: center;
    margin-bottom: 60px;
    font-weight: bold;
}

.page-faq__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.3em;
    font-weight: bold;
    color: #333333;
    background-color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default marker for details summary */
}

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

.page-faq__faq-item[open] .page-faq__faq-question {
    background-color: #eaf7ed; /* Lighter green background when open */
    color: #017439;
}

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

.page-faq__faq-toggle {
    font-size: 1.8em;
    line-height: 1;
    margin-left: 15px;
    color: #017439;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    color: #017439;
}

.page-faq__faq-answer {
    padding: 0 25px 25px;
    font-size: 1.1em;
    color: #555555;
    line-height: 1.8;
    max-height: 0; /* Initially hidden */
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding-top: 0; /* Initial padding-top 0 */
}

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

.page-faq__faq-answer img {
    margin: 20px 0;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-faq__faq-answer .page-faq__btn-primary,
.page-faq__faq-answer .page-faq__btn-secondary {
    margin-top: 15px;
    display: inline-block;
    margin-right: 10px;
}

/* Buttons */
.page-faq__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(195, 8, 8, 0.4);
}

.page-faq__btn-primary:hover {
    background-color: #a30606;
    transform: translateY(-2px);
}

.page-faq__btn-secondary {
    display: inline-block;
    background-color: #ffffff;
    color: #017439; /* Brand primary color */
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    border: 2px solid #017439;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-faq__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: 2.8em;
    }

    .page-faq__section-title {
        font-size: 2.4em;
    }

    .page-faq__faq-question {
        font-size: 1.2em;
        padding: 18px 20px;
    }

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

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure space for fixed header on mobile */
        min-height: 300px;
    }
    
    .page-faq__hero-title {
        font-size: 2.2em;
    }

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

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

    .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;
        font-size: 1em;
    }
    .page-faq__hero-cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-faq__video-section,
    .page-faq__content-area {
        padding: 40px 15px;
    }

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

    .page-faq__video-title {
        font-size: 2em;
    }

    .page-faq__video-description {
        font-size: 0.95em;
    }

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

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

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

    /* Mobile image and video responsiveness */
    .page-faq img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-faq video,
    .page-faq__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__video-section,
    .page-faq__video-container,
    .page-faq__video-wrapper,
    .page-faq__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-faq__faq-list {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-faq__faq-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}