/* style/faq.css */

/* General styling for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
    padding-top: 0; /* Assumes shared.css handles body padding-top */
}

/* Hero Section */
.page-faq__hero-section {
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF; /* White text for dark background */
    padding: 80px 20px;
    text-align: center;
    position: relative;
    /* If shared.css does NOT apply padding-top to body, then uncomment below: */
    /* padding-top: calc(80px + var(--header-offset, 120px)); */
}

.page-faq__hero-section .page-faq__container {
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__main-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF;
}

.page-faq__intro-text {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #FFFFFF;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary {
    background-color: #C30808; /* Custom color for register/login type buttons */
    color: #FFFF00; /* Custom font color */
    border: 2px solid #C30808;
    margin-top: 15px;
}

.page-faq__btn-primary:hover {
    background-color: #E00A0A;
    border-color: #E00A0A;
    color: #FFFFFF;
}

.page-faq__btn-secondary {
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF;
    border: 2px solid #017439;
    margin-top: 15px;
}

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

/* FAQ List Section */
.page-faq__faq-list-section {
    padding: 60px 20px;
    background-color: #f8f8f8; /* Light background for contrast */
    color: #333333;
}

.page-faq__container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-faq__section-title {
    font-size: 2.2em;
    color: #017439; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-faq__faq-category {
    margin-bottom: 40px;
}

.page-faq__category-title {
    font-size: 1.8em;
    color: #017439;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* FAQ Item Styling (using <details> and <summary>) */
.page-faq__faq-item {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    list-style: none; /* Remove default marker for summary */
}

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

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

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

.page-faq__faq-item[open] .page-faq__faq-toggle {
    transform: rotate(0deg); /* No rotation needed for -/+ */
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
}

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

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

.page-faq__faq-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 8px;
}

.page-faq__link-text {
    color: #017439;
    text-decoration: underline;
    font-weight: bold;
}

.page-faq__link-text:hover {
    color: #005f2e;
}

/* Call to Action Section */
.page-faq__cta-section {
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF;
    padding: 60px 20px;
    text-align: center;
    margin-top: 40px;
    border-radius: 8px;
}

.page-faq__cta-title {
    font-size: 2em;
    margin-bottom: 15px;
    color: #FFFFFF;
    font-weight: bold;
}

.page-faq__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-faq__main-title {
        font-size: 2em;
    }

    .page-faq__intro-text {
        font-size: 1em;
    }

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

    .page-faq__category-title {
        font-size: 1.5em;
    }

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

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

    .page-faq__hero-section,
    .page-faq__faq-list-section,
    .page-faq__cta-section {
        padding-left: 15px;
        padding-right: 15px;
    }

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

    /* Mobile container adaptation */
    .page-faq__container,
    .page-faq__hero-section,
    .page-faq__faq-list-section,
    .page-faq__cta-section,
    .page-faq__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* Mobile button adaptation */
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        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;
    }

    .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;
    }
}