/* style/faq.css */
/* body đã padding-top: var(--header-offset); trang này không được viết lại */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #F5F7FA; /* Custom background color */
}

.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Nhỏ hơn var(--header-offset) */
    background-color: #E53935; /* Primary brand color for hero background */
    color: #ffffff; /* White text for dark background */
    text-align: center;
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin-bottom: 20px; /* Space between image and text */
    border-radius: 8px;
    max-width: 1200px; /* Limit image width */
}

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

.page-faq__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-faq__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-faq__btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Custom button color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary:hover {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
}

.page-faq__content-area {
    padding: 40px 20px;
    background-color: #F5F7FA; /* Light background for content */
    color: #333333;
}

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

.page-faq__dark-bg {
    background-color: #E53935; /* Primary brand color for dark sections */
    color: #ffffff;
    padding: 40px 20px;
}

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

.page-faq__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: inherit; /* Inherit color from parent section */
}

.page-faq__faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.page-faq__faq-category {
    background-color: #ffffff;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-faq__category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #E53935; /* Primary brand color for category titles */
}

.page-faq__category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-faq__category-list li {
    margin-bottom: 10px;
}

.page-faq__category-list a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-faq__category-list a:hover {
    color: #FF5A4F; /* Auxiliary brand color on hover */
}

.page-faq__faq-list-section {
    padding-bottom: 60px;
}

.page-faq__faq-item {
    background-color: #ffffff;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    color: #333333;
}

/* For native details items, content is shown when 'open' */
.page-faq__faq-item[open] .page-faq__faq-answer {
    padding-bottom: 20px;
    padding-top: 10px;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #E0E0E0;
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: #f0f0f0;
}

.page-faq__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    color: #E53935;
}

.page-faq__faq-answer p {
    margin-top: 15px;
    margin-bottom: 15px;
    color: #333333;
}

.page-faq__faq-answer a {
    color: #E53935;
    text-decoration: underline;
}

.page-faq__faq-image {
    width: 100%;
    height: auto;
    max-width: 800px;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    object-fit: cover;
}

.page-faq__cta-section {
    text-align: center;
    padding: 60px 20px;
    background-color: #E53935; /* Primary brand color for CTA */
    color: #ffffff;
}

.page-faq__cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-faq__cta-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }

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

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

@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 đã xử lý header offset */
    }

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

    .page-faq__hero-content, 
    .page-faq__faq-category, 
    .page-faq__faq-item, 
    .page-faq__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-faq__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .page-faq__description {
        font-size: 1rem;
    }

    .page-faq__btn-primary {
        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__content-area,
    .page-faq__dark-bg {
        padding: 30px 0; /* Padding handled by .page-faq__container */
    }
    
    .page-faq__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-faq__faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-faq__category-title {
        font-size: 1.3rem;
    }

    .page-faq__faq-question {
        font-size: 1.1rem;
        padding: 18px 20px;
    }

    /* For native details items, content is shown when 'open' */
    .page-faq__faq-item[open] .page-faq__faq-answer {
        padding-bottom: 20px;
        padding-top: 10px;
    }

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

    .page-faq__faq-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        margin: 15px auto;
    }

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

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

    /* Ensure all images within .page-faq are responsive */
    .page-faq img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* All containers with images/buttons should be responsive */
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__faq-category,
    .page-faq__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
}

/* Color Contrast Fixes (as per requirements) */
.page-faq__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-faq__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}