/* style/faq.css */

/* --- Base Styles --- */
.page-faq {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #f8f9fa; /* Light background for the FAQ content */
}

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

/* --- Hero Banner Section --- */
.page-faq__hero-banner {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    color: #ffffff; /* Light text for dark banner */
    text-align: center;
    overflow: hidden; /* Ensure image doesn't overflow */
    background-color: #0A192F; /* Fallback background for banner */
}

.page-faq__hero-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-faq__banner-image {
    width: 100%;
    height: 400px; /* Fixed height for banner */
    object-fit: cover; /* Cover the area, crop if necessary */
    display: block;
    filter: brightness(0.5); /* Darken image for text readability */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__main-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFD700; /* Gold for main title */
}

.page-faq__intro-text {
    font-size: 18px;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-faq__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FFD700; /* Gold button */
    color: #0A192F; /* Dark blue text for gold button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Content Section --- */
.page-faq__content-section {
    padding: 60px 0;
    background-color: #f8f9fa; /* Light background for general content */
}

.page-faq__faq-list {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

/* --- FAQ Item Styles --- */
.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #fff;
    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;
}

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

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

.page-faq__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #FFD700; /* Gold for toggle icon */
    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: 32px;
    height: 32px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #0A192F; /* Dark blue when active */
    transform: rotate(45deg); /* Rotate for minus sign effect */
}

.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-color: #fdfdfd;
    color: #555555; /* Slightly lighter dark text for answers */
    border-top: 1px solid #eee;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* Use !important and large value for expansion */
    padding: 20px 25px !important;
    opacity: 1;
}

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

.page-faq__faq-answer a {
    color: #0A192F; /* Dark blue for links in answers */
    text-decoration: underline;
}

.page-faq__faq-answer a:hover {
    color: #FFD700; /* Gold on hover */
}

.page-faq__answer-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Enforce minimum size for content images */
    min-height: 200px; /* Enforce minimum size for content images */
}

/* --- Global Image & Button Responsive Adaptations (Crucial for mobile) --- */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-faq__cta-button,
.page-faq a[class*="button"],
.page-faq a[class*="btn"] {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__button-group,
.page-faq__btn-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 36px;
    }
    .page-faq__intro-text {
        font-size: 16px;
    }
    .page-faq__hero-content {
        padding: 40px 20px;
    }
}

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

    .page-faq__banner-image {
        height: 300px; /* Adjust banner height for mobile */
    }

    .page-faq__hero-content {
        padding: 30px 15px;
    }

    .page-faq__main-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-faq__intro-text {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .page-faq__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }

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

    .page-faq__faq-list {
        padding: 20px;
    }

    .page-faq__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap; /* Allow question and toggle to wrap if needed */
    }

    .page-faq__faq-question h3 {
        font-size: 16px;
        width: calc(100% - 40px); /* Adjust width for toggle icon */
        margin-bottom: 5px; /* Add small margin if wraps */
    }

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

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

    /* Mobile image adaptation */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-faq__section,
    .page-faq__card,
    .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile button adaptation */
    .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;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-faq__cta-buttons,
    .page-faq__button-group,
    .page-faq__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    
    .page-faq__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}

/* Color Contrast Safeguards - Based on default light body background */
.page-faq {
    color: #333333; /* Default text color for light backgrounds */
}

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

.page-faq__light-bg {
    background: #ffffff;
    color: #333333;
}

.page-faq__medium-bg {
    background: #FFD700;
    color: #0A192F; /* Dark text for gold background */
}

.page-faq p,
.page-faq li {
    color: #555555;
}

.page-faq h1, .page-faq h2, .page-faq h3, .page-faq h4, .page-faq h5, .page-faq h6 {
    color: #0A192F; /* Default heading color */
}

.page-faq__main-title {
    color: #FFD700; /* Specific color for hero title */
}

.page-faq__faq-question h3 {
    color: #0A192F;
}

.page-faq__faq-toggle {
    color: #FFD700;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #0A192F;
}

.page-faq__cta-button {
    background: #FFD700;
    color: #0A192F;
}
.page-faq__cta-button:hover {
    background: #e6c200;
    color: #0A192F;
}

/* Ensure no CSS filter changes image color */
.page-faq img {
    filter: none !important; /* Strictly no color-altering filters */
}

/* Ensure content area images are not too small */
.page-faq__content-section img {
  min-width: 200px;
  min-height: 200px;
}