/* style/news.css */

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

.page-news {
    background-color: var(--color-background); /* Dark background */
    color: var(--color-text-main); /* Light text for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

.page-news h1,
.page-news h2,
.page-news h3,
.page-news h4,
.page-news h5,
.page-news h6 {
    color: var(--color-text-main);
    line-height: 1.2;
    margin-bottom: 15px;
}

.page-news h1 {
    font-size: clamp(2em, 4vw, 3.5em); /* H1 font-size with clamp */
    font-weight: bold;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news h2 {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

.page-news h3 {
    font-size: clamp(1.4em, 2.5vw, 1.8em);
    font-weight: 600;
}

.page-news p {
    margin-bottom: 1em;
    color: var(--color-text-secondary);
}

.page-news a {
    color: var(--color-glow); /* Links use glow color */
    text-decoration: none;
}

.page-news a:hover {
    text-decoration: underline;
    color: var(--color-gold);
}

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

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

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

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

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

.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--color-button-gradient);
    color: var(--color-text-main); /* White text on green button */
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: var(--color-text-main); /* Keep text color consistent on hover */
    text-decoration: none;
}

.page-news__cta-button--large {
    padding: 18px 40px;
    font-size: 1.1em;
}

/* Container for sections */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

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

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

.page-news__article-card {
    background-color: var(--color-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

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

.page-news__article-image-wrapper {
    width: 100%;
    height: 225px; /* Fixed height for consistent card images */
    overflow: hidden;
}

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

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

.page-news__article-title {
    margin-bottom: 10px;
}

.page-news__article-title a {
    color: var(--color-text-main); /* Article title links are main text color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: var(--color-gold); /* Gold on hover */
    text-decoration: underline;
}

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

.page-news__article-excerpt {
    font-size: 0.95em;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.page-news__read-more-button {
    display: inline-block;
    color: var(--color-glow);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-button:hover {
    color: var(--color-gold);
    text-decoration: underline;
}

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

/* Categories Section */
.page-news__categories-section {
    padding: 60px 0;
    background-color: var(--color-deep-green); /* Use deep green for contrast */
}

.page-news__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-news__category-card {
    background-color: var(--color-card-bg);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

.page-news__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: var(--color-text-main); /* Keep text color consistent on hover */
    text-decoration: none;
}

.page-news__category-title {
    margin-bottom: 10px;
    color: var(--color-text-main);
}

.page-news__category-description {
    font-size: 0.9em;
    color: var(--color-text-secondary);
}

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

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

.page-news__faq-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    color: var(--color-text-main);
    background-color: rgba(34, 199, 104, 0.1); /* Slightly lighter background for question */
    border-bottom: 1px solid var(--color-divider);
    list-style: none; /* For <summary> */
    user-select: none;
}

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

.page-news__faq-question:hover {
    background-color: rgba(34, 199, 104, 0.2);
}

.page-news__faq-qtext {
    flex-grow: 1;
    font-size: 1.1em;
}

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

.page-news__faq-item[open] .page-news__faq-question {
    border-bottom: 1px solid var(--color-divider);
}

.page-news__faq-answer {
    padding: 15px 25px;
    font-size: 0.95em;
    color: var(--color-text-secondary);
    background-color: var(--color-card-bg);
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--color-deep-green); /* Use deep green for contrast */
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-image-wrapper {
        max-height: 500px;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 15px;
    }
    .page-news h1 {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }
    .page-news h2 {
        font-size: clamp(1.6em, 5vw, 2.2em);
    }
    .page-news__hero-section {
        padding-top: 10px !important; /* body handles header offset, small top padding for section */
        padding-bottom: 40px;
    }
    .page-news__hero-image-wrapper {
        max-height: 400px;
        margin-bottom: 20px;
    }
    .page-news__hero-content {
        padding: 0 15px 40px;
    }
    /* Buttons responsiveness */
    .page-news__cta-button,
    .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-button--large {
        padding: 18px 25px;
    }
    .page-news__view-all-button-wrapper,
    .page-news__hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Container responsiveness */
    .page-news__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-news__latest-articles-section,
    .page-news__categories-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 0;
    }

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

    /* Image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
        min-width: 200px !important; /* Enforce min size for all content images */
        min-height: 200px !important;
    }

    .page-news__article-image-wrapper {
        height: auto; /* Allow height to adjust for mobile */
    }

    /* FAQ item for mobile */
    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-news__faq-answer {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .page-news h1 {
        font-size: clamp(1.6em, 8vw, 2.2em);
    }
    .page-news h2 {
        font-size: clamp(1.4em, 7vw, 1.8em);
    }
    .page-news__hero-image-wrapper {
        max-height: 300px;
    }
}

/* Ensure content images are at least 200px and no filters */
.page-news img {
    filter: none !important; /* Absolutely no filters */
}

/* Content area image CSS size lower bound (applies to all img within .page-news) */
.page-news img {
    min-width: 200px;
    min-height: 200px;
}