/* style/faq.css */

/* Variables for colors based on the provided scheme */
:root {
    --page-faq-primary-color: #2F6BFF;
    --page-faq-secondary-color: #6FA3FF;
    --page-faq-text-main: #1F2D3D;
    --page-faq-text-dark: #000000;
    --page-faq-card-bg: #FFFFFF;
    --page-faq-background: #F4F7FB;
    --page-faq-border-color: #D6E2FF;
    --page-faq-glow-color: #A5C4FF;
    --page-faq-button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
}

.page-faq {
    color: var(--page-faq-text-main); /* Default text color for light background */
    background-color: var(--page-faq-background); /* Default background color */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Example font */
    line-height: 1.6;
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    background-color: var(--page-faq-primary-color); /* Base background for hero */
    color: #FFFFFF; /* White text on primary color background */
    overflow: hidden; /* Ensure no overflow */
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px; /* Space between image and content */
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 12px;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-faq__hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-faq__main-title {
    font-size: clamp(2em, 3.5vw, 3.2em); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.page-faq__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.page-faq__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    width: 100%;
    max-width: 100%; /* Ensure container responsiveness */
    box-sizing: border-box;
    overflow: hidden;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
}

.page-faq__btn-primary {
    background: var(--page-faq-button-gradient);
    color: #FFFFFF;
    border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

.page-faq__btn-secondary {
    background: #FFFFFF;
    color: var(--page-faq-primary-color);
    border: 2px solid var(--page-faq-primary-color);
}

.page-faq__btn-secondary:hover {
    background: var(--page-faq-primary-color);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(47, 107, 255, 0.2);
}

/* FAQ Section */
.page-faq__faq-section {
    padding: 80px 20px;
    background-color: var(--page-faq-background);
    color: var(--page-faq-text-main);
}

.page-faq__container {
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%; /* Ensure container responsiveness */
}

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

.page-faq__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--page-faq-text-main);
}

.page-faq__faq-item {
    background: var(--page-faq-card-bg);
    border: 1px solid var(--page-faq-border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden; /* For details tag */
}

.page-faq__faq-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--page-faq-text-dark);
    cursor: pointer;
    user-select: none;
    background-color: #F8F9FA; /* Slightly different background for question */
    border-bottom: 1px solid var(--page-faq-border-color);
}

.page-faq__faq-item[open] .page-faq__faq-question {
    border-bottom: 1px solid var(--page-faq-border-color);
    background-color: var(--page-faq-card-bg);
}

.page-faq__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--page-faq-primary-color);
    transition: transform 0.3s ease;
}

/* For details tag, hide default marker */
.page-faq__faq-item summary {
    list-style: none;
}
.page-faq__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-faq__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--page-faq-text-main);
    background-color: var(--page-faq-card-bg);
    border-top: none;
}

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

.page-faq__faq-answer p:last-child {
    margin-bottom: 0;
}

.page-faq__faq-answer a {
    color: var(--page-faq-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.page-faq__faq-answer a:hover {
    text-decoration: underline;
}

/* CTA Section */
.page-faq__cta-section {
    padding: 80px 20px;
    background: var(--page-faq-primary-color); /* Use primary color for CTA background */
    color: #FFFFFF;
    text-align: center;
}

.page-faq__cta-title {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.page-faq__cta-description {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-faq__cta-buttons--center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}


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

/* Ensure content area images are not too small */
.page-faq__faq-answer img {
    min-width: 200px;
    min-height: 200px;
    object-fit: contain; /* or cover, depending on desired effect */
    margin: 15px 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-faq__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body already handles --header-offset */
    }

    .page-faq__main-title {
        font-size: clamp(1.8em, 8vw, 2.5em); /* Adjust H1 for mobile */
        margin-bottom: 15px;
    }

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

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__faq-section,
    .page-faq__cta-section {
        padding: 40px 15px;
    }

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

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

    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-faq__faq-answer {
        padding: 15px 20px;
        font-size: 0.95em;
    }

    /* Mobile image responsiveness (mandatory) */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__hero-image-wrapper,
    .page-faq__cta-buttons,
    .page-faq__cta-buttons--center {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Video responsiveness (if any, though not explicitly in FAQ for now) */
    .page-faq video,
    .page-faq__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-faq__video-section,
    .page-faq__video-container,
    .page-faq__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important;
    }
    .page-faq__video-section {
        padding-top: 10px !important;
    }
}