/* style/news.css */

/* Base styles for the page-news scope */
.page-news {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for the page */
    background-color: var(--background); /* Overall page background */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    padding-bottom: 60px; /* Space below content */
    padding-top: 10px; /* Small top padding, body handles header offset */
    overflow: hidden;
    background-color: var(--background);
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limit height for hero image */
}

.page-news__hero-content {
    max-width: 900px;
    text-align: center;
    padding: 0 20px;
    color: var(--text-main);
}

.page-news__main-title {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--gold-color); /* Use gold for main title for prominence */
    margin-bottom: 20px;
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.5); /* Subtle glow */
}

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

.page-news__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    gap: 20px;
}

/* Button styles */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    min-width: 180px;
    box-sizing: border-box; /* Crucial for mobile responsiveness */
}

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

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

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

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

.page-news__section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    padding-top: 60px;
}

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

/* Latest News Section */
.page-news__latest-news-section {
    background-color: var(--background);
    padding: 60px 0;
}

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

.page-news__news-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px 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;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

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

.page-news__card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1; /* Pushes link to bottom */
}

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

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

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

.page-news__card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    position: relative;
    padding-right: 15px; /* Space for arrow icon if added */
}

.page-news__card-link::after {
    content: '→'; /* Simple arrow icon */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.page-news__card-link:hover::after {
    transform: translateY(-50%) translateX(3px);
}

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

/* Featured Articles Section */
.page-news__featured-articles-section {
    padding: 60px 0;
    background-color: var(--deep-green); /* Darker background for contrast */
}

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

.page-news__featured-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

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

/* FAQ Section */
.page-news__faq-section {
    background-color: var(--deep-green);
    padding: 60px 0;
}

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

.page-news__faq-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: var(--text-main);
}

.page-news__faq-item summary {
    list-style: none; /* Hide default marker */
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    transition: background-color 0.3s ease;
}

.page-news__faq-item summary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-news__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--primary-color);
}

.page-news__faq-item[open] .page-news__faq-toggle {
    content: '−'; /* Change to minus when open */
}

.page-news__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    color: var(--text-secondary);
}

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

/* About k9cc Section */
.page-news__about-k9cc-section {
    background-color: var(--background);
    padding: 60px 0;
}

.page-news__text-block {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.page-news__text-block:last-child {
    margin-bottom: 0;
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-image {
        max-height: 400px;
    }
    .page-news__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-news__section-title {
        font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    }
    .page-news__card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Mobile video responsiveness - no videos here, but for safety */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__video-section {
        padding-top: 10px !important; /* Small top padding for mobile */
    }

    /* 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,
    .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-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important; /* Adjust gap for vertical stacking */
        overflow: hidden !important;
    }

    /* General container padding for mobile */
    .page-news__container,
    .page-news__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__hero-section {
        padding-bottom: 40px;
    }

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

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

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

    .page-news__section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        padding-top: 40px;
        margin-bottom: 30px;
    }

    .page-news__section-intro {
        font-size: 0.95rem;
        margin-bottom: 40px;
    }

    .page-news__news-grid,
    .page-news__featured-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .page-news__news-card,
    .page-news__featured-card {
        margin-bottom: 0; /* Gap is handled by grid */
    }

    .page-news__card-image {
        height: 180px; /* Adjust card image height for mobile */
    }

    .page-news__card-content {
        padding: 20px;
    }

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

    .page-news__card-summary {
        font-size: 0.95rem;
    }

    .page-news__faq-item summary {
        font-size: 1rem;
        padding: 18px 20px;
    }

    .page-news__faq-answer {
        font-size: 0.95rem;
        padding: 0 20px 18px 20px;
    }

    .page-news__text-block {
        font-size: 0.95rem;
    }
}