/* style/news.css */
.page-news {
    color: #ffffff; /* Default text color for dark body background */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

.page-news__dark-section {
    background-color: #017439;
    color: #ffffff;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Apply header offset */
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
    padding: 60px 20px;
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

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

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

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

.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;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #ffffff; /* Ensuring contrast on #C30808 */
    border: 2px solid #C30808;
}

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

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

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

.page-news__btn-large {
    padding: 18px 35px;
    font-size: 1.1em;
}

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

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

/* Latest Articles Section */
.page-news__latest-articles .page-news__section-title,
.page-news__latest-articles .page-news__section-description {
    color: #333333;
}

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

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

.page-news__article-card:hover {
    transform: translateY(-5px);
}

.page-news__article-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    min-width: 200px; /* Ensure min size */
    min-height: 200px; /* Ensure min size */
}

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

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

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

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

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

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

.page-news__read-more {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto;
}

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

/* Featured Video Section */
.page-news__featured-video .page-news__section-title,
.page-news__featured-video .page-news__video-description {
    color: #ffffff;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 30px;
    border-radius: 10px;
    cursor: pointer;
}

.page-news__video-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    min-width: 200px; /* Ensure min size */
    min-height: 200px; /* Ensure min size */
}

.page-news__video-description {
    text-align: center;
    font-style: italic;
    color: #f0f0f0;
}

/* Deep Dive Section */
.page-news__deep-dive .page-news__section-title,
.page-news__deep-dive .page-news__section-description,
.page-news__deep-dive .page-news__sub-title,
.page-news__deep-dive p {
    color: #333333;
}

.page-news__sub-title {
    font-size: 1.8em;
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #017439;
}

.page-news__deep-dive p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.page-news__content-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Ensure min size */
    min-height: 200px; /* Ensure min size */
}

/* FAQ Section */
.page-news__faq-section .page-news__section-title {
    color: #ffffff;
}

.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

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

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

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

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffffff;
    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;
}

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

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

/* CTA Bottom Section */
.page-news__cta-bottom .page-news__section-title,
.page-news__cta-bottom .page-news__section-description {
    color: #333333;
}

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

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__dark-section, .page-news__light-bg {
        padding: 40px 15px;
    }
    .page-news__main-title {
        font-size: 2.2em;
        line-height: 1.2;
    }
    .page-news__intro-text {
        font-size: 1em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 0.95em;
    }
    .page-news__article-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-image,
    .page-news__video,
    .page-news__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-news__container,
    .page-news__article-card,
    .page-news__faq-item,
    .page-news__video-section,
    .page-news__deep-dive,
    .page-news__cta-bottom {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__featured-video {
      padding-top: var(--header-offset, 120px) !important;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__sub-title {
        font-size: 1.3em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
    }
}