/* style/news.css */

/* Base styles for the page-news scope */
.page-news {
    font-family: Arial, sans-serif;
    background-color: #08160F; /* Background color from custom scheme */
    color: #F2FFF6; /* Main text color from custom scheme */
    line-height: 1.6;
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #F2FFF6; /* Main text color */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

/* HERO Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding for the first section */
    padding-bottom: 60px;
    text-align: center;
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    margin-bottom: 20px; /* Space between image and text */
}

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

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

.page-news__hero-title {
    font-size: clamp(2em, 4vw, 3.5em); /* H1 font size with clamp */
    color: #F2FFF6;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
}

.page-news__hero-description {
    font-size: 1.1em;
    color: #A7D9B8; /* Secondary text color */
    margin-bottom: 30px;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
    color: #F2FFF6; /* Text Main for button text */
    border: none;
    margin-right: 15px;
}

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

.page-news__btn-secondary {
    background-color: transparent;
    color: #F2FFF6; /* Text Main for button text */
    border: 2px solid #2E7A4E; /* Border color */
}

.page-news__btn-secondary:hover {
    background-color: rgba(46, 122, 78, 0.2); /* Slightly lighter border color on hover */
    transform: translateY(-2px);
}

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

/* Latest News Section & Featured Blog Section */
.page-news__latest-news-section,
.page-news__featured-blog-section {
    padding: 60px 0;
}

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

.page-news__news-card,
.page-news__blog-card {
    background-color: #11271B; /* Card BG color */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

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

.page-news__card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    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.3em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__card-title a {
    color: #F2FFF6; /* Text Main */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #2AD16F; /* Highlight color on hover */
}

.page-news__card-date {
    font-size: 0.9em;
    color: #A7D9B8; /* Secondary text color */
    margin-bottom: 15px;
}

.page-news__card-summary {
    font-size: 1em;
    color: #A7D9B8; /* Secondary text color */
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__card-link {
    display: inline-block;
    color: #2AD16F; /* Main color for links */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__card-link:hover {
    text-decoration: underline;
}

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

/* Categories Section */
.page-news__categories-section {
    padding: 60px 0;
    background-color: #0A4B2C; /* Deep Green */
}

.page-news__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.page-news__category-item {
    display: block;
    padding: 15px 20px;
    background-color: #11271B; /* Card BG */
    color: #F2FFF6; /* Text Main */
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 1px solid #2E7A4E; /* Border color */
}

.page-news__category-item:hover {
    background-color: #2E7A4E; /* Border color on hover */
    transform: translateY(-3px);
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #08160F; /* Background color */
}

.page-news__section-title--cta {
    font-size: 2.8em;
    margin-bottom: 20px;
}

.page-news__cta-description {
    font-size: 1.2em;
    color: #A7D9B8; /* Secondary text color */
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__news-grid,
    .page-news__blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        padding-bottom: 40px;
    }

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

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

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

    .page-news__latest-news-section,
    .page-news__featured-blog-section,
    .page-news__categories-section,
    .page-news__cta-section {
        padding: 40px 0;
    }

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

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

    .page-news__card-title {
        font-size: 1.1em;
    }

    .page-news__category-item {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        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 {
        width: 100% !important; /* Full width buttons */
        max-width: 100% !important;
        margin-right: 0 !important;
        padding: 10px 15px !important;
        font-size: 0.95em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Mobile image responsive adaptations */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding for containers to prevent edge-to-edge content */
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Remove padding for hero-image-wrapper if it's already handled by its parent or has a specific layout */
    .page-news__hero-image-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
    .page-news__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ensure content area images don't go below 200px */
.page-news__latest-news-section img,
.page-news__featured-blog-section img {
    min-width: 200px;
    min-height: 200px;
}

/* No CSS filters for images */
.page-news img {
    filter: none;
}