/* style/news.css */
.page-news {
    font-family: Arial, sans-serif;
    color: var(--text-main-color, #333333); /* Default text color, assuming light body background */
    background-color: var(--background-page, #F5F7FA); /* Page background */
    line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
    display: flex;
    flex-direction: column; /* Default to column for image then content */
    align-items: center;
    text-align: center;
    padding: 10px 0 40px 0; /* Small top padding, then larger bottom */
    background-color: var(--background-page, #F5F7FA);
}

.page-news__hero-image-container {
    width: 100%;
    max-width: 1200px; /* Max width for the image container */
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 10px;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Desktop: cover */
    border-radius: 10px;
}

.page-news__hero-content {
    max-width: 900px;
    padding: 0 20px;
    background-color: var(--card-bg, #FFFFFF); /* Card background for content block */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: -80px; /* Overlap with image slightly for visual effect */
    position: relative;
    z-index: 1;
    padding-top: 100px; /* Compensate for negative margin */
    padding-bottom: 40px;
}

.page-news__main-title {
    font-size: clamp(2.2em, 4vw, 3.2em); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-color, #E53935);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-news__description {
    font-size: 1.1em;
    color: var(--text-main-color, #333333);
    margin-bottom: 30px;
}

/* Buttons */
.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 500px; /* Max width for button group */
    margin: 0 auto;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(229, 57, 53, 0.4);
}

.page-news__btn-secondary {
    background: #ffffff;
    color: var(--primary-color, #E53935);
    border: 2px solid var(--primary-color, #E53935);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-news__btn-secondary:hover {
    background: var(--primary-color, #E53935);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Latest News Section */
.page-news__latest-news {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--background-page, #F5F7FA);
}

.page-news__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    color: var(--primary-color, #E53935);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

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

.page-news__news-card {
    background-color: var(--card-bg, #FFFFFF);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

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

.page-news__news-card-category {
    display: inline-block;
    background-color: var(--accent-color, #FF5A4F);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-news__news-card-title {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-main-color, #333333);
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__news-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
    color: var(--primary-color, #E53935);
}

.page-news__news-card-date {
    font-size: 0.9em;
    color: #777777;
    margin-bottom: 15px;
}

.page-news__news-card-excerpt {
    font-size: 1em;
    color: var(--text-main-color, #333333);
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes the "Đọc thêm" to the bottom */
}

.page-news__read-more {
    display: inline-block;
    color: var(--primary-color, #E53935);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    text-decoration: underline;
    color: var(--accent-color, #FF5A4F);
}

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

/* CTA Section */
.page-news__cta-section {
    background-color: var(--primary-color, #E53935); /* Dark background */
    color: #ffffff; /* White text */
    padding: 80px 20px;
    text-align: center;
}

.page-news__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-news__cta-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--background-page, #F5F7FA);
}

.page-news__faq-list {
    margin-top: 30px;
}

.page-news__faq-item {
    background-color: var(--card-bg, #FFFFFF);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-news__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--text-main-color, #333333);
    cursor: pointer;
    outline: none;
    list-style: none; /* Hide default marker */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for Webkit */
}

.page-news__faq-item[open] summary {
    background-color: var(--primary-color, #E53935);
    color: #ffffff;
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
}

/* General image and container responsiveness */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-news__section,
.page-news__card,
.page-news__container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Ensure content does not overflow */
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Hero Section */
    .page-news__hero-section {
        padding: 10px 0 30px 0;
    }

    .page-news__hero-image {
        object-fit: contain !important; /* Mobile: contain to prevent cropping */
        aspect-ratio: unset !important; /* unset aspect ratio */
        max-height: none !important;
    }

    .page-news__hero-content {
        margin-top: -50px; /* Adjust overlap for mobile */
        padding: 70px 15px 30px 15px;
    }

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

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

    .page-news__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Latest News Section */
    .page-news__latest-news {
        padding: 40px 0;
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .page-news__news-card-image {
        height: 180px;
    }

    .page-news__news-card-title {
        font-size: 1.2em;
    }

    .page-news__news-card-excerpt {
        font-size: 0.95em;
    }

    .page-news__view-all-button-container {
        margin-top: 30px;
        padding: 0 15px;
    }

    /* CTA Section */
    .page-news__cta-section {
        padding: 50px 15px;
    }

    .page-news__cta-title {
        font-size: 1.8em;
    }

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

    /* FAQ Section */
    .page-news__faq-section {
        padding: 40px 0;
    }

    .page-news__faq-item {
        margin-left: 15px;
        margin-right: 15px;
    }

    .page-news__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }

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

    /* General image and container responsiveness for mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }
}