/* style/faq.css */

/* Base Styles for FAQ Page */
.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #f9f9f9; /* Light background for the main content area */
}

/* 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;
    padding-top: var(--header-offset, 120px); /* Ensure spacing from fixed header */
    background: linear-gradient(135deg, #26A9E0, #34B3EB); /* Brand color gradient */
    color: #ffffff; /* White text for dark background */
    overflow: hidden; /* Prevent image overflow */
}

.page-faq__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Ensure content is above any potential background effects */
}

.page-faq__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.page-faq__intro-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    line-height: 1.5;
    color: #f0f0f0;
}

.page-faq__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-faq__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* CTA Button */
.page-faq__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for CTA */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button:hover {
    background: #d66f06;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Content Section */
.page-faq__content-section {
    padding: 60px 20px;
    background-color: #ffffff; /* White background for content */
}

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

.page-faq__section-title {
    font-size: 2.5em;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

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

/* FAQ Item */
.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ Question */
.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    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: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

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

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg); /* Plus becomes an X */
    color: #EA7C07;
    background-color: #fce8d7;
}

/* 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: #fcfcfc;
    border-radius: 0 0 10px 10px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* Use !important for priority, value large enough for any 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 img {
    margin: 15px 0;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Enforce minimum size for content images */
    min-height: 200px; /* Enforce minimum size for content images */
}

/* General Button Styles within content */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* For mobile responsiveness */
    box-sizing: border-box; /* For mobile responsiveness */
    white-space: normal; /* Allow text wrap for buttons */
    word-wrap: break-word; /* Allow text wrap for buttons */
}

.page-faq__btn-primary {
    background: #26A9E0;
    color: #ffffff;
    border: 2px solid #26A9E0;
}

.page-faq__btn-primary:hover {
    background: #1e87bb;
    border-color: #1e87bb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 2.8em;
    }
    .page-faq__intro-description {
        font-size: 1.1em;
    }
    .page-faq__section-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-faq__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-faq__intro-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-faq__hero-image img {
        border-radius: 8px;
    }
    .page-faq__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        width: 100% !important; /* Ensure button full width on mobile */
        max-width: 300px !important; /* Max width for better appearance */
        margin-left: auto;
        margin-right: auto;
        display: block; /* Ensure block display for margin auto to work */
    }

    .page-faq__content-section {
        padding: 40px 15px;
    }
    .page-faq__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-faq__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap; /* Allow question text to wrap */
    }
    .page-faq__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px); /* Adjust width for toggle icon */
    }
    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 25px;
        height: 25px;
        font-size: 1.5em;
    }
    .page-faq__faq-answer {
        padding: 0 20px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px 20px !important;
    }

    /* Mobile image responsiveness */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: unset !important; /* Reset min-width for mobile */
        min-height: unset !important; /* Reset min-height for mobile */
    }

    .page-faq__container,
    .page-faq__hero-container,
    .page-faq__faq-item,
    .page-faq__faq-question,
    .page-faq__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Mobile button responsiveness */
    .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;
        margin-left: auto;
        margin-right: auto;
        display: block; /* Ensure block display for margin auto to work */
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: 1.8em;
    }
    .page-faq__intro-description {
        font-size: 0.95em;
    }
    .page-faq__section-title {
        font-size: 1.8em;
    }
    .page-faq__faq-question h3 {
        font-size: 0.95em;
    }
}