/* style/news.css */
.page-news {
    font-family: 'Arial', sans-serif;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #1a1a1a; /* Inherited from body via shared.css */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px); /* Ensure spacing below fixed header */
    text-align: center;
    background: linear-gradient(135deg, #017439, #005a2d);
    color: #ffffff;
}

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFF00; /* Custom font color for main title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__intro-text {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

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

.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, transform 0.2s ease;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    box-sizing: border-box;
    text-align: center;
}

.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: #a30606;
    transform: translateY(-2px);
}

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

.page-news__btn-secondary:hover {
    background-color: #005a2d;
    transform: translateY(-2px);
}

/* Section Titles */
.page-news__section-title {
    font-size: 2.5em;
    color: #FFFF00; /* Custom color for section titles */
    text-align: center;
    margin-bottom: 50px;
    padding-top: 60px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* Featured Articles Section */
.page-news__featured-articles {
    padding: 80px 0;
    background-color: #1a1a1a; /* Dark background from body */
}

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

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.08); /* Light bg for cards on dark body */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
}

.page-news__article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

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

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-news__article-title a {
    color: #FFFF00; /* Article title links */
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-news__article-excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e0e0e0;
}

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

.page-news__read-more-link:hover {
    color: #FFFF00;
    text-decoration: underline;
}

/* Latest Updates Section */
.page-news__latest-updates {
    padding: 80px 0;
    background-color: #017439; /* Brand color as background */
    color: #ffffff; /* White text for brand color background */
}

.page-news__update-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.page-news__update-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-news__update-item:hover {
    transform: translateY(-5px);
}

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

.page-news__update-title a {
    color: #FFFF00; /* Update title links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__update-title a:hover {
    color: #ffffff;
}

.page-news__update-meta {
    font-size: 0.85em;
    color: #a0e0a0;
    margin-bottom: 15px;
}

.page-news__update-text {
    font-size: 1em;
    line-height: 1.6;
    color: #e0e0e0;
}

.page-news__view-all-button {
    text-align: center;
    margin-top: 50px;
}

/* Video Section */
.page-news__video-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Dark background from body */
    color: #ffffff;
    text-align: center;
}

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

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

.page-news__video-caption {
    font-size: 1.1em;
    color: #e0e0e0;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__video-cta {
    margin-top: 40px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background */
    color: #ffffff;
}

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    padding: 15px 0;
    cursor: pointer;
    color: #FFFF00; /* FAQ question color */
    transition: color 0.3s ease;
}

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

.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 15px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #e0e0e0;
}

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

.page-news__faq-answer p {
    margin: 0;
    line-height: 1.6;
}

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

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-news__main-title {
        font-size: 2.2em;
    }
    .page-news__intro-text {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
        padding-top: 40px;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 90%;
        max-width: 300px;
        padding: 12px 20px;
        font-size: 0.9em;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Ensure containers have proper padding for mobile */
    .page-news__container {
        padding: 0 15px;
    }

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

    .page-news__article-card,
    .page-news__update-item,
    .page-news__faq-item {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    
    /* Image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* 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 {
        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;
        padding-left: 0;
        padding-right: 0;
    }

    /* General content area max-width and overflow-x */
    .page-news {
        overflow-x: hidden;
        max-width: 100%;
    }

    .page-news__featured-articles,
    .page-news__latest-updates,
    .page-news__video-section,
    .page-news__faq-section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__article-title {
        font-size: 1.2em;
    }
    .page-news__faq-question {
        font-size: 1em;
    }
}