/* style/news.css */

/* Base styles for the news page content */
.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 */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    color: #FFFFFF;
    max-width: 800px;
    padding: 20px;
}

.page-news__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-news__hero-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* General Section Styling */
.page-news__section {
    padding: 60px 20px;
    background-color: #FFFFFF;
}

.page-news__section-intro,
.page-news__section-footer {
    max-width: 900px;
    margin: 20px auto 40px auto;
    text-align: center;
    font-size: 1.1em;
    color: #555555;
}

.page-news__section-intro--light,
.page-news__section-footer--light {
    max-width: 900px;
    margin: 20px auto 40px auto;
    text-align: center;
    font-size: 1.1em;
    color: #f0f0f0;
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #017439;
    border-radius: 2px;
}

.page-news__section-title--light {
    color: #FFFFFF;
}

.page-news__section-title--light::after {
    background-color: #FFFFFF;
}


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

.page-news__article-card {
    background-color: #FFFFFF;
    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;
}

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

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

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

.page-news__article-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

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

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #017439;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-news__read-more-button:hover {
    background-color: #005f2f;
}

/* Featured Categories Section */
.page-news__featured-categories {
    background-color: #017439; /* Dark background for this section */
    color: #FFFFFF;
}

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

.page-news__category-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-news__category-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.page-news__category-title {
    font-size: 1.5em;
    margin-bottom: 15px;
}

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

.page-news__category-title a:hover {
    color: #FFFF00; /* Yellow on hover for better contrast */
}

.page-news__category-description {
    font-size: 0.95em;
    color: #f0f0f0;
}

/* Call to Action Section */
.page-news__cta-section {
    background-color: #017439; /* Dark background */
    color: #FFFFFF;
    text-align: center;
}

.page-news__cta-container {
    padding: 40px;
    border-radius: 10px;
    /* background-color: rgba(255, 255, 255, 0.05); */ /* Optional subtle background */
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

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

.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    min-width: 180px; /* Ensure buttons have a minimum width */
    text-align: center;
}

.page-news__btn-primary {
    background-color: #C30808; /* Register button color */
    color: #FFFF00; /* Register button font color */
    border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: #FFFF00; /* Login button font color */
    border: 2px solid #C30808; /* Login button border color */
}

.page-news__btn-secondary:hover {
    background-color: #C30808;
    color: #FFFFFF; /* White text on hover */
    transform: translateY(-2px);
}


/* FAQ Section */
.page-news__faq-section {
    background-color: #f9f9f9;
}

.page-news__faq-list {
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.page-news__faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 1.15em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    transition: color 0.3s ease;
}

.page-news__faq-question:hover {
    color: #005f2f;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
    font-size: 1em;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 15px 20px 15px;
}

.page-news__faq-answer p {
    margin-bottom: 0; /* Remove default paragraph margin */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 3em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__category-title {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }
    .page-news__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
}