/* style/news.css */

:root {
    --page-news-bg-dark: #08160F;
    --page-news-bg-card-dark: #11271B;
    --page-news-text-main-light: #F2FFF6;
    --page-news-text-secondary-light: #A7D9B8;
    --page-news-border-color: #2E7A4E;
    --page-news-btn-primary-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-news-primary-color: #11A84E;
    --page-news-secondary-color: #22C768;
    --page-news-bg-light: #ffffff; /* Default light background for contrast */
    --page-news-text-dark: #333333; /* Default dark text for contrast */
}

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

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

/* Dark background sections */
.page-news__dark-section {
    background: var(--page-news-bg-dark);
    color: var(--page-news-text-main-light);
    padding: 60px 0;
}

/* Light background sections */
.page-news__light-bg {
    background: var(--page-news-bg-light);
    color: var(--page-news-text-dark);
    padding: 60px 0;
}

.page-news__section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
    color: inherit;
}

.page-news__section-description {
    font-size: clamp(16px, 2vw, 20px);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--page-news-text-secondary-light); /* For dark sections */
}
.page-news__light-bg .page-news__section-description {
    color: var(--page-news-text-dark);
}

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

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 700px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 30px;
}

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

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

.page-news__main-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--page-news-text-main-light);
}

.page-news__description {
    font-size: clamp(18px, 2.5vw, 24px);
    margin-bottom: 30px;
    color: var(--page-news-text-secondary-light);
}

.page-news__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

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

.page-news__btn-primary {
    background: var(--page-news-btn-primary-gradient);
    color: var(--page-news-text-main-light);
    border: 2px solid transparent;
}

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

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

.page-news__btn-secondary:hover {
    background: var(--page-news-primary-color);
    color: var(--page-news-text-main-light);
}

/* News Grid */
.page-news__latest-news {
    background: var(--page-news-bg-light);
    color: var(--page-news-text-dark);
}

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

.page-news__news-card {
    background: var(--page-news-bg-card-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    color: var(--page-news-text-main-light);
    border: 1px solid var(--page-news-border-color);
}

.page-news__light-bg .page-news__news-card {
    background: var(--page-news-bg-light);
    color: var(--page-news-text-dark);
    border: 1px solid #e0e0e0;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
}

.page-news__card-image {
    width: 100%;
    height: 225px;
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 25px;
}

.page-news__card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.page-news__card-meta {
    font-size: 14px;
    color: var(--page-news-text-secondary-light);
    margin-bottom: 15px;
}
.page-news__light-bg .page-news__card-meta {
    color: #666;
}

.page-news__card-excerpt {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.page-news__read-more {
    color: var(--page-news-primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.page-news__cta-container {
    text-align: center;
    margin-top: 50px;
}

/* Featured News */
.page-news__featured-news .page-news__section-description {
    color: var(--page-news-text-secondary-light);
}

.page-news__featured-card {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: var(--page-news-bg-card-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--page-news-border-color);
    color: var(--page-news-text-main-light);
    padding: 30px;
}

.page-news__featured-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.page-news__featured-content {
    display: flex;
    flex-direction: column;
}

.page-news__featured-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-news__featured-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-news__featured-meta {
    font-size: 15px;
    color: var(--page-news-text-secondary-light);
    margin-bottom: 15px;
}

.page-news__featured-excerpt {
    font-size: 17px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.page-news__featured-text {
    font-size: 17px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* FAQ Section */
.page-news__faq-section {
    background: var(--page-news-bg-light);
    color: var(--page-news-text-dark);
}

.page-news__faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.page-news__faq-item {
    background: var(--page-news-bg-card-dark);
    border-radius: 12px;
    border: 1px solid var(--page-news-border-color);
    overflow: hidden;
    color: var(--page-news-text-main-light);
}

.page-news__light-bg .page-news__faq-item {
    background: var(--page-news-bg-light);
    color: var(--page-news-text-dark);
    border: 1px solid #e0e0e0;
}

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

.page-news__faq-item details > summary::-webkit-details-marker {
    display: none;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid var(--page-news-border-color);
    transition: background-color 0.3s ease;
}

.page-news__light-bg .page-news__faq-question {
    border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-item[open] .page-news__faq-question {
    background-color: rgba(0, 0, 0, 0.1);
}

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

.page-news__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: var(--page-news-primary-color);
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 16px;
    line-height: 1.6;
}

.page-news__faq-answer p {
    margin-bottom: 10px;
}

/* Bottom CTA */
.page-news__cta-bottom {
    text-align: center;
}

/* Responsive adjustments */
@media (min-width: 769px) {
    .page-news__featured-card {
        flex-direction: row;
        align-items: center;
    }

    .page-news__featured-image {
        flex: 0 0 50%;
        max-width: 50%;
        margin-right: 30px;
    }

    .page-news__featured-content {
        flex: 1;
    }
}

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

    .page-news__hero-image-wrapper {
        margin-bottom: 20px;
    }

    .page-news__main-title {
        font-size: clamp(28px, 8vw, 42px);
    }

    .page-news__description {
        font-size: clamp(16px, 4vw, 20px);
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__section-title {
        font-size: clamp(24px, 7vw, 36px);
    }

    .page-news__section-description {
        font-size: clamp(15px, 3.5vw, 18px);
        margin-bottom: 30px;
    }

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

    .page-news__news-card {
        margin: 0 15px;
    }

    .page-news__card-title {
        font-size: 20px;
    }

    .page-news__card-meta {
        font-size: 13px;
    }

    .page-news__card-excerpt {
        font-size: 15px;
    }

    .page-news__featured-card {
        margin: 0 15px;
        padding: 20px;
    }

    .page-news__featured-title {
        font-size: 24px;
    }

    .page-news__featured-meta,
    .page-news__featured-excerpt,
    .page-news__featured-text {
        font-size: 15px;
    }

    .page-news__faq-list {
        margin: 0 15px;
    }

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

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

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

    .page-news__container,
    .page-news__hero-image-wrapper,
    .page-news__cta-container,
    .page-news__news-grid,
    .page-news__featured-card,
    .page-news__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-news__hero-section,
    .page-news__latest-news,
    .page-news__featured-news,
    .page-news__faq-section,
    .page-news__cta-bottom {
        padding-left: 0;
        padding-right: 0;
    }
}