/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Default body background is white */
}

/* Ensure padding for fixed header */
.page-faq__hero-section {
    padding-top: var(--header-offset, 120px); /* Desktop default */
    padding-bottom: 60px;
    background: linear-gradient(135deg, #017439, #B2D8B2); /* Gradient from primary to lighter green */
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-faq__hero-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-faq__main-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-faq__intro-text {
    font-size: 18px;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding/border are included in width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.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: #e02020;
    border-color: #e02020;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-faq__btn-secondary:hover {
    background-color: #005a2e;
    border-color: #005a2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__content-section {
    padding: 60px 0;
}

.page-faq__container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-faq__section-title {
    font-size: 32px;
    font-weight: bold;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.page-faq__section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #C30808;
    margin: 15px auto 0;
    border-radius: 2px;
}

.page-faq__section-title--light {
    color: #ffffff;
}

.page-faq__section-title--light::after {
    background-color: #FFFF00;
}

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

.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-faq__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-faq__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #017439;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 20px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #C30808;
    transform: rotate(45deg); /* A slight rotation to indicate active state */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* Ensure enough height for content */
    padding: 20px 25px !important;
    opacity: 1;
    border-top: 1px solid #e0e0e0;
}

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

.page-faq__faq-answer ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    color: #555555;
}

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

.page-faq__text-link {
    color: #017439;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-faq__text-link:hover {
    color: #C30808;
}

/* Section specific background colors */
.page-faq__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-faq__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

.page-faq__dark-bg p,
.page-faq__dark-bg li {
    color: #f0f0f0;
}

.page-faq__dark-bg .page-faq__text-link {
    color: #FFFF00;
}

.page-faq__dark-bg .page-faq__text-link:hover {
    color: #ffffff;
}

/* CTA Section at the bottom */
.page-faq__cta-section {
    padding: 80px 0;
    background-color: #f0f0f0;
    text-align: center;
}

.page-faq__cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-faq__cta-title {
    font-size: 32px;
    color: #017439;
    margin-bottom: 20px;
}

.page-faq__cta-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 40px;
}

.page-faq__cta-image {
    margin-top: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    max-width: 100%;
    height: auto;
    display: block; /* Ensure block for proper margin auto */
    margin-left: auto;
    margin-right: auto;
}

/* Responsive design */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 38px;
    }
    .page-faq__intro-text {
        font-size: 17px;
    }
    .page-faq__section-title {
        font-size: 28px;
    }
    .page-faq__faq-question h3 {
        font-size: 17px;
    }
    .page-faq__cta-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile override */
        padding-bottom: 40px;
    }
    .page-faq__main-title {
        font-size: 30px;
        margin-bottom: 15px;
    }
    .page-faq__intro-text {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 25px;
        font-size: 16px;
    }
    .page-faq__content-section {
        padding: 40px 0;
    }
    .page-faq__section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    .page-faq__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap; /* Allow wrapping for question text */
    }
    .page-faq__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px); /* Adjust width to make space for toggle */
    }
    .page-faq__faq-toggle {
        margin-left: 10px;
        font-size: 24px;
        width: 26px;
        height: 26px;
    }
    .page-faq__faq-answer {
        padding: 0 20px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px 20px !important;
    }
    .page-faq__cta-section {
        padding: 60px 0;
    }
    .page-faq__cta-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    .page-faq__cta-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Images responsiveness */
    .page-faq img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-faq__container,
    .page-faq__hero-container,
    .page-faq__cta-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: 26px;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        font-size: 15px;
        padding: 10px 20px;
    }
    .page-faq__section-title {
        font-size: 22px;
    }
    .page-faq__faq-question h3 {
        font-size: 15px;
    }
    .page-faq__cta-title {
        font-size: 22px;
    }
}