/* style/faq.css */

/* Base styles for the page content wrapper */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text on light background */
    background-color: var(--secondary-color); /* Matches body background */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand color gradient */
    color: #ffffff; /* White text on dark gradient part */
    min-height: 300px;
}

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

.page-faq__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff; /* Ensure title is white */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.page-faq__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0; /* Slightly off-white for contrast */
}

/* Main Content Area */
.page-faq__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #ffffff; /* Explicit white background for content */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: -60px; /* Overlap with hero for visual flow */
    position: relative;
    z-index: 10;
}

.page-faq__section-title {
    font-size: 2em;
    color: #26A9E0; /* Brand color for main titles */
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.page-faq__section-intro {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 50px;
    color: #555555;
    line-height: 1.8;
}

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

/* FAQ Item */
.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease-in-out;
}

.page-faq__faq-item:hover {
    transform: translateY(-3px);
}

/* FAQ Question */
.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-item.active .page-faq__faq-question {
    border-color: #26A9E0;
    background-color: #f0f8ff; /* Light blue when active */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

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

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

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

/* Toggle Icon */
.page-faq__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #26A9E0; /* Brand color for toggle */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 20px;
    pointer-events: none; /* Prevents icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e0f2f7; /* Lighter brand color background */
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #ffffff;
    background-color: #26A9E0; /* Brand color when active */
    transform: rotate(180deg);
}

/* FAQ Answer */
.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-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    color: #555555;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* IMPORTANT: Ensures expansion */
    padding: 20px 25px !important; /* IMPORTANT: Ensures padding */
    opacity: 1;
    border-color: #26A9E0;
}

.page-faq__faq-answer p {
    margin-bottom: 1em;
}

.page-faq__faq-answer ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

.page-faq__faq-answer ul li {
    margin-bottom: 0.5em;
}

.page-faq__faq-answer strong {
    color: #26A9E0;
}

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

/* Call to Action at Bottom */
.page-faq__cta-bottom {
    background: #26A9E0; /* Brand color background */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    margin-top: 60px;
}

.page-faq__cta-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__cta-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-faq__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    line-height: 1.8;
    color: #f0f0f0;
}

/* Buttons */
.page-faq__cta-button,
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-faq__btn-primary {
    background: #EA7C07; /* Login orange color */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
    background: #d66f06;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
    background: #ffffff;
    color: #26A9E0; /* Brand color text */
    border: 2px solid #26A9E0;
}

.page-faq__btn-secondary:hover {
    background: #e0f2f7;
    color: #1a88bb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-faq__button-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 20px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: 2.2em;
    }
    .page-faq__hero-description {
        font-size: 1.1em;
    }
    .page-faq__section-title {
        font-size: 1.8em;
    }
    .page-faq__faq-question h3 {
        font-size: 1em;
    }
    .page-faq__cta-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-faq {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        font-size: 15px;
        line-height: 1.65;
    }

    .page-faq__hero-section {
        padding: 40px 15px;
        min-height: 250px;
    }

    .page-faq__hero-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-faq__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-faq__content-area {
        padding: 25px 15px;
        margin-top: -40px; /* Adjust overlap */
    }

    .page-faq__section-title {
        font-size: 1.6em;
        margin-bottom: 25px;
    }

    .page-faq__section-intro {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-faq__faq-item {
        margin-bottom: 10px;
    }
    .page-faq__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .page-faq__faq-question h3 {
        font-size: 0.95em;
        width: calc(100% - 40px); /* Adjust for toggle icon */
    }
    
    .page-faq__faq-toggle {
        font-size: 24px;
        width: 26px;
        height: 26px;
        margin-left: 10px;
    }

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

    .page-faq__image-content {
        margin: 15px auto;
        max-width: 100% !important; /* Force image to fit */
        width: 100% !important;
        height: auto !important;
        min-width: unset;
        min-height: unset;
    }

    .page-faq__cta-bottom {
        padding: 50px 15px;
        margin-top: 40px;
    }

    .page-faq__cta-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-faq__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    /* Buttons responsive */
    .page-faq__cta-button,
    .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;
        padding: 12px 25px;
        font-size: 16px;
        margin: 8px 0; /* Adjust margin for vertical stack */
    }

    .page-faq__button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        align-items: center; /* Center stacked buttons */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Ensure all image containers also respond */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by specific elements */
    }
}

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