/* 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 */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    background-color: #1a1a2e; /* Ensure dark background for hero */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 1.3em;
    color: #f0f0f0;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4); /* Darken image for text readability */
}

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

.page-news__section-description {
    font-size: 1.1em;
    color: #f0f0f0; /* Light text for dark sections */
    text-align: center;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__light-bg .page-news__section-description,
.page-news__light-bg .page-news__news-card-text,
.page-news__light-bg .page-news__strategy-card-text,
.page-news__light-bg .page-news__promo-card-text,
.page-news__light-bg .page-news__faq-answer p {
    color: #333333; /* Dark text for light sections */
}

.page-news__light-bg .page-news__section-title {
    color: #017439; /* Brand color for titles on light background */
}

.page-news__light-bg {
    background-color: #ffffff; /* Light background */
    color: #333333;
    padding: 60px 0;
}

.page-news__dark-bg {
    background-color: #1a1a2e; /* Dark background */
    color: #ffffff;
    padding: 60px 0;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.1em;
    text-align: center;
    box-sizing: border-box; /* Ensure padding doesn't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
    border: 2px solid #017439;
    box-shadow: 0 4px 15px rgba(1, 116, 57, 0.4);
}

.page-news__btn-primary:hover {
    background-color: #005a2e;
    border-color: #005a2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 116, 57, 0.6);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: #017439;
    border: 2px solid #017439;
    margin-left: 15px;
}

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

.page-news__flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__flex-column {
    flex-direction: column;
}

/* News Articles Grid */
.page-news__articles-grid,
.page-news__strategy-grid,
.page-news__promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__news-card,
.page-news__strategy-card,
.page-news__promo-card {
    background-color: #f8f8f8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover,
.page-news__strategy-card:hover,
.page-news__promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-news__news-card-image,
.page-news__strategy-card-image,
.page-news__promo-card-image {
    width: 100%;
    height: 220px; /* Consistent height for card images */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.page-news__news-card-content,
.page-news__strategy-card-content,
.page-news__promo-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-news__news-card-title,
.page-news__strategy-card-title,
.page-news__promo-card-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__news-card-title a,
.page-news__strategy-card-title a,
.page-news__promo-card-title a {
    color: #017439; /* Brand color for card titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-title a:hover,
.page-news__strategy-card-title a:hover,
.page-news__promo-card-title a:hover {
    color: #005a2e;
}

.page-news__news-card-text,
.page-news__strategy-card-text,
.page-news__promo-card-text {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Technology Section */
.page-news__tech-section .page-news__image-wrapper {
    margin: 40px auto;
    max-width: 1000px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__tech-image {
    width: 100%;
    height: auto;
    display: block;
}

/* FAQ Section */
.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__faq-item {
    background-color: #f8f8f8;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    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: #333333;
    cursor: pointer;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-item[open] .page-news__faq-question {
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

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

/* Hide default details marker */
.page-news__faq-item summary {
    list-style: none;
}
.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-news__faq-answer {
    padding: 15px 25px 25px;
    font-size: 1em;
    color: #555555;
    background-color: #f8f8f8;
}

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

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

.page-news__cta-section .page-news__section-title {
    margin-bottom: 25px;
    color: #ffffff;
}

.page-news__cta-section .page-news__section-description {
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
}

/* 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 {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-news__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

    .page-news__section-title {
        font-size: 1.8em;
        padding-top: 30px;
    }
    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-news__articles-grid,
    .page-news__strategy-grid,
    .page-news__promotions-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-news__news-card-image,
    .page-news__strategy-card-image,
    .page-news__promo-card-image {
        height: 180px;
    }

    .page-news__news-card-content,
    .page-news__strategy-card-content,
    .page-news__promo-card-content {
        padding: 20px;
    }

    .page-news__news-card-title,
    .page-news__strategy-card-title,
    .page-news__promo-card-title {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 15px;
        margin-left: 0;
    }

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

    /* All images must be responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__hero-image-wrapper,
    .page-news__image-wrapper,
    .page-news__articles-grid,
    .page-news__strategy-grid,
    .page-news__promotions-grid,
    .page-news__news-card,
    .page-news__strategy-card,
    .page-news__promo-card,
    .page-news__faq-section,
    .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;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* Adjust padding for sections on mobile */
    .page-news__light-bg,
    .page-news__dark-bg {
        padding: 40px 0;
    }
    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }
    .page-news__faq-answer {
        padding: 10px 20px 20px;
    }
}

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