/* style/news.css */

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

/* Base styles for the page-news scope */
.page-news {
    background-color: var(--page-news-bg-color); /* Body background handled by shared.css */
    color: var(--page-news-text-main);
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-bottom: 40px; /* Ensure space above footer */
}

/* Helper for main text color */
.page-news .text-main {
    color: var(--page-news-text-main);
}
.page-news .text-secondary {
    color: var(--page-news-text-secondary);
}

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

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 675px; /* Limit height for hero image */
    margin-bottom: 20px; /* Space between image and content */
    border-radius: 10px;
}

.page-news__hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
    color: var(--page-news-text-main);
}

.page-news__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--page-news-gold-color); /* Use gold for main title for prominence */
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(87, 227, 141, 0.5); /* Glow effect */
}

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

/* General Section Styles */
.page-news__section {
    padding: 60px 20px;
    text-align: center;
}

.page-news__dark-bg {
    background-color: var(--page-news-bg-color);
    color: var(--page-news-text-main);
}

.page-news__light-bg {
    background-color: var(--page-news-card-bg); /* Use card bg for light bg section */
    color: var(--page-news-text-main);
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--page-news-gold-color);
    text-shadow: 0 0 8px rgba(87, 227, 141, 0.3);
}

.page-news__section-description {
    font-size: 1rem;
    margin-bottom: 40px;
    color: var(--page-news-text-secondary);
}

/* CTA Button Styles */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: var(--page-news-button-gradient);
    color: var(--page-news-text-main);
    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: var(--page-news-card-bg);
    color: var(--page-news-glow-color);
    border: 2px solid var(--page-news-glow-color);
    margin-left: 20px;
}

.page-news__btn-secondary:hover {
    background-color: var(--page-news-glow-color);
    color: var(--page-news-bg-color);
    transform: translateY(-2px);
}

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

.page-news__news-card {
    background-color: var(--page-news-card-bg);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 8px 20px 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__news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
}

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

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

.page-news__card-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

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

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

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

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

.page-news__read-more-btn:hover {
    color: var(--page-news-gold-color);
}

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

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

.page-news__faq-section .page-news__section-title {
    color: var(--page-news-text-main);
    margin-bottom: 50px;
}

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

.page-news__faq-item {
    background-color: var(--page-news-card-bg);
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 20px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.page-news__faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--page-news-text-main);
    transition: color 0.3s ease;
}

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

.page-news__faq-item summary:hover {
    color: var(--page-news-glow-color);
}

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

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

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    padding-top: 15px;
    font-size: 1rem;
    color: var(--page-news-text-secondary);
    line-height: 1.7;
    border-top: 1px solid var(--page-news-divider-color);
    margin-top: 15px;
    padding-left: 0;
}

/* Bottom CTA Section */
.page-news__cta-bottom {
    padding: 80px 20px;
    background-color: var(--page-news-bg-color);
    text-align: center;
}

.page-news__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-news__cta-bottom .page-news__section-title {
    margin-bottom: 15px;
    color: var(--page-news-gold-color);
}

.page-news__cta-bottom .page-news__section-description {
    max-width: 800px;
    margin-bottom: 40px;
    color: var(--page-news-text-secondary);
}

.page-news__cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%; /* Ensure container width for mobile */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__news-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__hero-section,
    .page-news__section,
    .page-news__faq-section,
    .page-news__cta-bottom {
        padding: 40px 15px;
    }

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

    .page-news__main-title {
        font-size: 2.2rem;
    }

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

    .page-news__news-grid {
        grid-template-columns: 1fr;
    }

    .page-news__news-card {
        margin-bottom: 20px;
    }

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

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

    .page-news__cta-button,
    .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;
        margin-left: 0 !important; /* Remove margin-left for secondary button */
        margin-bottom: 15px; /* Add space between stacked buttons */
    }

    .page-news__btn-secondary {
        margin-top: 10px; /* Space if stacked */
    }

    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 0; /* Reset gap as buttons have mb */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important;
    }

    /* Mobile image responsiveness */
    .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__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }

    .page-news__faq-item {
        padding: 15px 20px;
    }

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

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8rem;
    }
    .page-news__section-title {
        font-size: 1.6rem;
    }
    .page-news__hero-description {
        font-size: 1rem;
    }
    .page-news__cta-button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}