/* style/news.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register: #C30808;
    --button-login: #C30808;
    --font-register-login: #FFFF00;
    --background-color: #FFFFFF;
}

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

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

.page-news__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__light-bg {
    background-color: var(--background-color);
    color: var(--text-dark);
}

/* Hero Section */
.page-news__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    position: relative;
    overflow: hidden;
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.3;
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
    opacity: 0.9;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background-color: var(--button-register);
    color: var(--font-register-login);
    border: 2px solid var(--button-register);
}

.page-news__btn-primary:hover {
    background-color: darken(var(--button-register), 10%);
    border-color: darken(var(--button-register), 10%);
}

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

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

/* Section Titles and Descriptions */
.page-news__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

.page-news__dark-bg .page-news__section-title,
.page-news__dark-bg .page-news__section-description {
    color: var(--text-light);
}

/* Latest News Grid */
.page-news__latest-news {
    padding: 60px 0;
}

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

.page-news__news-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-news__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

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

.page-news__card-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

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

.page-news__read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

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

.page-news__read-more span {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover span {
    transform: translateX(3px);
}

/* Video Section */
.page-news__video-section {
    padding: 60px 0;
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 960px;
    margin: 40px auto;
    background-color: #000;
    border-radius: 10px;
}

.page-news__video-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.page-news__video-cta {
    margin-top: 30px;
}

/* Featured Articles */
.page-news__featured-articles {
    padding: 60px 0;
}

.page-news__article-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.page-news__article-item {
    display: flex;
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

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

.page-news__article-content {
    padding: 20px;
    width: 70%;
}

.page-news__article-title {
    font-size: 1.2em;
    margin-bottom: 10px;
}

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

.page-news__article-title a:hover {
    color: darken(var(--primary-color), 10%);
}

.page-news__article-text {
    font-size: 0.95em;
    color: var(--text-dark);
    margin-bottom: 15px;
}

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

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

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-light);
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.page-news__faq-question h3 {
    margin: 0;
    color: var(--text-light);
    font-size: 1.1em;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-light);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    color: var(--text-light);
    font-size: 1em;
}

.page-news__faq-answer a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: lighten(var(--secondary-color), 10%);
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 20px;
    text-align: center;
}

.page-news__cta-content {
    max-width: 900px;
}

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: var(--text-light);
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }

    .page-news__section-title {
        font-size: 2em;
    }

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

    .page-news__article-item {
        flex-direction: column;
    }

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

    .page-news__article-content {
        width: 100%;
    }
}

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

    .page-news__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }

    .page-news__hero-title {
        font-size: 2.2em;
    }

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

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

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

    .page-news__container,
    .page-news__cta-content,
    .page-news__video-section,
    .page-news__video-wrapper,
    .page-news__latest-news,
    .page-news__featured-articles,
    .page-news__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

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

    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__video-wrapper {
        padding-bottom: 56.25% !important; /* Ensure aspect ratio */
        height: 0 !important;
        margin: 20px auto !important;
    }

    .page-news__section-title {
        font-size: 1.8em;
    }

    .page-news__section-description {
        font-size: 0.95em;
    }

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

    .page-news__card-image {
        height: 180px;
    }

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

    .page-news__article-item {
        flex-direction: column;
    }

    .page-news__article-image {
        width: 100%;
        height: 180px;
    }

    .page-news__article-content {
        width: 100%;
    }

    .page-news__cta-title {
        font-size: 2em;
    }

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

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

    .page-news__faq-question h3 {
        font-size: 1em;
    }

    .page-news__faq-answer {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }

    .page-news__section-title {
        font-size: 1.5em;
    }

    .page-news__cta-title {
        font-size: 1.8em;
    }
}