/* style/news.css */

/* Base Styles & Typography */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #1a1a1a; /* Inherited from shared.css, explicitly set for clarity */
}

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

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

.page-news__dark-bg {
    background-color: #017439; /* Primary brand color */
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #f8f9fa;
    color: #333333;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    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: #FFFF00; /* Custom font color for register/login */
    border: 2px solid #C30808;
}

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

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

.page-news__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    overflow: hidden;
}

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFF00; /* Custom font color for register/login */
    line-height: 1.2;
}

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

.page-news__hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 80px 0;
}

.page-news__latest-articles .page-news__section-title,
.page-news__latest-articles .page-news__section-description {
    color: #333333;
}

.page-news__articles-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;
    color: #333333;
}

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

.page-news__article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.page-news__article-content {
    padding: 20px;
}

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    min-height: 70px; /* Ensure consistent card height */
}

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

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

.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;
}

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

.page-news__read-more:hover {
    color: #005f2e;
    text-decoration: underline;
}

/* Featured Video Section */
.page-news__featured-video {
    padding: 80px 0;
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto 30px auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.page-news__video-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

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

.page-news__faq-section .page-news__section-title,
.page-news__faq-section .page-news__section-description {
    color: #333333;
}

.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;
    color: #333333;
}

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

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    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 contain content */
    padding: 15px 20px;
}

.page-news__faq-answer p {
    margin-bottom: 10px;
    color: #555555;
}

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

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

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #017439;
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .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__article-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-image {
        height: 200px;
    }
    
    /* Mobile Image Responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__hero-image-wrapper,
    .page-news__article-card,
    .page-news__video-wrapper,
    .page-news__faq-item,
    .page-news__cta-section .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile Video Responsiveness */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__video-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: hidden !important;
    }

    /* Mobile Button Responsiveness */
    .page-news__hero-cta,
    .page-news__video-cta,
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 15px; /* Adjust padding for smaller screens */
    }

    .page-news__hero-content {
        padding: 15px;
    }
    .page-news__latest-articles,
    .page-news__featured-video,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 0;
    }
    .page-news__faq-question {
        font-size: 1em;
        padding: 12px 15px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 12px 15px;
    }
}