/* style/news.css */

/* Custom Colors */
:root {
    --cs88-primary: #11A84E; /* Main Color */
    --cs88-secondary: #22C768; /* Auxiliary Color */
    --cs88-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
    --cs88-card-bg: #11271B; /* Card BG */
    --cs88-background: #08160F; /* Background */
    --cs88-text-main: #F2FFF6; /* Text Main */
    --cs88-text-secondary: #A7D9B8; /* Text Secondary */
    --cs88-border: #2E7A4E; /* Border */
    --cs88-glow: #57E38D; /* Glow */
    --cs88-gold: #F2C14E; /* Gold */
    --cs88-divider: #1E3A2A; /* Divider */
    --cs88-deep-green: #0A4B2C; /* Deep Green */
}

/* Base styles for the news page, assuming a dark body background from shared.css */
.page-news {
    background-color: var(--cs88-background); /* Use the specified background color */
    color: var(--cs88-text-main); /* Main text color for dark background */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    box-sizing: border-box;
    overflow: hidden; /* Ensure no overflow */
}

.page-news__hero-image {
    width: 100%;
    max-width: 1920px; /* Max width for large screens */
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

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

.page-news__hero-description {
    font-size: 1.1rem;
    color: var(--cs88-text-secondary);
    margin-bottom: 30px;
}

/* General Sections */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    width: 100%; /* Ensure container takes full width on smaller screens */
}

.page-news__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--cs88-gold);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-news__section-description {
    font-size: 1.05rem;
    color: var(--cs88-text-secondary);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__news-card,
.page-news__insight-card {
    background-color: var(--cs88-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover,
.page-news__insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-news__card-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-news__card-date {
    font-size: 0.9rem;
    color: var(--cs88-text-secondary);
    margin-bottom: 10px;
    display: block;
}

.page-news__card-title {
    font-size: 1.35rem;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

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

.page-news__card-title a:hover {
    color: var(--cs88-primary);
}

.page-news__card-excerpt {
    font-size: 1rem;
    color: var(--cs88-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__card-link {
    display: inline-block;
    color: var(--cs88-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-news__card-link:hover {
    color: var(--cs88-gold);
    text-decoration: underline;
}

.page-news__view-all {
    text-align: center;
    margin-top: 20px;
}

/* Announcements Section */
.page-news__announcements-section {
    background-color: var(--cs88-deep-green); /* Slightly different background */
    padding: 60px 0;
}

.page-news__announcements-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-news__announcement-item {
    background-color: var(--cs88-card-bg);
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--cs88-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-news__announcement-date {
    font-size: 0.95rem;
    color: var(--cs88-text-secondary);
    margin-bottom: 8px;
    display: block;
}

.page-news__announcement-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 600;
}

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

.page-news__announcement-title a:hover {
    color: var(--cs88-primary);
}

.page-news__announcement-excerpt {
    font-size: 1rem;
    color: var(--cs88-text-secondary);
    margin-bottom: 15px;
}

.page-news__announcement-link {
    display: inline-block;
    color: var(--cs88-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-news__announcement-link:hover {
    color: var(--cs88-gold);
    text-decoration: underline;
}


/* CTA Section */
.page-news__cta-section {
    padding: 80px 20px;
    text-align: center;
    background: var(--cs88-primary); /* Using primary color for dark section */
    color: #ffffff; /* Forced white text for dark background */
}

.page-news__cta-section .page-news__section-title {
    color: #ffffff; /* White title on primary background */
    margin-bottom: 20px;
}

.page-news__cta-section .page-news__section-description {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
}

.page-news__faq-list {
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid var(--cs88-divider);
}

.page-news__faq-item {
    border-bottom: 1px solid var(--cs88-divider);
    padding: 20px 0;
    color: var(--cs88-text-main);
}

.page-news__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none; /* Remove default marker */
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cs88-text-main);
    padding: 10px 0;
}

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

.page-news__faq-qtext {
    flex-grow: 1;
    color: var(--cs88-text-main); /* Ensure contrast */
}

.page-news__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--cs88-gold);
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to form an 'x' or simply change to minus */
    content: '\2212'; /* Change to minus sign */
}

.page-news__faq-answer {
    padding-top: 15px;
    font-size: 1rem;
    color: var(--cs88-text-secondary);
    line-height: 1.7;
}

/* Buttons */
.page-news__btn-primary {
    display: inline-block;
    background: var(--cs88-button-gradient);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    max-width: 100%; /* Ensure responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--cs88-primary);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    border: 2px solid var(--cs88-primary);
    cursor: pointer;
    max-width: 100%; /* Ensure responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-image {
        height: 500px;
    }
}

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

    .page-news__hero-image {
        height: 300px;
        margin-bottom: 20px;
    }

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

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

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

    .page-news__section-title {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    .page-news__section-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .page-news__news-grid,
    .page-news__insights-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__news-card,
    .page-news__insight-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__card-image {
        height: 200px;
    }

    .page-news__card-title {
        font-size: 1.2rem;
    }

    .page-news__announcements-section {
        padding: 40px 0;
    }

    .page-news__announcement-item {
        padding: 20px;
    }

    .page-news__announcement-title {
        font-size: 1.1rem;
    }

    .page-news__cta-section {
        padding: 60px 15px;
    }

    .page-news__faq-list {
        padding: 0 15px;
    }

    .page-news__faq-item summary {
        font-size: 1.05rem;
    }

    .page-news__faq-answer {
        font-size: 0.95rem;
    }

    /* 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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-news__video-section { /* If video section were present */
        padding-top: 10px !important;
    }

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