/* style/news.css */

/* --- General Styles & Reset --- */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Body background is white */
}

/* Ensure main content is not hidden by fixed header */
.page-news__hero-section {
    padding-top: var(--header-offset, 120px); /* Apply header offset */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

/* --- 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;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box;
    max-width: 100%;
}

.page-news__btn-primary {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__btn-primary:hover {
    background-color: #005a2e; /* Darker shade of primary */
    border-color: #005a2e;
}

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

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

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background-color: #f5f5f5;
    padding: 60px 0;
}

.page-news__hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 20px;
}

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

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

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.2; /* Subtle overlay */
}

/* --- Categories Section --- */
.page-news__categories {
    padding: 80px 0;
    background-color: #ffffff;
}

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

.page-news__category-card {
    display: block;
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-news__category-title {
    font-size: 1.5em;
    color: #017439;
    margin: 20px 20px 10px 20px;
}

.page-news__category-text {
    font-size: 1em;
    color: #666666;
    padding: 0 20px 20px 20px;
}

/* --- Featured Articles Section --- */
.page-news__featured-articles {
    padding: 80px 0;
    background-color: #f0f8f0; /* Light green tint */
}

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

.page-news__article-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.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.6em;
    margin-bottom: 10px;
}

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

.page-news__article-link:hover {
    color: #005a2e;
    text-decoration: underline;
}

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

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

/* --- Promotional News Section (Dark Background) --- */
.page-news__promotional-news {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color for dark background */
    color: #ffffff; /* White text for dark background */
}

.page-news__promotional-news .page-news__section-title,
.page-news__promotional-news .page-news__section-description {
    color: #ffffff;
}

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

.page-news__promo-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.page-news__promo-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.page-news__promo-title {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #ffffff;
}

.page-news__promo-date {
    font-size: 0.9em;
    color: #cccccc;
    margin-bottom: 15px;
}

.page-news__promo-excerpt {
    font-size: 1em;
    color: #f0f0f0;
    margin-bottom: 25px;
}

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

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

.page-news__insight-card {
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-news__insight-title {
    font-size: 1.6em;
    margin-bottom: 10px;
}

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

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

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

.page-news__cta-title {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-news__cta-description {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: #f0f0f0;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

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

.page-news__faq-item {
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    background-color: #e6f7e6; /* Lighter green for summary */
    border-bottom: 1px solid #d0e0d0;
    list-style: none; /* Hide default marker for details/summary */
}

.page-news__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Chrome */
}

.page-news__faq-item[open] .page-news__faq-question {
    border-bottom: 1px solid #c0d0c0;
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to cross */
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: #555555;
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0; /* Subtle border */
}

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


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

    .page-news__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        min-height: 400px;
        padding: 40px 0;
    }

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

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

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

    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 40px;
    }

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

    .page-news__category-image,
    .page-news__article-image,
    .page-news__insight-image {
        height: 180px;
    }

    .page-news__cta-title {
        font-size: 1.8em;
    }

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

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    /* 🚨 Mobile image and container responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__container,
    .page-news__hero-container,
    .page-news__category-card,
    .page-news__article-card,
    .page-news__promo-item,
    .page-news__insight-card,
    .page-news__cta-container,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 🚨 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; /* Ensure buttons take full width */
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important; /* Allow buttons to wrap */
        gap: 10px;
    }
    
    /* Ensure hero section padding-top is correct for mobile */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
    }
}

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

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

    .page-news__section-title {
        font-size: 1.5em;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 10px 20px;
    }

    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
}