/* style/news.css */

/* Variables from shared.css are assumed to be available */
:root {
    --primary-color: #017439; /* Green */
    --secondary-color: #C30808; /* Red for register/login buttons */
    --accent-text-color: #FFFF00; /* Yellow for register/login button text */
    --light-bg: #ffffff;
    --dark-text: #333333;
    --light-text: #f0f0f0; /* Slightly off-white for better contrast on dark backgrounds */
    --border-color: #e0e0e0;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text); /* Default text color for light backgrounds */
    background-color: var(--light-bg);
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a9d68 100%); /* Green gradient */
    color: var(--light-text);
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure container takes full width up to max-width */
}

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--light-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--light-text);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color); /* Register/Login button color */
    color: var(--accent-text-color); /* Register/Login button text color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    max-width: 100%; /* Ensure button adapts to mobile */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    background: #e62e2e; /* Slightly darker red on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-news__content-wrapper {
    padding: 60px 0;
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure container takes full width up to max-width */
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--dark-text);
}

.page-news__section-description--light {
    color: var(--light-text); /* For dark backgrounds */
}

/* Latest Articles Section */
.page-news__latest-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__article-card {
    background: var(--light-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have consistent height */
}

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

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

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

.page-news__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.page-news__card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #005a2e; /* Darker green on hover */
}

.page-news__card-excerpt {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start; /* Align to bottom-left of card content */
}

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

/* Categories Section */
.page-news__categories-section {
    background: var(--primary-color);
    padding: 60px 0;
    color: var(--light-text);
}

.page-news__categories-section .page-news__section-title {
    color: var(--light-text);
}

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

.page-news__category-button {
    display: block;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--light-text);
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 100%; /* Ensure button adapts to mobile */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__category-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Featured Article Section */
.page-news__featured-article-section {
    padding: 60px 0;
}

.page-news__featured-article-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.page-news__featured-article-content img {
    width: 45%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    min-width: 300px; /* Ensure image is not too small on larger screens */
}

.page-news__featured-text {
    flex-grow: 1;
}

.page-news__featured-text h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-news__featured-text h4 {
    font-size: 1.4em;
    color: #555;
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-news__featured-text p {
    margin-bottom: 15px;
    color: #444;
    line-height: 1.7;
    font-size: 1em;
}

.page-news__featured-text ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: #444;
}

.page-news__featured-text ul li {
    margin-bottom: 8px;
    font-size: 1em;
}

/* Promotions Callout Section */
.page-news__promotions-callout {
    background: var(--primary-color);
    padding: 60px 0;
    text-align: center;
    color: var(--light-text);
}

.page-news__promotions-callout .page-news__section-title {
    color: var(--light-text);
}

.page-news__cta-button--yellow-text {
    color: var(--accent-text-color); /* Yellow text for this specific button */
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #f9f9f9; /* Slightly off-white background for contrast */
}

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--light-bg);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}