/* style/news.css */

/* Variables (if needed, otherwise directly use hex/gradient) */
:root {
    --page-news-bg-color: #08160F;
    --page-news-card-bg: #11271B;
    --page-news-text-main: #F2FFF6;
    --page-news-text-secondary: #A7D9B8;
    --page-news-border-color: #2E7A4E;
    --page-news-glow-color: #57E38D;
    --page-news-gold-color: #F2C14E;
    --page-news-divider-color: #1E3A2A;
    --page-news-deep-green-color: #0A4B2C;
    --page-news-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-news-primary-color: #11A84E;
    --page-news-secondary-color: #22C768;
}

.page-news {
    background-color: var(--page-news-bg-color);
    color: var(--page-news-text-main); /* Default text color for dark background */
    font-family: 'Arial', sans-serif; /* Example font */
    line-height: 1.6;
}

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

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

.page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle overlay for text readability */
    display: block;
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.6); /* Darker background for text readability */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 60px; /* Space from top */
}

.page-news__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    color: var(--page-news-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-news__intro-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--page-news-text-secondary);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__cta-button--hero {
    background: var(--page-news-button-gradient);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.page-news__cta-button--hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    opacity: 0.9;
}

/* Section Styles */
.page-news__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--page-news-text-main);
}

.page-news__section-title--dark {
    color: var(--page-news-text-main); /* For dark backgrounds */
}

.page-news__section-description {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: var(--page-news-text-secondary);
}

.page-news__section-description--dark {
    color: var(--page-news-text-secondary); /* For dark backgrounds */
}

.page-news__dark-section {
    background-color: var(--page-news-bg-color);
    padding: 80px 0;
    color: var(--page-news-text-main);
}

.page-news__light-section {
    background-color: #ffffff; /* White background for light sections */
    padding: 80px 0;
    color: #333333; /* Dark text for light background */
}

.page-news__light-section .page-news__section-title,
.page-news__light-section .page-news__section-description {
    color: #333333;
}


/* Latest News Section */
.page-news__latest-news-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-news__news-card {
    background-color: var(--page-news-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(--page-news-border-color);
}

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

.page-news__news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-news__news-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.page-news__news-card-content {
    padding: 25px;
}

.page-news__news-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--page-news-text-main);
}

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

.page-news__news-card-excerpt {
    font-size: 1rem;
    color: var(--page-news-text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limit to 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-news__read-more {
    color: var(--page-news-primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

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

.page-news__button-group {
    text-align: center;
    margin-top: 40px;
}

/* Analysis Section */
.page-news__analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-news__analysis-item {
    background-color: #ffffff; /* White card background for light section */
    color: #333333; /* Dark text for white background */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__analysis-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.page-news__analysis-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--page-news-primary-color); /* Use brand primary color for subtitles */
}

.page-news__analysis-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #555555; /* Slightly lighter dark text */
}

/* Guides Section */
.page-news__guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

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

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

.page-news__guide-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--page-news-text-main);
}

.page-news__guide-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--page-news-text-secondary);
}

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

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

.page-news__faq-item {
    background-color: #ffffff; /* White background for FAQ item */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #333333; /* Dark text for light background */
}

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

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

.page-news__faq-item summary:hover {
    background-color: #f5f5f5;
}

.page-news__faq-qtext {
    flex-grow: 1;
    color: #333333; /* Ensure dark text */
}

.page-news__faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-left: 15px;
    color: var(--page-news-primary-color);
}

.page-news__faq-item[open] .page-news__faq-toggle {
    content: "−";
}

.page-news__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    line-height: 1.6;
    color: #555555;
}

/* CTA Section */
.page-news__cta-section {
    padding-top: 80px;
    padding-bottom: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--page-news-deep-green-color); /* A deeper green for the CTA */
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
    color: var(--page-news-text-main);
    position: relative;
    z-index: 1;
}

.page-news__cta-section .page-news__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.page-news__cta-button--primary {
    background: var(--page-news-button-gradient);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.page-news__cta-button--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    opacity: 0.9;
}

.page-news__cta-button--secondary {
    background: transparent;
    color: var(--page-news-text-main);
    border: 2px solid var(--page-news-primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button--secondary:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__cta-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.2; /* Subtle background image */
    z-index: 0;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-content {
        padding: 30px 15px;
        margin-top: 40px;
    }

    .page-news__news-card-title {
        font-size: 1.3rem;
    }

    .page-news__analysis-subtitle,
    .page-news__guide-subtitle {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-bottom: 40px;
    }

    .page-news__hero-content {
        padding: 25px 15px;
        margin-top: 20px;
    }

    .page-news__main-title {
        font-size: clamp(2rem, 6vw, 2.8rem);
        margin-bottom: 15px;
    }

    .page-news__intro-text {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        margin-bottom: 25px;
    }

    .page-news__section-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-news__section-description {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        margin-bottom: 30px;
    }

    .page-news__news-grid,
    .page-news__analysis-grid,
    .page-news__guides-grid {
        grid-template-columns: 1fr; /* Single column layout */
    }

    .page-news__news-card-content,
    .page-news__analysis-item,
    .page-news__guide-item,
    .page-news__faq-item summary,
    .page-news__faq-answer {
        padding: 20px;
    }

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

    .page-news__analysis-subtitle,
    .page-news__guide-subtitle {
        font-size: 1.2rem;
    }

    .page-news__cta-section .page-news__button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-news__cta-button {
        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;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* All containers that might hold images or other content */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-news-section,
    .page-news__analysis-section,
    .page-news__guides-section,
    .page-news__faq-section,
    .page-news__cta-section,
    .page-news__news-card,
    .page-news__analysis-item,
    .page-news__guide-item,
    .page-news__faq-item,
    .page-news__button-group {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    
    .page-news__hero-image-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-news__hero-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .page-news__cta-section .page-news__button-group {
        padding-left: 15px;
        padding-right: 15px;
    }
}

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

/* Ensure content area images are not too small */
.page-news__content-area img,
.page-news__latest-news-section img,
.page-news__guides-section img,
.page-news__analysis-section img,
.page-news__cta-section img {
    min-width: 200px;
    min-height: 200px;
}

/* Specific override for mobile containers to ensure padding and overflow */
@media (max-width: 768px) {
    .page-news__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important;
    }
    .page-news__video-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
}