/* style/news.css */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css (#121212) */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
    background-color: #017439; /* Brand primary color for hero background */
    color: #ffffff;
    overflow: hidden;
    text-align: center;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #ffff00; /* Yellow for prominence */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

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

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

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

/* General Section Styles */
.page-news__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
}

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

/* Article Grid */
.page-news__latest-updates {
    padding: 60px 0;
    background-color: #ffffff;
    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: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-news__article-title {
    font-size: 1.5em;
    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: #00562e;
}

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

.page-news__article-excerpt {
    margin-bottom: 20px;
    color: #555555;
}

.page-news__read-more-btn {
    display: inline-block;
    background-color: #017439;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.page-news__read-more-btn:hover {
    background-color: #00562e;
}

/* Industry Insights */
.page-news__industry-insights {
    padding: 60px 0;
    background-color: #017439;
    color: #ffffff;
}

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

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

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

.page-news__insight-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__insight-title {
    font-size: 1.8em;
    color: #ffff00; /* Yellow for prominence */
    margin-bottom: 15px;
}

.page-news__insight-text {
    font-size: 1.05em;
    color: #f0f0f0;
    margin-bottom: 20px;
}

/* Featured Video */
.page-news__featured-video {
    padding: 60px 0;
    background-color: #ffffff;
    color: #333333;
}

.page-news__featured-video .page-news__section-title {
    color: #017439;
}

.page-news__featured-video .page-news__section-description {
    color: #666666;
}

.page-news__video-wrapper {
    display: block;
    position: relative;
    width: 100%;
    max-width: 1000px; /* Max width for video container */
    margin: 40px auto 0 auto;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.page-news__video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #017439;
    color: #ffffff;
}

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

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

.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;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
    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-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    margin-left: 15px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    color: #f0f0f0;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficient height for content */
    padding: 15px 25px 25px 25px;
}

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

.page-news__faq-link {
    color: #ffff00; /* Yellow for links */
    text-decoration: underline;
}

.page-news__faq-link:hover {
    color: #ffcc00;
}

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

.page-news__cta-section .page-news__section-title, 
.page-news__cta-title {
    color: #017439;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.page-news__cta-section .page-news__section-description, 
.page-news__cta-description {
    color: #666666;
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background-color: #C30808; /* Red for register/login */
    color: #FFFF00; /* Yellow text for register/login */
    border: 2px solid #C30808;
}

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

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

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

/* Dark/Light Background Helpers */
.page-news__dark-section {
    background-color: #017439;
    color: #ffffff;
}

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

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

@media (max-width: 768px) {
    .page-news__hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: var(--header-offset, 120px) !important; /* Ensure content is not hidden by fixed header */
    }
    
    .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__section-description {
        font-size: 1em;
    }

    .page-news__article-grid,
    .page-news__insight-grid {
        grid-template-columns: 1fr;
    }

    .page-news__article-card {
        margin: 0 auto;
        max-width: 400px;
    }
    
    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* 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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 15px; /* Add padding to prevent content touching edges */
    }

    /* Mobile button responsiveness */
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .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__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent content touching edges */
    }

    /* General container padding for mobile */
    .page-news__container,
    .page-news__hero-content,
    .page-news__article-content,
    .page-news__insight-item,
    .page-news__faq-question,
    .page-news__faq-answer {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Ensure sections and main content do not overflow */
    .page-news__hero-section,
    .page-news__latest-updates,
    .page-news__industry-insights,
    .page-news__featured-video,
    .page-news__faq-section,
    .page-news__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .page-news {
        overflow-x: hidden !important;
    }
}

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