/* style/news.css */
/* body đã padding-top: var(--header-offset) từ shared.css, không cần thêm ở đây */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-on-dark: #ffffff;
    --text-on-light: #333333;
    --button-login-color: #EA7C07;
}

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-on-dark); /* Default text color for dark body background */
    background-color: #0a0a0a; /* Ensure consistency with body background */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px 60px; /* Small top padding, more bottom padding */
    background-color: var(--primary-color); /* Fallback color */
    color: var(--text-on-dark);
    text-align: center;
    box-sizing: border-box;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 1200px;
    margin-top: 20px; /* Space between text and image */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
    max-width: 800px;
    margin: 0 auto;
    z-index: 1; /* Ensure content is above any potential background elements */
}

.page-news__main-title {
    font-size: clamp(2.2rem, 4vw, 3rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-on-dark);
}

.page-news__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-on-dark);
}

/* Section Titles */
.page-news__section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
}

.page-news__section-description {
    font-size: 1rem;
    color: var(--text-on-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-news__btn-primary {
    background-color: var(--button-login-color);
    color: var(--secondary-color);
    border: 2px solid var(--button-login-color);
    margin: 10px;
}

.page-news__btn-primary:hover {
    background-color: darken(var(--button-login-color), 10%); /* Placeholder for darken */
    border-color: darken(var(--button-login-color), 10%); /* Placeholder for darken */
}

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

.page-news__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Latest News Section */
.page-news__latest-news {
    background-color: var(--secondary-color); /* Light background for news cards */
    color: var(--text-on-light);
    padding: 60px 0;
}

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

.page-news__news-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
}

.page-news__card-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    flex-grow: 1;
}

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

.page-news__card-title a:hover {
    color: darken(var(--primary-color), 10%); /* Placeholder for darken */
}

.page-news__card-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    display: block;
}

.page-news__card-excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.page-news__read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
    text-decoration: underline;
}

.page-news__view-all-button {
    text-align: center;
    margin-top: 50px;
}

/* Important Updates Section */
.page-news__important-updates {
    background-color: #1a1a1a; /* Darker background for contrast */
    color: var(--text-on-dark);
    padding: 60px 0;
}

.page-news__important-updates .page-news__section-title {
    color: var(--primary-color);
}

.page-news__important-updates .page-news__description {
    color: var(--text-on-dark);
}

.page-news__update-list {
    list-style: none;
    padding: 0;
    margin: 40px auto;
    max-width: 800px;
    text-align: left;
}

.page-news__update-list li {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-on-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-news__update-list li strong {
    color: var(--primary-color);
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* Promotions Events Section */
.page-news__promotions-events {
    background-color: var(--secondary-color);
    color: var(--text-on-light);
    padding: 60px 0;
}

.page-news__promo-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    margin-top: 40px;
}

.page-news__promo-image {
    flex: 1 1 45%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 300px; /* Ensure image doesn't get too small */
}

.page-news__promo-text {
    flex: 1 1 45%;
    min-width: 300px;
}

.page-news__promo-text p {
    margin-bottom: 20px;
    color: var(--text-on-light);
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #0a0a0a; /* Body background color */
    color: var(--text-on-dark);
    padding: 60px 0;
}

.page-news__faq-section .page-news__section-title {
    color: var(--primary-color);
}

.page-news__faq-list {
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-news__faq-item details > summary {
    list-style: none;
}

.page-news__faq-item details > summary::-webkit-details-marker {
    display: none;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-on-dark);
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-news__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

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

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

/* Conclusion Section */
.page-news__conclusion {
    background-color: var(--secondary-color);
    color: var(--text-on-light);
    padding: 60px 0;
    text-align: center;
}

.page-news__conclusion .page-news__section-title {
    color: var(--primary-color);
}

.page-news__conclusion .page-news__description {
    color: var(--text-on-light);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

/* --- General Image & Video Sizing for Responsiveness --- */
.page-news img,
.page-news video {
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
}

.page-news__video-container {
    width: 100%; /* Ensure desktop video container has width: 100% */
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

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

    .page-news__hero-section {
        padding: 10px 15px 40px; /* Adjust padding for mobile */
    }

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

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

    .page-news__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        padding-top: 30px;
    }

    .page-news__section-description {
        margin-bottom: 30px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news 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;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 15px; /* Add space between stacked buttons */
    }

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

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

    .page-news__card-image {
        height: 180px; /* Adjust card image height for mobile */
    }

    .page-news__promo-content {
        flex-direction: column;
    }

    .page-news__promo-image,
    .page-news__promo-text {
        flex: 1 1 100%;
        min-width: unset;
    }

    .page-news__container,
    .page-news__section,
    .page-news__card,
    .page-news__promo-content,
    .page-news__faq-section,
    .page-news__important-updates,
    .page-news__promotions-events,
    .page-news__conclusion {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal overflow */
    }

    /* Ensure all images and videos are responsive on mobile */
    .page-news img,
    .page-news video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Video section specific mobile padding */
    .page-news__video-section {
        padding-top: 10px !important; /* Small top padding, not var(--header-offset) */
    }

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

    .page-news__faq-answer {
        padding: 15px;
    }
}

/* Placeholder for darken function (Sass/Less feature, replace with actual color or JS if needed) */
/* In a real scenario, these would be pre-processed or defined with CSS variables */
/* For example: */
/* .page-news__btn-primary:hover { background-color: #d16e06; border-color: #d16e06; } */
/* .page-news__card-title a:hover { color: #1e87b7; } */