/* style/news.css */

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

/* Base styles for the news page, ensuring contrast with shared body background */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--page-news-text-main); /* Default text color for dark background */
    background-color: var(--page-news-background); /* Override for specific sections if needed */
}

/* Ensure proper top padding for the first section, body handles --header-offset */
.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 for visual spacing */
    text-align: center;
    overflow: hidden;
    background-color: var(--page-news-background);
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    margin-bottom: 30px;
}

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

.page-news__hero-content {
    max-width: 900px;
    z-index: 1;
    padding: 0 20px;
}

.page-news__main-title {
    color: var(--page-news-text-main);
    font-size: clamp(2.2em, 4vw, 3.5em);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

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

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

.page-news__section-title {
    color: var(--page-news-text-main);
    font-size: 2.5em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.page-news__intro-section, .page-news__latest-news, .page-news__faq-section {
    background-color: #ffffff; /* Light background for these sections */
    color: #333333; /* Dark text for light background */
    padding: 60px 0;
}

.page-news__featured-news, .page-news__cta-section, .page-news__conclusion-section {
    background-color: var(--page-news-background);
    color: var(--page-news-text-main);
    padding: 60px 0;
}

.page-news__text-block {
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: inherit;
}

.page-news__highlight {
    color: var(--page-news-glow);
    font-weight: bold;
}

.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 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

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

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

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

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

.page-news__read-more-btn {
    display: inline-block;
    background: var(--page-news-button-gradient);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease;
    align-self: flex-start;
    max-width: 100%; /* Ensure button adapts */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__read-more-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.page-news__view-all-wrapper {
    text-align: center;
}

.page-news__btn-primary, .page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin: 10px;
    max-width: 100%; /* Ensure button adapts */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: var(--page-news-button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

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

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

.page-news__news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-news__list-card {
    background-color: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.page-news__list-card:hover {
    transform: translateY(-3px);
}

.page-news__list-card-image {
    width: 300px; /* Fixed width for desktop */
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.page-news__list-card-content {
    padding: 20px;
}

.page-news__list-card-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-news__list-card-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__list-card-title a:hover {
    color: #11A84E;
}

.page-news__list-card-meta {
    font-size: 0.85em;
    color: #666666;
    margin-bottom: 10px;
}

.page-news__list-card-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 15px;
}

.page-news__cta-section .page-news__container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: left;
}

.page-news__cta-image {
    flex: 1;
    min-width: 400px;
    max-width: 600px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.page-news__cta-content {
    flex: 1;
    min-width: 300px;
}

.page-news__cta-content .page-news__section-title {
    text-align: left;
    padding-top: 0;
    margin-bottom: 20px;
}

.page-news__cta-content .page-news__text-block {
    color: var(--page-news-text-secondary);
}

.page-news__cta-buttons {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* FAQ Section */
.page-news__faq-item {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #333333;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.15em;
    font-weight: 600;
    cursor: pointer;
    background-color: #e8e8e8;
    color: #333333;
    transition: background-color 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-question {
    background-color: #e0e0e0;
}

.page-news__faq-question:hover {
    background-color: #e0e0e0;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #11A84E;
}

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

.page-news__faq-answer {
    padding: 20px;
    padding-top: 0;
    font-size: 1em;
    color: #555555;
}

/* Details tag specific styling for FAQ */
.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-news__faq-item summary {
    list-style: none;
}

.page-news__conclusion-section .page-news__text-block {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 20px auto;
    color: var(--page-news-text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-section {
        padding: 40px 15px;
    }

    .page-news__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }

    .page-news__description {
        font-size: 1em;
    }

    .page-news__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-news__news-grid {
        gap: 20px;
    }

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

    .page-news__list-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-news__list-card-image {
        width: 100%;
        height: 200px;
    }

    .page-news__cta-section .page-news__container {
        flex-direction: column;
        text-align: center;
    }

    .page-news__cta-content .page-news__section-title {
        text-align: center;
    }

    .page-news__cta-image {
        min-width: unset;
        max-width: 100%;
    }

    .page-news__cta-buttons {
        justify-content: center;
    }
}

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

    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__hero-section {
        padding: 30px 15px;
        padding-top: 10px !important;
    }

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

    .page-news__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
        margin-bottom: 15px;
    }

    .page-news__description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 25px;
        padding-top: 30px;
    }

    .page-news__intro-section, .page-news__latest-news, .page-news__faq-section,
    .page-news__featured-news, .page-news__cta-section, .page-news__conclusion-section {
        padding: 40px 0;
    }

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

    .page-news__news-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .page-news__news-card-image {
        height: 180px;
    }

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

    .page-news__news-card-title {
        font-size: 1.1em;
    }

    .page-news__list-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .page-news__list-card-image {
        height: 150px;
    }

    .page-news__list-card-content {
        padding: 15px;
    }

    .page-news__list-card-title {
        font-size: 1.1em;
    }

    .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 15px;
        margin: 5px 0;
    }

    .page-news__cta-buttons {
        flex-direction: column !important;
        gap: 10px;
    }

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

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

    /* Mobile image adaptation */
    .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,
    .page-news__hero-section, .page-news__intro-section, .page-news__featured-news,
    .page-news__latest-news, .page-news__cta-section, .page-news__faq-section,
    .page-news__conclusion-section, .page-news__news-card, .page-news__list-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-news__cta-buttons, .page-news__button-group, .page-news__btn-container {
        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;
    }
}

/* Default color contrast for light sections */
.page-news__light-bg {
    color: #333333; /* Dark text for light background */
    background: #ffffff;
}

/* Default color contrast for dark sections */
.page-news__dark-bg {
    color: var(--page-news-text-main); /* Light text for dark background */
    background: var(--page-news-background);
}

/* Specific overrides for elements to ensure contrast if needed */
.page-news a {
    color: #11A84E; /* Ensure link color is distinct */
}

.page-news a:hover {
    color: #22C768; /* Hover state for links */
}