/* style/news.css */

/* Custom Colors */
:root {
    --color-primary: #11A84E; /* Main */
    --color-secondary: #22C768; /* Auxiliary */
    --color-button-gradient-start: #2AD16F;
    --color-button-gradient-end: #13994A;
    --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;
}

.page-news {
    background-color: var(--color-background);
    color: var(--color-text-main); /* Light text on dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Base section and container styling */
.page-news__section {
    padding: 40px 0;
    width: 100%;
    box-sizing: border-box;
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%; /* Ensure width 100% alongside max-width */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 700px; /* Limit height for aesthetic */
    overflow: hidden;
    position: relative;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(0.6); /* Darken image slightly for text contrast, not changing color */
}

.page-news__hero-content {
    position: relative; /* Ensure content is above image filter */
    z-index: 1;
    margin-top: -150px; /* Pull content up over the image, but not *on* it */
    padding: 20px;
    background: linear-gradient(0deg, var(--color-background) 0%, rgba(8, 22, 15, 0.8) 70%, rgba(8, 22, 15, 0) 100%);
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    border-radius: 10px;
}

.page-news__main-title {
    color: var(--color-text-main);
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 15px;
    max-width: 700px; /* Limit H1 width */
    margin-left: auto;
    margin-right: auto;
}

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

/* CTA Button Styles */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; /* Ensure padding/border included in width */
}

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

.page-news__cta-button--secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    box-shadow: none;
}

.page-news__cta-button--secondary:hover {
    background: var(--color-primary);
    color: #ffffff;
}

.page-news__section-title {
    color: var(--color-text-main);
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

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

.page-news__news-card {
    background-color: var(--color-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

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

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

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

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

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

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

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

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

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

.page-news__read-more:hover {
    text-decoration: underline;
}

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

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

.page-news__guide-item {
    background-color: var(--color-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 25px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.page-news__guide-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-news__guide-title {
    color: var(--color-text-main);
    font-size: 1.3em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__guide-text {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

/* FAQ Section */
.page-news__faq {
    background-color: var(--color-deep-green); /* Use a slightly different dark green for variation */
    padding: 60px 0;
}

.page-news__faq-list {
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__faq-item[open] {
    background-color: rgba(17, 40, 27, 0.8); /* Slightly lighter when open */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: bold;
    color: var(--color-text-main);
    font-size: 1.1em;
    border-bottom: 1px solid var(--color-divider);
    list-style: none; /* Remove default marker for details/summary */
}

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

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

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

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

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

/* Bottom CTA Section */
.page-news__cta-bottom {
    text-align: center;
    padding: 60px 0;
}

.page-news__cta-bottom .page-news__description {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-content {
        margin-top: -100px;
    }
    .page-news__main-title {
        font-size: 2.2em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-bottom: 40px;
    }
    .page-news__hero-content {
        margin-top: -80px;
        padding: 15px;
    }
    .page-news__main-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    .page-news__description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__cta-button-wrapper,
    .page-news__view-all-button-wrapper,
    .page-news__hero-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-news__section-title {
        font-size: 1.6em;
        margin-bottom: 30px;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__news-grid,
    .page-news__guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__card-image {
        height: 180px;
    }
    .page-news__card-title {
        font-size: 1.2em;
    }
    .page-news__guide-image {
        max-width: 200px;
    }
    .page-news__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 10px 20px 15px;
    }

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

    /* All containers with images/content */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__news-card,
    .page-news__guide-item,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by .page-news__container for overall sections */
    }

    /* Specific padding for sections if not handled by container */
    .page-news__hero-section,
    .page-news__featured-news,
    .page-news__guides,
    .page-news__faq,
    .page-news__cta-bottom {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-content {
        margin-top: -60px;
    }
    .page-news__main-title {
        font-size: 1.5em;
    }
    .page-news__section-title {
        font-size: 1.4em;
    }
    .page-news__cta-button {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}

/* Ensure no CSS filters are applied to images */
.page-news img {
    filter: none;
}