/* style/news.css */

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

/* Base styles for the news page, assuming a dark body background from shared.css */
.page-news {
    background-color: var(--color-background); /* Main background color */
    color: var(--color-text-main); /* Main text color for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: 10px; /* Small top padding for the first section, body handles --header-offset */
}

.page-news__section {
    padding: 60px 20px;
    margin-bottom: 20px;
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: var(--color-text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 0; /* No padding here as image/content will have their own */
    padding-top: 10px; /* Small top padding as per requirement */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.page-news__hero-content {
    padding: 40px 20px;
    max-width: 900px;
    margin-top: 20px; /* Separates content from image */
    z-index: 1; /* Ensure content is above any potential background elements */
    color: var(--color-text-main);
}

.page-news__hero-title {
    font-size: clamp(2em, 3.5vw, 3.2em); /* Responsive H1 font size */
    color: var(--color-gold);
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 1.2em;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-news__btn-primary {
    background: var(--color-button-gradient);
    color: #ffffff; /* White text for contrast */
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-secondary:hover {
    transform: translateY(-3px);
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-news__news-card {
    background-color: var(--color-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.page-news__card-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency, object-fit handles aspect ratio */
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 25px;
    flex-grow: 1; /* Allows content to expand and push button down */
    display: flex;
    flex-direction: column;
}

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

.page-news__card-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    flex-grow: 1; /* Allows title to take up available space */
}

.page-news__card-title a {
    color: var(--color-gold); /* Gold color for titles to stand out */
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.page-news__read-more {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin-top: auto; /* Pushes button to the bottom */
}

.page-news__read-more:hover {
    color: var(--color-secondary);
}

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

/* Content Sections (Analysis & Guides) */
.page-news__analysis-content,
.page-news__tips-content {
    margin-top: 40px;
    color: var(--color-text-main);
}

.page-news__analysis-content p,
.page-news__tips-content p {
    margin-bottom: 25px;
    font-size: 1.1em;
    color: var(--color-text-secondary);
}

.page-news__analysis-subtitle,
.page-news__tips-subtitle {
    font-size: 1.8em;
    color: var(--color-gold);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.page-news__content-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
}

/* FAQ Section */
.page-news__faq-list {
    margin-top: 40px;
}

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

.page-news__faq-item[open] {
    background-color: var(--color-deep-green);
    border-color: var(--color-primary);
}

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

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

.page-news__faq-question:hover {
    color: var(--color-gold);
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: 300;
    margin-left: 20px;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Plus sign rotates to form an X or just becomes a minus */
    content: '−'; /* Change to minus sign */
}

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

.page-news__faq-answer p {
    margin-bottom: 15px;
    color: var(--color-text-secondary);
}

.page-news__faq-answer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.page-news__faq-answer a:hover {
    text-decoration: underline;
}

/* CTA Section (reusing button styles) */
.page-news__cta-section {
    text-align: center;
    padding-bottom: 80px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__hero-title {
        font-size: clamp(1.8em, 4vw, 2.8em);
    }
}

@media (max-width: 768px) {
    .page-news__section {
        padding: 40px 15px;
    }
    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Ensure no horizontal scroll */
    }

    .page-news__hero-section {
        padding-top: 10px !important; /* body handles --header-offset, this is for visual spacing */
    }

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

    .page-news__hero-title {
        font-size: clamp(1.8em, 5vw, 2.5em);
    }

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

    .page-news__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .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: 12px 20px !important;
        margin-left: auto;
        margin-right: auto;
    }

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

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

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

    .page-news__analysis-subtitle,
    .page-news__tips-subtitle {
        font-size: 1.5em;
    }

    .page-news p,
    .page-news li {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__content-image {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        margin-left: auto;
        margin-right: auto;
    }

    /* Ensure all images are responsive */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Ensure all video containers are responsive (even if no video is present, rules are here) */
    .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;
    }
}

/* Ensure desktop video container has width: 100% alongside max-width */
.page-news__video-container {
    width: 100%; /* Important for desktop flex alignment with max-width */
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}