/* style/news.css */

:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --card-bg: #FFFFFF;
    --background-color-light: #F5F7FA;
    --text-main-color: #333333;
    --border-color: #E0E0E0;
    --gradient-button: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
}

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color); /* Assuming light body background from shared.css */
    background-color: var(--background-color-light);
}

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

.page-news__section-padding {
    padding: 60px 0;
}

.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__sub-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-news__section-intro {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-main-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
    display: flex;
    flex-direction: column; /* Default to column for text below image */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-color-light);
    overflow: hidden;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for desktop hero */
    overflow: hidden;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover for desktop */
    min-height: 200px; /* Min size for image */
}

.page-news__hero-content {
    max-width: 800px;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-news__main-title {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 100%; /* Ensure H1 doesn't overflow */
}

.page-news__description {
    font-size: 18px;
    color: var(--text-main-color);
    margin-bottom: 30px;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
    background: var(--gradient-button);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* News Grid */
.page-news__news-grid,
.page-news__promotions-grid,
.page-news__strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-news__card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-news__card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__card-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card images */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min size for image */
    min-height: 200px; /* Min size for image */
}

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

.page-news__card-date {
    font-size: 14px;
    color: #666666;
    margin-bottom: 10px;
    display: block;
}

.page-news__card-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__card-description {
    font-size: 16px;
    color: var(--text-main-color);
    margin-bottom: 15px;
    flex-grow: 1;
}

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

.page-news__read-more-btn:hover {
    color: var(--secondary-color);
}

.page-news__button-container {
    text-align: center;
}

/* Dark Section for Promotions */
.page-news__dark-section {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-news__dark-section .page-news__section-title {
    color: #ffffff;
}

.page-news__dark-section .page-news__section-intro {
    color: #f0f0f0;
}

.page-news__dark-section .page-news__card {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards on dark background */
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.page-news__dark-section .page-news__card-date {
    color: #cccccc;
}

.page-news__dark-section .page-news__card-title {
    color: #ffffff;
}

.page-news__dark-section .page-news__card-description {
    color: #f0f0f0;
}

.page-news__dark-section .page-news__read-more-btn {
    color: var(--secondary-color);
}

.page-news__dark-section .page-news__read-more-btn:hover {
    color: #ffffff;
}

/* About News Section (Long-form content) */
.page-news__about-news-section .page-news__section-title {
    color: var(--primary-color);
    text-align: left;
}

.page-news__about-news-section p {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-main-color);
}

.page-news__about-news-section .page-news__sub-title {
    color: var(--primary-color);
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.page-news__about-news-section .page-news__list {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: var(--text-main-color);
}

.page-news__about-news-section .page-news__list li {
    margin-bottom: 10px;
    font-size: 16px;
}

.page-news__about-news-section .page-news__list li strong {
    color: var(--primary-color);
}

/* Call to Action Section (CTA) */
.page-news__cta-section {
    text-align: center;
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-news__cta-section .page-news__section-title {
    color: #ffffff;
    margin-bottom: 15px;
}

.page-news__cta-section .page-news__description {
    color: #f0f0f0;
    margin-bottom: 30px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__description {
        font-size: 16px;
    }
    .page-news__card-title {
        font-size: 18px;
    }
    .page-news__card-description,
    .page-news__about-news-section p,
    .page-news__about-news-section .page-news__list li {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    /* General content area padding and sizing */
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-news__section-padding {
        padding: 40px 0;
    }

    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-news__sub-title {
        font-size: 22px;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .page-news__section-intro {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Hero Section */
    .page-news__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles header offset */
    }

    .page-news__hero-image {
        object-fit: contain !important; /* Contain for mobile hero */
        aspect-ratio: unset !important;
        max-height: none !important;
        height: auto !important; /* Ensure image scales */
        width: 100% !important;
    }

    .page-news__hero-content {
        padding: 30px 15px;
    }

    .page-news__main-title {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .page-news__description {
        font-size: 15px;
        margin-bottom: 25px;
    }

    /* Buttons and Button Containers */
    .page-news__cta-buttons,
    .page-news__button-container {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        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: 12px 20px !important; /* Adjust padding for mobile buttons */
        font-size: 16px !important;
    }

    /* Image responsiveness (General) */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    /* Card Layouts */
    .page-news__news-grid,
    .page-news__promotions-grid,
    .page-news__strategies-grid {
        grid-template-columns: 1fr; /* Single column for cards */
        gap: 20px;
    }

    .page-news__card-image {
        height: auto !important; /* Allow height to adjust */
        max-height: 200px; /* Optional: cap max height for mobile cards */
    }

    .page-news__card-content {
        padding: 15px;
    }

    .page-news__card-title {
        font-size: 18px;
    }

    .page-news__card-description {
        font-size: 15px;
    }

    /* Long-form content section */
    .page-news__about-news-section .page-news__section-title {
        text-align: center; /* Center align title on mobile */
    }

    .page-news__about-news-section p,
    .page-news__about-news-section .page-news__list li {
        font-size: 15px;
    }
}