/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #F5F7FA; /* Background color from custom palette */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    overflow: hidden;
    background-color: #E53935; /* Fallback background */
    padding-top: 10px; /* Small top padding, assuming body has header offset */
    padding-bottom: 40px;
    color: #ffffff;
    text-align: center;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Max height for the hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

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

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

.page-news__main-title {
    font-size: 2.8em;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

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

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

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 60px 0;
    background-color: #F5F7FA;
}

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

.page-news__section-title {
    font-size: 2.2em;
    font-weight: bold;
    color: #E53935;
    text-align: center;
    margin-bottom: 15px;
}

.page-news__section-description {
    font-size: 1.1em;
    color: #333333;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__article-card {
    background-color: #ffffff; /* Card BG color */
    border: 1px solid #E0E0E0; /* Border color */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-news__article-image {
    width: 100%;
    height: 220px; /* 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__article-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #E53935; /* Main text color for titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #FF5A4F;
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #666666;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 1em;
    color: #333333; /* Main text color */
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    display: inline-block;
    color: #E53935;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #E53935;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__read-more:hover {
    background-color: #E53935;
    color: #ffffff;
}

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

.page-news__view-all-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #FF5A4F;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__view-all-button:hover {
    background-color: #E53935;
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #E53935; /* Main brand color */
    color: #ffffff;
}

.page-news__cta-title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

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

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: #ffffff;
    color: #E53935;
    border: 2px solid #E53935;
}

.page-news__btn-secondary:hover {
    background: #E53935;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.2em;
    }

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

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

    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    /* HERO Chủ Ảnh Khu Vực */
    .page-news__hero-section {
        padding-top: 10px !important; /* Đệm trên nhỏ cho thiết bị di động */
        padding-bottom: 30px;
    }

    .page-news__hero-image-wrapper {
        max-height: 300px;
    }

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

    .page-news__main-title {
        font-size: 1.8em;
        padding: 0 15px;
    }

    .page-news__description {
        font-size: 1em;
        padding: 0 15px;
    }

    .page-news__cta-button {
        padding: 12px 20px;
        font-size: 0.9em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Khu Vực Hiển Thị Sản Phẩm (Không có rõ ràng, nhưng áp dụng quy tắc ảnh chung) */
    /* Ảnh và Container Chung */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__container,
    .page-news__section,
    .page-news__card,
    .page-news__hero-content,
    .page-news__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Nút và Container Nút */
    .page-news__cta-buttons {
        flex-direction: column; /* Xếp chồng các nút theo chiều dọc */
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .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;
    }

    /* Các Module Nội Dung Khác */
    .page-news__latest-articles {
        padding: 40px 0;
    }

    .page-news__section-title {
        font-size: 1.6em;
        padding: 0 15px;
    }

    .page-news__section-description {
        font-size: 0.95em;
        padding: 0 15px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr; /* Bố cục một cột */
        gap: 20px;
    }

    .page-news__article-card {
        margin: 0 auto; /* Căn giữa các thẻ */
        max-width: 400px; /* Tùy chọn: giới hạn chiều rộng thẻ trên màn hình rất nhỏ */
    }

    .page-news__article-image {
        height: 180px; /* Điều chỉnh chiều cao cho di động */
    }

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

    .page-news__article-excerpt {
        font-size: 0.9em;
    }

    .page-news__cta-section {
        padding: 50px 0;
    }

    .page-news__cta-title {
        font-size: 1.8em;
        padding: 0 15px;
    }

    .page-news__cta-description {
        font-size: 1em;
        padding: 0 15px;
    }

    .page-news__view-all-button {
        padding: 10px 20px;
        font-size: 0.9em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}