/* style/news.css */

/* Base styles for the page content */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background: transparent; /* Body background is handled by shared.css */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

/* 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;
    color: #ffffff;
    padding: 0; /* padding-top handled by .page-news */
}

.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.6); /* Dark overlay for text readability */
    z-index: 2;
}

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

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

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

.page-news__hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* General Section Styling */
.page-news__section {
    padding: 80px 0;
    background: #1a1a2e; /* Inherit from body or specific dark background */
}

.page-news__section-title {
    font-size: 2.5em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-subtitle {
    font-size: 1.2em;
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

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

.page-news__btn-primary:hover {
    background: #e02020;
    border-color: #e02020;
    color: #ffffff;
}

.page-news__btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #017439; /* Brand primary color */
}

.page-news__btn-secondary:hover {
    background: #017439;
    color: #ffffff;
}

/* Latest Articles Grid */
.page-news__latest-articles {
    background: #1a1a2e;
}

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

.page-news__article-card {
    background: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: bold;
}

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

.page-news__article-title a:hover {
    color: #017439; /* Brand primary color */
}

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

.page-news__read-more {
    display: inline-block;
    color: #017439; /* Brand primary color */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: 10px;
}

.page-news__read-more:hover {
    color: #00a04a; /* Slightly lighter green on hover */
}

/* Pagination */
.page-news__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover:not(.page-news__pagination-link--active) {
    background: #017439;
    color: #ffffff;
}

.page-news__pagination-link--active {
    background: #017439;
    color: #ffffff;
    font-weight: bold;
    cursor: default;
}

/* CTA Banner */
.page-news__cta-banner {
    background: #017439; /* Brand primary color */
    text-align: center;
    padding: 60px 0;
    color: #ffffff;
}

.page-news__cta-title {
    font-size: 2.2em;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* FAQ Section */
.page-news__faq-section {
    background: #1a1a2e;
}

.page-news__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background: rgba(255, 255, 255, 0.15);
}

.page-news__faq-heading {
    font-size: 1.1em;
    margin: 0;
    color: #ffffff;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
    line-height: 1;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Changes '+' to 'x' or similar */
    color: #ffffff;
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #cccccc;
}

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

.page-news__faq-answer p {
    margin: 0;
    color: #cccccc;
}

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

.page-news__faq-answer a:hover {
    color: #00a04a;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__section-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding: 0 15px; /* Mobile padding */
    }

    .page-news__hero-section {
        height: 450px;
    }

    .page-news__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1.1em;
        margin-bottom: 25px;
    }

    .page-news__hero-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

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

    .page-news__section-subtitle {
        font-size: 1em;
        margin-bottom: 40px;
    }

    .page-news__article-grid {
        grid-template-columns: 1fr;
    }

    .page-news__article-image {
        height: 180px;
    }

    .page-news__article-title {
        font-size: 1.3em;
    }

    .page-news__cta-title {
        font-size: 1.8em;
    }

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

    .page-news__cta-actions {
        flex-direction: column;
        gap: 15px;
    }

    /* Images responsiveness for content area */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__article-card,
    .page-news__cta-banner,
    .page-news__faq-section,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by .page-news__container for consistency */
    }
    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px 20px;
    }
}