/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #FFFFFF; /* Default body background is white */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    padding-bottom: 40px; /* Adjust as needed, content below image */
    background-color: #f5f5f5; /* Light background for the section */
    overflow: hidden;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height of the hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-faq__hero-content {
    max-width: 900px;
    margin: 40px auto 0 auto;
    text-align: center;
    padding: 0 20px;
}

.page-faq__main-title {
    font-size: clamp(2em, 3.5vw, 3.2em); /* Responsive font size */
    font-weight: 700;
    color: #017439; /* Primary brand color for main title */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-faq__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-faq__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%; /* Ensure button adapts to container */
    box-sizing: border-box; /* Include padding and border in the element's total width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-faq__btn--primary {
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF;
    border: 2px solid #017439;
}

.page-faq__btn--primary:hover {
    background-color: #005f2e; /* Darker green on hover */
    border-color: #005f2e;
}

.page-faq__btn--secondary {
    background-color: #FFFFFF;
    color: #017439; /* Primary brand color for text */
    border: 2px solid #017439;
}

.page-faq__btn--secondary:hover {
    background-color: #f0f0f0;
    color: #005f2e;
    border-color: #005f2e;
}

/* Specific button styles for functional buttons */
.page-faq__btn--register,
.page-faq__btn--promo,
.page-faq__btn--download {
    background-color: #C30808; /* Custom red for register/promo/download */
    color: #FFFF00; /* Custom yellow for font */
    border: 2px solid #C30808;
}

.page-faq__btn--register:hover,
.page-faq__btn--promo:hover,
.page-faq__btn--download:hover {
    background-color: #a30606; /* Darker red on hover */
    border-color: #a30606;
}

.page-faq__btn--support {
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF;
    border: 2px solid #017439;
}

.page-faq__btn--support:hover {
    background-color: #005f2e;
    border-color: #005f2e;
}

/* Accordion/FAQ Section */
.page-faq__accordion-section {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.page-faq__section-title {
    font-size: 2.2em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.page-faq__faq-list {
    margin-top: 30px;
}

.page-faq__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-faq__faq-item[open] .page-faq__faq-question {
    background-color: #e0e0e0;
    border-bottom: 1px solid #d0d0d0;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default marker */
}

.page-faq__faq-question::-webkit-details-marker, /* Hide marker for Webkit browsers */
.page-faq__faq-question::marker { /* Hide marker for other browsers */
    display: none;
    content: "";
}

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

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    transform: rotate(45deg);
}

.page-faq__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: #555555;
}

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

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

.page-faq__faq-answer a {
    color: #017439;
    text-decoration: none;
    font-weight: 600;
}

.page-faq__faq-answer a:hover {
    text-decoration: underline;
}

/* General image and figure styling */
.page-faq__figure {
    margin: 25px 0;
    text-align: center;
}

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

.page-faq__figcaption {
    font-size: 0.9em;
    color: #777777;
    margin-top: 10px;
}

.page-faq__btn-container {
    margin-top: 20px;
    text-align: center;
}

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

.page-faq__dark-section {
    background-color: #017439; /* Primary brand color as background */
    color: #FFFFFF; /* White text for contrast */
}

.page-faq__dark-section .page-faq__section-title {
    color: #FFFFFF;
}

.page-faq__dark-section .page-faq__text-block {
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 1.1em;
}

.page-faq__dark-section a {
    color: #FFFF00; /* Yellow for links on dark background */
    text-decoration: underline;
}

.page-faq__dark-section a:hover {
    color: #f0f0f0;
}

/* Why Choose Us Section */
.page-faq__why-choose-us {
    padding: 60px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.page-faq__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.page-faq__feature-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: left;
}

.page-faq__feature-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-faq__feature-description {
    font-size: 0.95em;
    color: #555555;
}

/* Responsive Styles */

/* @media (max-width: 1024px) - Tablet */
@media (max-width: 1024px) {
    .page-faq__hero-content {
        margin-top: 20px;
    }

    .page-faq__main-title {
        font-size: clamp(2em, 4vw, 3em);
    }

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

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

    .page-faq__faq-answer {
        padding: 15px 20px;
    }

    .page-faq__features-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}


/* @media (max-width: 768px) - Mobile */
@media (max-width: 768px) {
    /* 1. Top section title + Dual CTA */
    .page-faq__hero-section {
        padding-top: 10px !important; /* Fixed header spacing */
        padding-bottom: 20px;
    }

    .page-faq__hero-image-wrapper {
        max-height: 300px; /* Smaller image on mobile */
    }

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

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

    .page-faq__intro-text {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        margin-top: 20px;
        padding: 0 15px; /* Add padding to button container */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .page-faq__btn {
        width: 100% !important; /* Ensure buttons take full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 2. Single column long text container */
    .page-faq__container {
        padding: 0 15px !important; /* Ensure content is within screen bounds */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-faq__accordion-section,
    .page-faq__tips-section,
    .page-faq__why-choose-us {
        padding: 40px 0;
    }

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

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

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

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

    /* 3. Generic images and figure */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    .page-faq__figure {
        margin: 15px 0;
    }
    
    /* Ensure any container holding images is also responsive */
    .page-faq__faq-answer,
    .page-faq__feature-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. Buttons and button containers */
    .page-faq__btn-container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* If multiple buttons are grouped horizontally in other sections */
    .page-faq__button-group { /* Example class if present */
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 5. Registration tutorial & FAQ blocks */
    .page-faq__features-grid {
        grid-template-columns: 1fr; /* Stack features vertically */
        gap: 20px;
        margin-top: 30px;
        margin-bottom: 40px;
    }

    .page-faq__feature-item {
        padding: 25px;
    }

    .page-faq__feature-title {
        font-size: 1.2em;
    }
    
    .page-faq__feature-description {
        font-size: 0.9em;
    }
}