/* style/news.css */

/* Variables from custom palette */
:root {
    --page-news-bg: #08160F; /* Background */
    --page-news-card-bg: #11271B; /* Card BG */
    --page-news-text-main: #F2FFF6; /* Text Main */
    --page-news-text-secondary: #A7D9B8; /* Text Secondary */
    --page-news-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
    --page-news-border: #2E7A4E; /* Border */
    --page-news-glow: #57E38D; /* Glow */
    --page-news-gold: #F2C14E; /* Gold */
    --page-news-divider: #1E3A2A; /* Divider */
    --page-news-deep-green: #0A4B2C; /* Deep Green */
}

.page-news {
    background-color: var(--page-news-bg);
    color: var(--page-news-text-main);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

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

.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above content */
    align-items: center;
    padding: 60px 0;
    padding-top: 10px; /* Small top padding for visual spacing */
    overflow: hidden; /* Ensure no overflow */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin-bottom: 30px; /* Space between image and content */
    border-radius: 8px;
    max-width: 1200px; /* Constrain image width */
}

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

.page-news__main-title {
    font-weight: bold;
    color: var(--page-news-text-main);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    line-height: 1.2;
    /* Using clamp for font-size to prevent oversized H1 on mobile */
    font-size: clamp(2rem, 5vw, 3.2rem); 
}

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

.page-news__cta-button {
    display: inline-block;
    background: var(--page-news-button-gradient);
    color: var(--page-news-text-main);
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-news__section-title {
    color: var(--page-news-text-main);
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--page-news-gold);
    border-radius: 2px;
}

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

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

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

.page-news__news-card,
.page-news__insight-card {
    background-color: var(--page-news-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px 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 have equal height */
}

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

.page-news__news-card-image,
.page-news__insight-card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--page-news-divider);
}

.page-news__news-card-content,
.page-news__insight-card-content {
    padding: 25px;
    flex-grow: 1; /* Allow content to grow and push link to bottom */
    display: flex;
    flex-direction: column;
}

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

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

.page-news__news-card-title a:hover,
.page-news__insight-card-title a:hover {
    color: var(--page-news-gold);
}

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

.page-news__news-card-summary {
    font-size: 1em;
    color: var(--page-news-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow summary to take up available space */
}

.page-news__news-card-link,
.page-news__insight-card-link {
    display: inline-block;
    color: var(--page-news-gold);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push link to the bottom */
}

.page-news__news-card-link:hover,
.page-news__insight-card-link:hover {
    color: var(--page-news-glow);
}

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

/* Industry Insights Section */
.page-news__insight-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

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

.page-news__faq-item {
    background-color: var(--page-news-card-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--page-news-text-main);
    background-color: var(--page-news-card-bg);
    border-bottom: 1px solid var(--page-news-divider);
    user-select: none;
}

/* For details tag, hide default marker */
.page-news__faq-item[open] > .page-news__faq-question {
    border-bottom: 1px solid var(--page-news-divider);
}
.page-news__faq-item > summary {
    list-style: none;
}
.page-news__faq-item > summary::-webkit-details-marker {
    display: none;
}

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

.page-news__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: var(--page-news-text-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px; /* Large enough to accommodate content */
    padding: 0 25px 20px;
}
/* For details tag, answer is natively handled */
.page-news__faq-item[open] .page-news__faq-answer {
    max-height: none; /* Let browser handle height */
    padding: 0 25px 20px;
}


/* CTA Section */
.page-news__cta-section {
    text-align: center;
    background-color: var(--page-news-deep-green); /* Use a slightly different dark green for contrast */
    padding: 80px 0;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%; /* Ensure container takes full width for responsive */
    max-width: 600px; /* Limit button group width */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow: hidden; /* Prevent overflow */
}

.page-news__btn-primary {
    background: var(--page-news-button-gradient);
    color: var(--page-news-text-main);
}

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

.page-news__btn-secondary:hover {
    background: var(--page-news-gold);
    color: var(--page-news-bg); /* Dark text on gold hover */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__news-card-image,
    .page-news__insight-card-image {
        height: 180px;
    }
}

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

    .page-news__hero-content {
        padding: 0 15px;
    }

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

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

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

    .page-news__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-news__latest-news-section,
    .page-news__industry-insights-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 0;
    }

    .page-news__news-grid,
    .page-news__insight-cards-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }

    .page-news__news-card,
    .page-news__insight-card {
        margin-left: auto;
        margin-right: auto;
        max-width: 400px; /* Limit single card width on mobile */
    }

    .page-news__news-card-image,
    .page-news__insight-card-image {
        height: 200px; /* Adjust height for mobile */
    }

    .page-news__news-card-content,
    .page-news__insight-card-content {
        padding: 20px;
    }

    .page-news__news-card-title,
    .page-news__insight-card-title {
        font-size: 1.2em;
    }

    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

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

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    
    .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;
        padding-left: 15px; /* Add padding for inner text if button stretches */
        padding-right: 15px;
    }

    /* Images and containers for mobile 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;
    }
}

/* Ensure no filter on images */
.page-news img {
    filter: none !important;
}

/* Content area image size lower limit */
.page-news .page-news__content-area img,
.page-news .page-news__news-card-image,
.page-news .page-news__insight-card-image {
    min-width: 200px;
    min-height: 200px;
}