/* style/news.css */

/* --- General Page Styles --- */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Using custom text color for dark background */
    background-color: var(--background-color); /* From custom colors #08160F */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* --- Hero Section --- */
.page-news__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 60px 0; /* Small top padding, body handles header offset */
    background-color: var(--background-color);
    position: relative;
    overflow: hidden;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit hero image height */
    overflow: hidden;
    margin-bottom: 30px;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-news__hero-content {
    max-width: 900px;
    text-align: center;
    padding: 0 20px;
    position: relative; /* Ensure content is above any potential background elements */
    z-index: 2;
}

.page-news__main-title {
    font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size */
    color: var(--gold); /* Gold for main title */
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.page-news__description {
    font-size: 1.15em;
    color: var(--text-main);
    margin-bottom: 30px;
}

.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;
    transition: all 0.3s ease;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-news__btn-primary {
    background: var(--button-gradient); /* Custom button gradient */
    color: #ffffff; /* White text for primary button */
    border: none;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-news__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--text-main); /* Light text for secondary button */
    border: 2px solid var(--deep-green); /* Border with deep green */
}

.page-news__btn-secondary:hover {
    background-color: var(--deep-green);
    color: #ffffff;
}

/* --- Latest News Section --- */
.page-news__latest-news {
    padding: 80px 0;
    background-color: var(--card-bg); /* Dark background for this section */
}

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

.page-news__news-card {
    background-color: var(--background-color); /* Darker background for cards */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
}

.page-news__news-card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    object-fit: cover;
    display: block;
}

.page-news__news-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__news-card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__news-card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
    color: var(--glow);
}

.page-news__news-card-meta {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-news__news-card-excerpt {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__news-card-link {
    display: inline-block;
    color: var(--glow);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.page-news__news-card-link:hover {
    text-decoration: underline;
}

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

/* --- Featured Articles Section --- */
.page-news__featured-articles {
    padding: 80px 0;
    background-color: var(--text-main); /* Light background for this section */
    color: #333333; /* Dark text for light background */
}

.page-news__featured-articles .page-news__section-title,
.page-news__featured-articles .page-news__section-description {
    color: #333333; /* Dark text for light background */
}

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

.page-news__article-item {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: #ffffff; /* White card background */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    border: 1px solid #e0e0e0;
}

.page-news__article-item--reverse {
    flex-direction: row-reverse;
}

.page-news__article-image {
    width: 40%;
    min-width: 300px; /* Ensure images are not too small on desktop */
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.page-news__article-content {
    flex: 1;
}

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

.page-news__article-title a {
    color: #333333; /* Dark text for light background */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: var(--deep-green);
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #666666; /* Slightly lighter dark text */
    margin-bottom: 15px;
}

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

.page-news__article-link {
    display: inline-block;
    color: var(--deep-green);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__article-link:hover {
    text-decoration: underline;
}

/* --- Promotions News Section (Similar to Latest News) --- */
.page-news__promotions-news {
    padding: 80px 0;
    background-color: var(--card-bg); /* Dark background */
}

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

.page-news__promotion-card {
    background-color: var(--background-color); /* Darker background for cards */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
}

.page-news__promotion-card:hover {
    transform: translateY(-5px);
}

.page-news__promotion-card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistent card images */
    object-fit: cover;
    display: block;
}

.page-news__promotion-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__promotion-card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__promotion-card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__promotion-card-title a:hover {
    color: var(--glow);
}

.page-news__promotion-card-meta {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-news__promotion-card-excerpt {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__promotion-card-link {
    display: inline-block;
    color: var(--glow);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.page-news__promotion-card-link:hover {
    text-decoration: underline;
}

/* --- FAQ Section --- */
.page-news__faq-section {
    padding: 80px 0;
    background-color: var(--text-main); /* Light background */
    color: #333333; /* Dark text for light background */
}

.page-news__faq-section .page-news__section-title,
.page-news__faq-section .page-news__section-description {
    color: #333333; /* Dark text for light background */
}

.page-news__faq-list {
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid #e0e0e0;
}

.page-news__faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0; /* Remove default margin for details */
}

.page-news__faq-item summary {
    list-style: none; /* Remove default marker */
    padding: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.page-news__faq-item summary:hover {
    color: var(--deep-green);
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Remove marker for WebKit browsers */
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
}

.page-news__faq-answer {
    padding: 0 0 20px 0;
    font-size: 1em;
    color: #555555;
}

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

/* --- CTA Bottom Section --- */
.page-news__cta-bottom {
    padding: 80px 0;
    text-align: center;
    background-color: var(--deep-green); /* Deep Green background */
    color: var(--text-main);
}

.page-news__cta-bottom .page-news__section-title {
    color: var(--gold); /* Gold title for CTA */
}

.page-news__cta-bottom .page-news__description {
    color: var(--text-main);
}

/* --- Custom Color Variables (from prompt) --- */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --background-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow: #57E38D;
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .page-news__hero-image-wrapper {
        max-height: 400px;
    }

    .page-news__article-item,
    .page-news__article-item--reverse {
        flex-direction: column;
        text-align: center;
    }

    .page-news__article-image {
        width: 100%;
        min-width: unset;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: 10px !important; /* body handles header offset */
        padding-bottom: 40px;
    }

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

    .page-news__hero-image-wrapper {
        max-height: 300px;
    }

    .page-news__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }

    .page-news__description {
        font-size: 1em;
    }

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

    /* Mobile button adaptation */
    .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,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-news__cta-buttons {
        display: flex;
        flex-direction: column;
    }

    /* Mobile image adaptation */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-image-wrapper,
    .page-news__news-card,
    .page-news__promotion-card,
    .page-news__article-item {
        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 */
    }

    /* Content area image size constraint */
    .page-news__news-card-image,
    .page-news__promotion-card-image,
    .page-news__article-image {
      min-width: 200px !important; /* Ensure min size as per rule */
      width: 100% !important;
      height: auto !important; /* Allow height to adjust */
    }

    /* Ensure content images meet min size requirement */
    .page-news__news-grid img,
    .page-news__article-list img,
    .page-news__promotions-grid img {
        min-width: 200px !important;
        min-height: 200px !important;
    }
}

@media (max-width: 480px) {
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__news-card-title,
    .page-news__promotion-card-title {
        font-size: 1.2em;
    }
    .page-news__article-title {
        font-size: 1.5em;
    }
}