/* style/faq.css */

:root {
    --primary-color: #0056b3;
    --secondary-color: #ffc107;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-dark: #0a0a0a; /* From shared.css body background */
    --border-light: #e0e0e0;
    --background-light-grey: #f9f9f9;
}

.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Dark body background requires light text */
    background-color: var(--background-dark);
}

/* Ensure content is not hidden by fixed header */
.page-faq__hero-section {
    padding-top: 120px; /* Desktop: Adjust based on fixed header height */
    padding-bottom: 60px;
    text-align: center;
}

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

.page-faq__hero-title {
    font-size: 3.2em;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-faq__hero-subtitle {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

.page-faq__introduction-section {
    padding: 60px 20px;
    background-color: var(--background-light-grey);
    color: var(--text-dark);
    text-align: center;
}

.page-faq__faq-list-section {
    padding: 60px 20px;
    background-color: var(--background-light-grey);
    color: var(--text-dark);
}

.page-faq__cta-section {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #003366);
    color: var(--text-light);
}

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

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

.page-faq__introduction-section .page-faq__section-title,
.page-faq__faq-list-section .page-faq__section-title {
    color: var(--text-dark);
}

.page-faq__cta-section .page-faq__section-title {
    color: var(--text-light);
}

.page-faq__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.7;
}

.page-faq__highlight {
    font-weight: bold;
    color: var(--primary-color);
}

.page-faq__introduction-section .page-faq__highlight {
    color: var(--primary-color);
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.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 15px;
    opacity: 0;
    background: var(--background-light-grey);
    color: var(--text-dark);
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to cover any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f0f0f0;
    border-radius: 0 0 5px 5px;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-faq__faq-question:hover {
    background: var(--background-light-grey);
    border-color: #d0d0d0;
}

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

.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Allow click on parent div */
    color: var(--text-dark);
}

.page-faq__faq-question h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-faq__faq-question h3 a:hover {
    color: #003d82; /* Darker primary color on hover */
    text-decoration: underline;
}

.page-faq__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Allow click on parent div */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg);
}

.page-faq__faq-answer p {
    margin: 0;
    color: var(--text-dark);
    font-size: 1em;
}

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

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

.page-faq__btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
    background: #e6b300; /* Slightly darker secondary color */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: 2.8em;
    }
    .page-faq__hero-subtitle {
        font-size: 1.1em;
    }
    .page-faq__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    /* Mobile: Adjust padding-top for fixed header */
    .page-faq__hero-section {
        padding-top: 100px !important; /* Mobile: Adjust based on fixed header height */
        padding-bottom: 40px;
    }
    .page-faq__introduction-section,
    .page-faq__faq-list-section,
    .page-faq__cta-section {
        padding: 30px 15px;
    }
    .page-faq__hero-title {
        font-size: 2.2em;
    }
    .page-faq__hero-subtitle {
        font-size: 1em;
    }
    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-faq__text-block {
        font-size: 0.95em;
    }
    .page-faq__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-faq__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px !important;
    }
    .page-faq__btn-primary {
        padding: 12px 30px;
        font-size: 1em;
    }
    /* Ensure images are responsive and do not cause horizontal scroll */
    .page-faq img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-faq__dark-section {
        background: linear-gradient(135deg, var(--primary-color), #003366);
    }
}

/* Specific styles for dark/light sections to ensure contrast */
.page-faq__dark-section {
    background: linear-gradient(135deg, var(--primary-color), #003366);
    color: var(--text-light);
}
.page-faq__dark-section .page-faq__section-title {
    color: var(--text-light);
}
.page-faq__dark-section .page-faq__text-block {
    color: rgba(255, 255, 255, 0.9);
}
.page-faq__dark-section .page-faq__highlight {
    color: var(--secondary-color);
}