/* 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 backgrounds */
    background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

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

.page-news__section--light {
    background-color: #ffffff;
    color: #333333;
}

.page-news__section-title {
    font-size: 36px;
    color: #017439; /* Brand primary color for titles */
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-title--cta {
    color: #017439;
}

.page-news__section-intro {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Banner Section */
.page-news__hero-banner {
    padding: 80px 0;
    background: linear-gradient(135deg, #017439, #004d26); /* Darker green gradient */
    color: #ffffff;
    text-align: center;
}

.page-news__main-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFFF00; /* Use custom font color for login/register for main title as well */
    line-height: 1.2;
}

.page-news__description {
    font-size: 18px;
    max-width: 900px;
    margin: 0 auto 30px auto;
    line-height: 1.7;
}

.page-news__cta-button {
    display: inline-block;
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-news__cta-button:hover {
    background-color: #a00606; /* Slightly darker red on hover */
    transform: translateY(-2px);
}

.page-news__cta-button--large {
    padding: 18px 50px;
    font-size: 22px;
}

.page-news__cta-button--small {
    padding: 10px 25px;
    font-size: 16px;
}

/* Latest News Grid */
.page-news__latest-news {
    background-color: #f9f9f9;
}

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

.page-news__news-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    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 25px rgba(0, 0, 0, 0.15);
}

.page-news__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

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

.page-news__card-title {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #017439;
    line-height: 1.3;
}

.page-news__card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #004d26;
}

.page-news__card-text {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    display: inline-block;
    color: #C30808; /* Use login/register color for important links */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

/* Industry Trends Section */
.page-news__industry-trends {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
}

.page-news__industry-trends .page-news__section-title,
.page-news__industry-trends .page-news__section-intro {
    color: #ffffff;
}

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

.page-news__trend-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white background */
    border-radius: 10px;
    padding: 25px;
    text-align: left;
    transition: background-color 0.3s ease;
}

.page-news__trend-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.page-news__trend-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-news__trend-title {
    font-size: 22px;
    color: #FFFF00; /* Login/Register font color for titles in dark sections */
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__trend-title a {
    color: #FFFF00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__trend-title a:hover {
    color: #f0f000;
}

.page-news__trend-text {
    font-size: 16px;
    color: #f0f0f0;
}

/* Guides Section */
.page-news__guides {
    background-color: #ffffff;
}

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

.page-news__guide-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-news__guide-card .page-news__card-image {
    height: 200px; /* Adjust height for guide images */
}

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

/* Community Section */
.page-news__community {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
    text-align: left; /* Align text left within this section */
}

.page-news__community .page-news__section-title,
.page-news__community .page-news__section-intro {
    color: #ffffff;
    text-align: center;
}

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

.page-news__community-text {
    flex: 1;
}

.page-news__community-subtitle {
    font-size: 24px;
    color: #FFFF00; /* Login/Register font color */
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-news__community-text p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.page-news__community-image {
    flex: 1;
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

/* Call to Action Section */
.page-news__call-to-action {
    padding: 80px 0;
    background-color: #f0f0f0; /* Light background for CTA */
}

.page-news__call-to-action .page-news__container {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.page-news__call-to-action .page-news__section-title {
    margin-bottom: 15px;
}

.page-news__call-to-action .page-news__section-intro {
    margin-bottom: 30px;
}

/* Dark background specific styles */
.page-news__dark-bg {
    background-color: #017439;
    color: #ffffff;
}
.page-news__dark-bg h1,
.page-news__dark-bg h2,
.page-news__dark-bg h3 {
    color: #FFFF00; /* Ensure titles are visible on dark background */
}
.page-news__dark-bg p,
.page-news__dark-bg a {
    color: #f0f0f0; /* Lighter text on dark background */
}
.page-news__dark-bg .page-news__read-more {
    color: #FFFF00;
}
.page-news__dark-bg .page-news__read-more:hover {
    color: #f0f000;
}

/* Light background specific styles */
.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
}
.page-news__light-bg h1,
.page-news__light-bg h2,
.page-news__light-bg h3 {
    color: #017439;
}
.page-news__light-bg p,
.page-news__light-bg a {
    color: #555555;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__news-grid,
    .page-news__trends-grid,
    .page-news__guide-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    .page-news__community-content {
        flex-direction: column;
        text-align: center;
    }
    .page-news__community-image {
        max-width: 80%;
        margin-top: 30px;
    }
    .page-news__community-text {
        order: 2; /* Move text below image on mobile */
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__section {
        padding: 40px 0;
    }
    .page-news__hero-banner {
        padding: 60px 0;
    }
    .page-news__main-title {
        font-size: 32px;
    }
    .page-news__description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-news__section-title {
        font-size: 28px;
    }
    .page-news__section-intro {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__card-image {
        height: 200px; /* Adjust for mobile */
    }
    .page-news__trend-image {
        height: 180px;
    }
    .page-news__community-image {
        max-width: 100%;
    }

    /* Containers responsiveness */
    .page-news__section,
    .page-news__news-card,
    .page-news__trend-item,
    .page-news__guide-card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Buttons responsiveness */
    .page-news__cta-button,
    .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 !important;
        padding-right: 15px !important;
        margin-top: 15px; /* Add some space between stacked buttons */
    }

    .page-news__cta-button--large {
        padding: 15px 30px;
        font-size: 18px;
    }
    
    .page-news__call-to-action .page-news__container {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 28px;
    }
    .page-news__section-title {
        font-size: 24px;
    }
    .page-news__cta-button {
        font-size: 16px;
        padding: 12px 25px;
    }
    .page-news__cta-button--large {
        padding: 14px 28px;
        font-size: 16px;
    }
    .page-news__card-title,
    .page-news__trend-title,
    .page-news__community-subtitle {
        font-size: 18px;
    }
    .page-news__card-text,
    .page-news__trend-text,
    .page-news__community-text p {
        font-size: 15px;
    }
    .page-news__news-grid,
    .page-news__trends-grid,
    .page-news__guide-cards {
        gap: 20px;
    }
}