.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #1a1a1a; /* Inherited from body, explicit for clarity */
}

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

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    padding: 80px 0;
    text-align: center;
    background-color: #017439; /* Main brand color for hero background */
    color: #ffffff;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-faq__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    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;
}

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

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-faq__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

.page-faq__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-faq__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

.page-faq__btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
}

/* Content Section */
.page-faq__content-section {
    padding: 60px 0;
    background-color: #1a1a1a; /* Dark background from body */
    color: #ffffff; /* Light text for dark background */
}

.page-faq__section-title {
    font-size: 2em;
    color: #017439; /* Brand color for section titles */
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 15px;
    position: relative;
}

.page-faq__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #017439;
    border-radius: 2px;
}

/* FAQ List */
.page-faq__faq-list {
    margin-top: 30px;
}

.page-faq__faq-item {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for FAQ items */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    color: #ffffff; /* Light text for FAQ items */
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.15); /* Even lighter for summary */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.page-faq__faq-item[open] > .page-faq__faq-question {
    background-color: rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid #017439;
}

.page-faq__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

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

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 20px;
    text-align: center;
}

.page-faq__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: #f0f0f0; /* Slightly off-white for body text */
}

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

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

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

.page-faq__faq-answer a {
    color: #017439; /* Brand color for links */
    text-decoration: underline;
}

.page-faq__faq-answer a:hover {
    color: #00a04a;
}

/* Details element specific styling */
.page-faq__faq-item[open] > .page-faq__faq-question + .page-faq__faq-answer {
    display: block; /* Ensure answer is visible when open */
}

.page-faq__faq-item > .page-faq__faq-question {
    list-style: none; /* Remove default marker */
}

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

/* Images in content */
.page-faq__image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
    object-fit: cover; /* Ensure images cover their area without distortion */
}

/* CTA Section */
.page-faq__cta-section {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1); /* Light background for CTA */
    padding: 40px;
    border-radius: 8px;
    margin-top: 40px;
    color: #ffffff; /* Light text for CTA */
}

.page-faq__cta-title {
    font-size: 2em;
    color: #017439; /* Brand color for CTA title */
    margin-bottom: 15px;
}

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

/* Responsive adjustments */
@media (max-width: 992px) {
    .page-faq__hero-title {
        font-size: 2.2em;
    }
    .page-faq__section-title {
        font-size: 1.8em;
    }
    .page-faq__faq-question {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .page-faq__container {
        padding: 0 15px;
    }
    .page-faq__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
    }
    .page-faq__hero-title {
        font-size: 1.8em;
    }
    .page-faq__hero-description {
        font-size: 1em;
    }
    .page-faq__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        margin: 0 auto; /* Center buttons */
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-faq__section-title {
        font-size: 1.5em;
    }
    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 0.95em;
    }
    .page-faq__faq-answer {
        padding: 15px 20px;
        font-size: 0.9em;
    }
    .page-faq__image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
        box-sizing: border-box !important;
    }
    .page-faq__content-section,
    .page-faq__cta-section,
    .page-faq__faq-list,
    .page-faq__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-faq__cta-section {
        padding: 30px 15px;
    }
    .page-faq__cta-title {
        font-size: 1.5em;
    }
    .page-faq__cta-description {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .page-faq__hero-title {
        font-size: 1.5em;
    }
    .page-faq__hero-description {
        font-size: 0.9em;
    }
    .page-faq__section-title {
        font-size: 1.3em;
    }
}

/* Ensure no filter on images */
.page-faq img {
    filter: none !important;
}

/* Color contrast enforcement - based on dark body background #1a1a1a */
.page-faq p,
.page-faq li,
.page-faq__hero-description,
.page-faq__faq-answer {
    color: #f0f0f0; /* Light grey for readability on dark background */
}

.page-faq__faq-question,
.page-faq__hero-title,
.page-faq__cta-title {
    color: #ffffff; /* White for titles */
}

.page-faq__section-title {
    color: #017439; /* Brand green for section titles - ensure contrast is met with background */
}

.page-faq a {
    color: #017439; /* Brand green for links */
}

/* Specific button colors as per requirements */
.page-faq__btn-primary {
    background-color: #C30808;
    color: #FFFF00;
    border-color: #C30808;
}

.page-faq__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}