/* style/news.css */

/* --- General Styles --- */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #ffffff); /* Inherit from shared, default white */
}

.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: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-news__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.8;
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-offset, 120px); /* Ensure content is below header */
    min-height: 600px;
    background-color: #017439; /* Dark green background */
    color: #ffffff;
    overflow: hidden;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    padding: 40px;
}

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

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

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

.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.3; /* Overlay to make text readable */
}

/* --- Introduction Section --- */
.page-news__introduction-section {
    padding: 80px 0;
    background-color: #ffffff;
    color: #333333;
}

/* --- Articles Section --- */
.page-news__articles-section {
    padding: 80px 0;
    background-color: #017439; /* Dark green background */
    color: #ffffff;
}

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

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 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 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__article-image {
    width: 100%;
    height: 200px;
    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: 15px;
    font-weight: bold;
    color: #ffffff;
}

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

.page-news__article-title a:hover {
    color: #FFFF00; /* Yellow for hover */
}

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

.page-news__read-more-link {
    display: inline-block;
    color: #FFFF00; /* Yellow link */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-news__read-more-link:hover {
    color: #ffffff;
}

/* --- Benefits Section --- */
.page-news__benefits-section {
    padding: 80px 0;
    background-color: #f8f8f8; /* Light grey background */
    color: #333333;
}

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

.page-news__benefit-item {
    text-align: center;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.page-news__benefit-icon {
    width: 150px; /* Display size */
    height: 150px; /* Display size */
    object-fit: contain;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-news__benefit-title {
    font-size: 1.8em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__benefit-description {
    font-size: 1em;
    color: #555555;
}

/* --- Guide Section --- */
.page-news__guide-section {
    padding: 80px 0;
    background-color: #017439; /* Dark green background */
    color: #ffffff;
}

.page-news__guide-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-news__guide-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__guide-subtitle {
    font-size: 1.6em;
    color: #FFFF00; /* Yellow for subtitles */
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__guide-item p {
    font-size: 1.05em;
    color: #f0f0f0;
}

/* --- CTA Buttons --- */
.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure button doesn't overflow */
    box-sizing: border-box;
}

.page-news__btn-primary {
    background: #C30808; /* Red for primary action (Register) */
    color: #FFFF00; /* Yellow text for contrast */
    border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
    background: #ffffff;
    color: #017439; /* Green text for contrast */
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    border-color: #017439;
    transform: translateY(-2px);
}

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

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

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-question {
    background-color: #f0f0f0;
}

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

.page-news__faq-title {
    font-size: 1.25em;
    color: #017439;
    margin: 0;
    font-weight: bold;
}

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

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

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

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

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

/* --- Color Contrast & Background Handling --- */
.page-news__dark-bg {
    background-color: #017439;
    color: #ffffff;
}
.page-news__dark-bg .page-news__section-title {
    color: #FFFF00; /* Yellow for titles on dark green background */
}
.page-news__dark-bg .page-news__text-block {
    color: #f0f0f0;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
}
.page-news__light-bg .page-news__section-title {
    color: #017439;
}
.page-news__light-bg .page-news__text-block {
    color: #333333;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__hero-description {
        font-size: 1.2em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__articles-grid,
    .page-news__benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: var(--header-offset, 120px) !important; /* Ensure content is below header */
        min-height: 500px;
    }

    .page-news__hero-content {
        padding: 30px 15px;
        order: 2; /* Content below image on mobile */
    }

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

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

    .page-news__hero-image-wrapper {
        position: relative;
        height: 250px;
        width: 100%;
        order: 1; /* Image above content on mobile */
    }

    .page-news__hero-image {
        opacity: 0.5; /* Slightly more opaque on mobile for better visual */
    }

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

    .page-news__text-block {
        font-size: 1em;
    }

    .page-news__articles-grid,
    .page-news__benefits-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

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

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

    .page-news__benefit-title {
        font-size: 1.5em;
    }

    .page-news__guide-subtitle {
        font-size: 1.4em;
    }

    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-news__faq-question {
        padding: 15px 20px;
    }

    .page-news__faq-title {
        font-size: 1.1em;
    }

    .page-news__faq-answer {
        padding: 0 20px;
    }

    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px;
    }
    
    /* Mobile image and video responsiveness */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__articles-section,
    .page-news__benefits-section,
    .page-news__guide-section,
    .page-news__faq-section,
    .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-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-news__hero-section {
        padding-left: 0;
        padding-right: 0;
    }
    .page-news__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__hero-section,
    .page-news__introduction-section,
    .page-news__articles-section,
    .page-news__benefits-section,
    .page-news__guide-section,
    .page-news__faq-section {
        padding: 40px 0;
    }
    .page-news__hero-content {
        padding: 20px 10px;
    }
}