/* style/faq.css */

/* Variables */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color: #333333;
    --background-color: #f8f8f8; /* Assuming light background for body */
    --accent-red: #C30808; /* For register/login buttons */
    --accent-yellow: #FFFF00; /* For register/login button text */
    --border-color: #e0e0e0;
    --light-grey: #f9f9f9;
}

.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding-top: 0; /* Assuming shared.css handles body padding-top */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Blend of brand colors */
    color: var(--secondary-color); /* White text on darker top part */
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
}

.page-faq__hero-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-faq__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--secondary-color);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-faq__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: var(--secondary-color);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary {
    background: var(--accent-red); /* Custom color for Register */
    color: var(--accent-yellow); /* Custom font color for Register */
    border: 2px solid var(--accent-red);
}

.page-faq__btn-primary:hover {
    background: #A30707; /* Darker shade of #C30808 */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
    background: var(--primary-color); /* Brand primary color for Login */
    color: var(--secondary-color); /* White text on primary color */
    border: 2px solid var(--primary-color);
}

.page-faq__btn-secondary:hover {
    background: #005C2E; /* Darker shade of #017439 */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Content Section */
.page-faq__content-section {
    padding: 60px 20px;
    background-color: var(--light-grey); /* Light background for content */
    color: var(--text-color);
}

.page-faq__container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px; /* Inner padding for container */
}

.page-faq__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-faq__section-intro {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555;
}

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

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

.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 15px;
    opacity: 0;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* Sufficiently large for content */
    padding: 20px 15px !important;
    opacity: 1;
    background: var(--secondary-color); /* White background for answers */
    border-radius: 0 0 5px 5px;
}

.page-faq__faq-answer p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.page-faq__faq-answer ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.page-faq__faq-answer li {
    margin-bottom: 5px;
    color: var(--text-color);
}

.page-faq__faq-answer .page-faq__btn-primary,
.page-faq__faq-answer .page-faq__btn-secondary {
    margin-top: 15px;
    margin-right: 10px;
    padding: 10px 20px;
    font-size: 0.95em;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color); /* White background for questions */
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-faq__faq-question:hover {
    background: var(--light-grey);
    border-color: #d0d0d0;
}

.page-faq__faq-question:active {
    background: #eeeeee;
}

.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color); /* Primary color for question text */
    pointer-events: none;
}

.page-faq__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg); /* Rotate for 'x' effect, or simply change text */
}

/* Images within FAQ answers */
.page-faq__faq-image {
    width: 100%;
    height: auto;
    max-width: 600px; /* Example max-width for content images */
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* General image and button responsiveness */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-faq {
        font-size: 15px;
        line-height: 1.5;
    }

    .page-faq__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-faq__main-title {
        font-size: 2.2em;
    }

    .page-faq__hero-description {
        font-size: 1em;
    }

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

    .page-faq__content-section {
        padding: 40px 10px;
    }

    .page-faq__container {
        padding: 0 10px;
    }

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

    .page-faq__section-intro {
        font-size: 0.95em;
    }

    .page-faq__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }

    .page-faq__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }

    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }

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

    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px !important;
    }

    /* Mobile image adaptation */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-faq__hero-section,
    .page-faq__content-section,
    .page-faq__container,
    .page-faq__faq-item,
    .page-faq__hero-cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}