/* style/news.css */

/* Base styles for the news page */
.page-news {
    color: #ffffff; /* Light text for dark body background */
    background-color: #1a1a1a; /* Inherited from body, but good to be explicit for content sections if needed */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: 0; /* Handled by shared.css body padding, or hero section will handle */
}

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

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

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: #ffffff;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #FFFFFF; /* Ensure high contrast */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

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

.page-news__hero-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

/* Common button styles */
.page-news__btn-primary {
    background-color: #017439; /* Primary brand color */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__btn-primary:hover {
    background-color: #005a2e;
    border-color: #005a2e;
}

.page-news__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #017439;
    margin-left: 15px;
}

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2e;
    border-color: #005a2e;
}

/* Buttons specific for Register/Login */
.page-news__cta-buttons .page-news__btn-primary { /* Register button */
    background-color: #C30808; /* Custom color for Register */
    border-color: #C30808;
    color: #FFFF00; /* Custom font color for Register */
}
.page-news__cta-buttons .page-news__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}
.page-news__cta-buttons .page-news__btn-secondary { /* Login button */
    background-color: #C30808; /* Custom color for Login */
    border-color: #C30808;
    color: #FFFF00; /* Custom font color for Login */
}
.page-news__cta-buttons .page-news__btn-secondary:hover {
    background-color: #a00606;
    border-color: #a00606;
}


/* General Section Styles */
.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: #FFFFFF; /* Changed to white for better contrast on dark background */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 60px;
}

/* Articles Grid Section */
.page-news__articles-section {
    padding: 60px 0;
    background-color: #1a1a1a; /* Dark background from body */
}

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

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    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 20px rgba(0, 0, 0, 0.3);
}

.page-news__article-image {
    width: 100%;
    height: 250px; /* 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.5em;
    margin-bottom: 10px;
}

.page-news__article-title a {
    color: #FFFFFF; /* Changed to white for better contrast on dark card background */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #00994d;
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #bbb;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 1em;
    color: #ccc;
    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;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

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

/* Call to Action Section */
.page-news__cta-section {
    background-color: #017439; /* Primary brand color */
    padding: 80px 0;
    text-align: center;
    color: #ffffff;
}

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.page-news__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Dark background from body */
    color: #ffffff;
}

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

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for FAQ items */
    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-color: rgba(255, 255, 255, 0.1); /* Slightly darker for question */
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question-text {
    font-size: 1.2em;
    color: #ffffff;
    margin: 0;
}

.page-news__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: #017439; /* Brand color for toggle icon */
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Plus to X (or rotate to minus) */
}

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

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

.page-news__faq-answer p {
    margin: 0;
    font-size: 1em;
}

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

@media (max-width: 768px) {
    .page-news__hero-section {
        height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
    }
    .page-news__hero-title {
        font-size: 2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-image {
        height: 200px; /* Adjust for mobile */
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-secondary {
        margin-left: 0; /* Remove margin for vertical stacking */
    }
    .page-news__cta-section {
        padding: 60px 20px;
    }
    .page-news__faq-question-text {
        font-size: 1.1em;
    }

    /* Mobile image responsiveness */
    .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-section,
    .page-news__articles-section,
    .page-news__cta-section,
    .page-news__faq-section,
    .page-news__article-card {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important; /* Allow buttons to wrap */
        gap: 10px;
    }
    .page-news__hero-button,
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .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;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-section {
        height: 350px;
    }
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }
    .page-news__faq-question-text {
        font-size: 1em;
    }
}