/* style/news.css */

/* General Styles */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color on light background */
    background-color: #ffffff; /* Explicitly set for clarity, aligns with shared.css default */
}

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

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

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background-color: #017439; /* Dark background for hero */
    color: #ffffff; /* White text on dark background */
}

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle overlay for text readability */
    filter: none; /* Ensure no CSS filter is applied */
}

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

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

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

.page-news__hero-button {
    display: inline-block;
    background-color: #C30808; /* Register button color */
    color: #FFFF00; /* Register button text color */
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: none;
}

.page-news__hero-button:hover {
    background-color: #e02020;
}

/* Latest News Section */
.page-news__latest-news {
    padding: 80px 0;
    background-color: #f9f9f9;
}

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

.page-news__news-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__news-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    filter: none; /* Ensure no CSS filter is applied */
}

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

.page-news__news-card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__news-card-title a {
    color: #017439; /* Brand primary color for news titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
    color: #005a2e;
}

.page-news__news-card-snippet {
    font-size: 0.95em;
    color: #666666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__news-card-link {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__news-card-link:hover {
    color: #005a2e;
    text-decoration: underline;
}

/* Categories Section */
.page-news__categories {
    padding: 80px 0;
    background-color: #ffffff;
}

.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-news__category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
    background-color: #f0f8f0; /* Light green background */
    border-radius: 8px;
    text-decoration: none;
    color: #333333;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-news__category-item:hover {
    background-color: #e0f0e0;
    transform: translateY(-3px);
}

.page-news__category-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.page-news__category-title {
    font-size: 1.3em;
    color: #017439;
    margin-bottom: 10px;
}

.page-news__category-text {
    font-size: 0.9em;
    color: #666666;
}

/* Benefits Section */
.page-news__benefits {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.page-news__benefits-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__benefits-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.page-news__benefits-item-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
}

.page-news__benefits-item-title::before {
    content: '✅';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8em;
}

.page-news__benefits-item-text {
    font-size: 1em;
    color: #555555;
}

/* Login Guide Section */
.page-news__login-guide {
    padding: 80px 0;
    background-color: #ffffff;
}

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

.page-news__step-item {
    text-align: center;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fdfdfd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-news__step-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #017439;
    margin-bottom: 15px;
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: #e6f7e6;
}

.page-news__step-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
}

.page-news__step-text {
    font-size: 1em;
    color: #555555;
}

.page-news__cta-wrapper {
    text-align: center;
}

.page-news__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Login/Register button color */
    color: #FFFF00; /* Login/Register button text color */
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: none;
}

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

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

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

.page-news__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: #fdfdfd;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #eef8ee;
}

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

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

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

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

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

.page-news__faq-answer-text {
    font-size: 1em;
    color: #555555;
    margin-top: 0;
    margin-bottom: 0;
}

/* Final CTA Section */
.page-news__cta-final {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color background */
    color: #ffffff; /* White text on dark background */
    text-align: center;
}

.page-news__cta-final .page-news__section-title,
.page-news__cta-final .page-news__section-description {
    color: #ffffff;
}

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

.page-news__btn-secondary {
    display: inline-block;
    background-color: #ffffff;
    color: #017439; /* Brand primary color for text */
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid #017439;
}

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

/* 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;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__hero-button {
        font-size: 1em;
        padding: 12px 25px;
    }

    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 0.9em;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        filter: none !important; /* Ensure no CSS filter is applied on mobile */
    }
    .page-news__news-card-image {
        height: 180px; /* Adjust height for mobile cards */
    }

    /* Video responsiveness (if any, though none explicitly added) */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__video-section {
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Button responsiveness */
    .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; /* Ensure buttons take full width */
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__category-grid,
    .page-news__news-grid,
    .page-news__benefits-list,
    .page-news__steps-grid {
        grid-template-columns: 1fr; /* Single column layout for grids */
    }

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

    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding added to specific sections if needed, not globally here */
    }

    .page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__news-card-image {
        height: 150px;
    }
}

/* Ensure all content area images are at least 200px wide */
.page-news__news-card-image,
.page-news__hero-image {
    min-width: 200px;
    min-height: 200px;
}
/* No CSS filters allowed for images */
.page-news img {
    filter: none;
}