/* style/faq.css */

/* Variables from custom colors */
:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    --card-bg-color: #10233F;
    --text-main-color: #F3F8FF;
    --text-secondary-color: #AFC4E8;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy-color: #08162B; /* Body background from shared.css */
}

.page-faq {
    font-family: Arial, sans-serif;
    color: var(--text-main-color); /* Main text color for the page, suitable for dark body background */
    background-color: var(--deep-navy-color); /* Inherited from body, but good to set explicitly if needed for specific sections */
    line-height: 1.6;
}

.page-faq__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background-color: var(--deep-navy-color);
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height to prevent image from being too tall */
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and text */
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    min-height: 200px; /* Minimum image size */
}

.page-faq__hero-content {
    max-width: 900px;
    padding: 0 20px;
    z-index: 1;
}

.page-faq__main-title {
    font-size: clamp(2em, 4vw, 2.8em); /* Use clamp for H1 font size */
    font-weight: 700;
    color: var(--gold-color); /* Using gold for main title for prominence */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-faq__description {
    font-size: 1.1em;
    color: var(--text-secondary-color);
    margin-bottom: 30px;
}

.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word;
    text-align: center;
}

.page-faq__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main-color);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary {
    background: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
}

.page-faq__btn-secondary:hover {
    background: var(--gold-color);
    color: var(--deep-navy-color);
    transform: translateY(-2px);
}

.page-faq__inline-link {
    color: var(--gold-color);
    text-decoration: underline;
    padding: 0;
    background: none;
    border: none;
    font-weight: normal;
    font-size: 1em;
}

.page-faq__inline-link:hover {
    color: var(--glow-color);
    text-decoration: none;
}

.page-faq__faq-list-section {
    padding: 60px 0;
    background-color: var(--deep-navy-color);
}

.page-faq__container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

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

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

.page-faq__faq-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

details.page-faq__faq-item {
    margin-bottom: 0; /* Gap is handled by parent flex container */
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg-color); /* Dark card background */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

details.page-faq__faq-item summary.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
    color: var(--text-main-color);
    font-weight: 600;
}
details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
    display: none;
}
details.page-faq__faq-item summary.page-faq__faq-question:hover {
    background: rgba(var(--primary-color), 0.5); /* Lighter hover for dark background */
}

.page-faq__faq-qtext {
    flex: 1;
    font-size: 1.1em;
    line-height: 1.5;
    text-align: left;
}

.page-faq__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: var(--gold-color);
    flex-shrink: 0;
    margin-left: 15px;
    width: 30px;
    text-align: center;
}

details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 25px 20px;
    background: var(--card-bg-color);
    border-top: 1px solid var(--divider-color);
    border-radius: 0 0 10px 10px;
    color: var(--text-secondary-color);
}

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

.page-faq__cta-section {
    padding: 80px 0;
    background-color: var(--primary-color);
    text-align: center;
}

.page-faq__cta-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-faq__cta-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: left;
}

.page-faq__cta-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-faq__cta-description {
    font-size: 1.1em;
    color: var(--text-secondary-color);
    margin-bottom: 30px;
}

.page-faq__cta-buttons-bottom {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.page-faq__cta-image-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-faq__cta-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    min-height: 200px;
}

/* --- Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    /* 1. Hero Section */
    .page-faq__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 40px;
    }

    .page-faq__hero-image-wrapper {
        margin-bottom: 20px;
    }

    .page-faq__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

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

    .page-faq__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        text-align: center;
    }

    .page-faq__description {
        font-size: 1em;
        text-align: center;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    /* 2. Buttons */
    .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,
    .page-faq__cta-buttons-bottom {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 15px;
        flex-direction: column; /* Ensure vertical stacking for multiple buttons */
    }

    /* 3. FAQ List Section */
    .page-faq__faq-list-section {
        padding: 40px 0;
    }

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

    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

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

    details.page-faq__faq-item summary.page-faq__faq-question {
        padding: 15px 20px;
    }

    .page-faq__faq-qtext {
        font-size: 1em;
    }

    .page-faq__faq-toggle {
        font-size: 24px;
        width: 25px;
    }

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

    /* 4. CTA Section */
    .page-faq__cta-section {
        padding: 50px 0;
    }

    .page-faq__cta-container {
        flex-direction: column;
        gap: 30px;
    }

    .page-faq__cta-content {
        text-align: center;
        max-width: 100%;
        padding: 0 15px;
    }

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

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

    .page-faq__cta-image-wrapper {
        max-width: 100%;
        padding: 0 15px;
    }

    .page-faq__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* 5. Generic Images in content area */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .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;
    }
}

/* --- Responsive Styles (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .page-faq__hero-content {
        max-width: 700px;
    }
    .page-faq__container {
        padding: 0 30px;
    }
    .page-faq__cta-container {
        gap: 30px;
    }
    .page-faq__cta-content {
        max-width: 500px;
    }
    .page-faq__cta-image-wrapper {
        max-width: 400px;
    }
}