/* style/faq.css */
/* body đã padding-top: var(--header-offset) từ shared.css, không lặp lại ở đây */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --dark-text-color: #333333;
    --light-text-color: #FFFFFF;
    --section-bg-dark: #1a1a1a; /* Để đảm bảo tương phản với body --dark-bg-1 */
    --section-bg-light: #f8f8f8;
}

.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--light-text-color); /* Mặc định cho body nền tối */
}

.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text in DOM, then stack */
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    text-align: center;
    overflow: hidden;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 30px; /* Space between image and content */
}

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

.page-faq__hero-content {
    max-width: 900px;
    padding: 0 20px;
    color: var(--light-text-color);
}

.page-faq__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

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

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    max-width: 100%;
    width: auto;
}

.page-faq__btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: 2px solid var(--primary-color);
}

.page-faq__btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
}

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

.page-faq__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.page-faq__small-btn {
    padding: 8px 18px;
    font-size: 0.9rem;
    margin-top: 15px;
}

.page-faq__content-area {
    padding: 60px 20px;
    background-color: var(--section-bg-dark); /* Dark background for content */
    color: var(--light-text-color);
}

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

.page-faq__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-faq__section-description {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

.page-faq__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
    color: var(--light-text-color);
}

.page-faq__faq-item[open] {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--secondary-color);
    list-style: none; /* For <summary> tag */
}

.page-faq__faq-question::-webkit-details-marker {
    display: none;
}

.page-faq__faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    transform: rotate(45deg);
}

.page-faq__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

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

.page-faq__faq-answer ul {
    margin-left: 20px;
    list-style-type: disc;
}

.page-faq__faq-answer li {
    margin-bottom: 5px;
}

.page-faq__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-faq__image-grid-section {
    padding: 60px 20px;
    background-color: var(--section-bg-light); /* Light background */
    color: var(--dark-text-color);
}

.page-faq__image-grid-section .page-faq__section-title,
.page-faq__image-grid-section .page-faq__section-description {
    color: var(--dark-text-color);
}

.page-faq__image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.page-faq__grid-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

.page-faq__cta-section {
    padding: 60px 20px;
    text-align: center;
}

.page-faq__cta-section.page-faq__light-bg {
    background-color: var(--section-bg-light);
    color: var(--dark-text-color);
}

.page-faq__cta-section.page-faq__light-bg .page-faq__cta-title,
.page-faq__cta-section.page-faq__light-bg .page-faq__cta-description {
    color: var(--dark-text-color);
}

.page-faq__cta-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

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

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

    .page-faq__hero-section {
        padding-bottom: 40px;
    }

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

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

    .page-faq__main-title {
        font-size: 2.2rem;
    }

    .page-faq__hero-description {
        font-size: 1rem;
    }

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        align-items: center;
        gap: 10px;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important;
        max-width: 300px !important; /* Limit width to avoid stretching too wide */
        padding: 12px 15px !important;
        font-size: 1rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__content-area,
    .page-faq__image-grid-section,
    .page-faq__cta-section {
        padding: 40px 15px;
    }

    .page-faq__container {
        padding-left: 0;
        padding-right: 0;
    }

    .page-faq__section-title,
    .page-faq__cta-title {
        font-size: 2rem;
    }

    .page-faq__section-description,
    .page-faq__cta-description {
        font-size: 0.95rem;
    }

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

    .page-faq__faq-answer {
        padding: 0 15px 15px 15px;
        font-size: 0.95rem;
    }

    .page-faq__image-grid {
        grid-template-columns: 1fr;
    }

    /* Ensure all images are responsive on mobile */
    .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-section,
    .page-faq__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-faq__hero-section { padding-top: 10px !important; }
    .page-faq__video-section { padding-top: 10px !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__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;
    }
}

/* Color Contrast Adjustments */
/* Default text color for .page-faq is light (var(--light-text-color)) as body background is likely dark */

/* Sections with specific backgrounds */
.page-faq__dark-section {
    background-color: var(--section-bg-dark);
    color: var(--light-text-color);
}

.page-faq__light-bg {
    background-color: var(--section-bg-light);
    color: var(--dark-text-color);
}

.page-faq__image-grid-section .page-faq__section-title,
.page-faq__image-grid-section .page-faq__section-description,
.page-faq__image-grid-section p {
    color: var(--dark-text-color);
}

.page-faq__cta-section.page-faq__light-bg .page-faq__cta-title,
.page-faq__cta-section.page-faq__light-bg .page-faq__cta-description {
    color: var(--dark-text-color);
}

.page-faq__faq-item {
    color: var(--light-text-color);
}
.page-faq__faq-answer p,
.page-faq__faq-answer ul,
.page-faq__faq-answer li {
    color: rgba(255, 255, 255, 0.7);
}

.page-faq__faq-item[open] .page-faq__faq-question {
    color: var(--primary-color);
}