/* style/news.css */

/* Base styles for the page content */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff; /* White title on dark background */
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    color: #f0f0f0; /* Slightly off-white for description */
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 0; /* Header offset is applied to .page-news */
}

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

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: -1;
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    color: #ffffff;
}

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

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

.page-news__hero-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    background-color: #017439; /* Primary color */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__hero-button:hover {
    background-color: #005f2e; /* Darker green on hover */
    transform: translateY(-3px);
}

/* Video Section */
.page-news__video-section {
    background-color: #1a1a1a; /* Dark background for video section */
    padding: 60px 0;
}

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

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

.page-news__video-caption {
    color: #f0f0f0;
    font-style: italic;
    margin-top: 10px;
    font-size: 0.9em;
}

/* Featured News Grid */
.page-news__featured-news {
    background-color: #0a0a0a;
}

.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.05); /* Slightly transparent white for cards */
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

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

.page-news__article-title a:hover {
    color: #017439; /* Primary color on hover */
}

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

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

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

.page-news__arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

/* Categories Section */
.page-news__categories {
    background-color: #1a1a1a;
}

.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-news__category-card {
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.page-news__category-card:hover {
    transform: translateY(-5px);
    background-color: rgba(1, 116, 57, 0.8); /* Primary color with transparency */
}

.page-news__category-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: bold;
}

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

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

.page-news__category-description {
    color: #cccccc;
    font-size: 0.9em;
}

/* Latest Articles List */
.page-news__latest-articles {
    background-color: #0a0a0a;
}

.page-news__articles-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.page-news__list-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.page-news__list-image {
    width: 250px; /* Fixed width for list image */
    height: 180px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

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

.page-news__list-title {
    font-size: 1.2em;
    margin-bottom: 8px;
    font-weight: bold;
}

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

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

.page-news__list-excerpt {
    color: #cccccc;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Call to Action Buttons */
.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;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    box-sizing: border-box; /* Crucial for responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.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: #a30707; /* Darker red on hover */
    transform: translateY(-3px);
}

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

.page-news__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
    transform: translateY(-3px);
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #1a1a1a;
    text-align: left;
}

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

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

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

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

.page-news__faq-question h3 {
    margin: 0;
    font-size: 1.15em;
    color: #ffffff;
}

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

.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: #cccccc;
    font-size: 0.95em;
}

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

/* Dark section for CTA */
.page-news__dark-section {
    background-color: #017439; /* Primary brand color as background */
    color: #ffffff;
    padding: 80px 0;
}

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

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

/* 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__article-image {
        height: 200px;
    }
    .page-news__list-image {
        width: 200px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .page-news {
        padding-top: var(--header-offset, 120px) !important; /* Ensure content is below fixed header on mobile */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__hero-section {
        height: 450px;
    }

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

    .page-news__hero-description {
        font-size: 1em;
    }

    .page-news__hero-button {
        padding: 12px 25px;
        font-size: 1em;
    }

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

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__article-card,
    .page-news__category-card,
    .page-news__list-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__article-card {
        margin-left: 0;
        margin-right: 0;
    }

    .page-news__article-image {
        height: 180px; /* Smaller height for mobile cards */
    }

    .page-news__list-item {
        flex-direction: column; /* Stack image and content */
    }

    .page-news__list-image {
        width: 100%; /* Full width for image */
        height: 200px; /* Fixed height for list image */
    }

    /* Video responsiveness */
    .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: 0 !important; /* Container handles padding */
        padding-right: 0 !important; /* Container handles padding */
        overflow: hidden !important;
    }

    /* Buttons responsiveness */
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news__hero-button,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-section {
        height: 350px;
    }
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__article-image {
        height: 150px;
    }
    .page-news__list-image {
        height: 150px;
    }
}