/* style/news.css */

/* Base Styles for the page-news scope */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #ffffff; /* Default background for main content */
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
}

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

/* Hero Section */
.page-news__hero-section {
    background: linear-gradient(135deg, #017439, #005a2e); /* Brand colors gradient */
    color: #ffffff;
    text-align: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Register/Login font color */
}

.page-news__intro-text {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%; /* Ensure buttons are responsive */
    box-sizing: border-box; /* Include padding in width calculation */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

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

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

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

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

/* General Section Styling */
.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #017439; /* Primary brand color */
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: #555555;
}

.page-news__content-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
}

.page-news__content-grid--reverse {
    flex-direction: row-reverse;
}

.page-news__text-content {
    flex: 1;
}

.page-news__text-content p {
    margin-bottom: 15px;
    color: #333333;
}

.page-news__sub-title {
    font-size: 1.8em;
    color: #017439;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-news__image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Enforce minimum image size */
    min-height: 200px; /* Enforce minimum image size */
}

.page-news__link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__link:hover {
    color: #005a2e;
    text-decoration: underline;
}

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

.page-news__card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have equal height */
}

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

.page-news__card-image {
    width: 100%;
    height: 200px; /* Fixed height for card images */
    object-fit: cover;
    min-width: 200px; /* Enforce minimum image size */
    min-height: 200px; /* Enforce minimum image size */
}

.page-news__card-title {
    font-size: 1.4em;
    color: #017439;
    margin: 20px 20px 10px 20px;
    font-weight: bold;
}

.page-news__card-title a {
    color: #017439;
    text-decoration: none;
}

.page-news__card-title a:hover {
    text-decoration: underline;
}

.page-news__card-text {
    color: #555555;
    margin: 0 20px 20px 20px;
    flex-grow: 1; /* Push link to bottom */
}

.page-news__card-link {
    display: inline-block;
    color: #C30808; /* Register/Login color for emphasis */
    text-decoration: none;
    font-weight: bold;
    margin: 0 20px 20px 20px;
    align-self: flex-start; /* Align to the start of the flex container */
    transition: color 0.3s ease;
}

.page-news__card-link:hover {
    color: #a00606;
    text-decoration: underline;
}

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

/* Dark Section Styling */
.page-news__dark-section,
.page-news__dark-bg {
    background-color: #017439; /* Primary brand color as background */
    color: #ffffff;
}

.page-news__dark-section .page-news__section-title,
.page-news__dark-bg .page-news__section-title {
    color: #ffffff;
}

.page-news__dark-section .page-news__section-description,
.page-news__dark-bg .page-news__section-description {
    color: #f0f0f0;
}

.page-news__dark-section .page-news__list-item,
.page-news__dark-bg .page-news__list-item {
    color: #ffffff;
}

.page-news__safety-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 40px auto;
    text-align: left;
}

.page-news__list-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 5px solid #FFFF00; /* Yellow accent */
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 1.1em;
}

.page-news__list-item strong {
    color: #FFFF00;
}

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

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

.page-news__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

.page-news__faq-question h3 {
    margin: 0;
    color: #017439;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #017439;
    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 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Use !important as required */
    padding: 15px 20px;
}

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

.page-news__faq-answer a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-news__faq-answer a:hover {
    text-decoration: underline;
}

/* Conclusion Section */
.page-news__conclusion {
    background-color: #017439;
    color: #ffffff;
    padding-bottom: 80px;
}

.page-news__conclusion .page-news__section-title {
    color: #ffffff;
}

.page-news__conclusion .page-news__section-description {
    color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-news__main-title {
        font-size: 2.8em;
    }

    .page-news__section-title {
        font-size: 2em;
    }

    .page-news__content-grid {
        flex-direction: column;
        text-align: center;
    }

    .page-news__content-grid--reverse {
        flex-direction: column; /* Revert for mobile */
    }

    .page-news__image-wrapper {
        margin-top: 30px;
    }

    .page-news__text-content {
        order: 2; /* Adjust order for reverse grid on mobile */
    }

    .page-news__image-wrapper {
        order: 1; /* Adjust order for reverse grid on mobile */
    }
}

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

    .page-news__hero-section {
        padding: 60px 15px;
    }

    .page-news__main-title {
        font-size: 2.2em;
    }

    .page-news__intro-text {
        font-size: 1em;
    }

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

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

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

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

    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

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

    .page-news__image,
    .page-news__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px; /* Still enforce minimum size, but allow scaling down */
        min-height: 200px;
    }

    .page-news__image-wrapper,
    .page-news__card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-news__text-content {
        padding: 0 15px;
    }

    .page-news__cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__card-title {
        font-size: 1.2em;
    }

    .page-news__card-text {
        font-size: 0.95em;
    }

    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }

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

    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 15px;
    }

    /* Video responsiveness - if any video exists, it would be here */
    .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; /* Ensure header offset */
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }

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