/* style/news.css */

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

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

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    background-color: var(--background-dark);
    min-height: 500px; /* Ensure minimum height */
    padding-top: var(--header-offset, 120px);
    overflow: hidden;
}

.page-news__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay for text readability */
    z-index: 1;
}

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

.page-news__hero-section .page-news__container {
    position: relative;
    z-index: 2;
}

.page-news__main-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__intro-text {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

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

.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: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-news__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.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);
}

/* General Section Styling */
.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;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-dark);
}

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

.page-news__dark-bg {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 60px 0;
}

.page-news__dark-bg .page-news__section-title,
.page-news__dark-bg .page-news__section-description,
.page-news__dark-bg .page-news__article-title a,
.page-news__dark-bg .page-news__read-more,
.page-news__dark-bg .page-news__promo-title a,
.page-news__dark-bg .page-news__all-promos-link {
    color: var(--text-light);
}

.page-news__dark-bg .page-news__promo-text,
.page-news__dark-bg .page-news__article-excerpt {
    color: rgba(255, 255, 255, 0.8);
}

.page-news__dark-bg .page-news__btn-secondary {
    color: var(--text-light);
    border-color: var(--text-light);
}

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

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

.page-news__article-card {
    background-color: var(--background-light);
    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;
    display: flex;
    flex-direction: column;
}

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

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

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

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

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

.page-news__article-title a:hover {
    color: #005f2e;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

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

.page-news__read-more:hover {
    color: #005f2e;
    text-decoration: underline;
}

/* Promotions Update Section */
.page-news__promotions-updates .page-news__section-title {
    color: var(--text-light);
}

.page-news__promotions-updates .page-news__section-description {
    color: rgba(255, 255, 255, 0.8);
}

.page-news__promo-card {
    background-color: var(--background-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    max-width: 900px;
    margin: 40px auto;
}

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

.page-news__promo-content {
    padding: 30px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-news__promo-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    line-height: 1.3;
}

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

.page-news__promo-title a:hover {
    color: #005f2e;
}

.page-news__promo-text {
    font-size: 1em;
    color: #666;
    margin-bottom: 25px;
}

.page-news__all-promos-link {
    display: block;
    text-align: center;
    margin-top: 30px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.page-news__all-promos-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* FAQ Section */
.page-news__faq-section .page-news__section-title {
    color: var(--text-light);
}

.page-news__faq-section .page-news__section-description {
    color: rgba(255, 255, 255, 0.8);
}

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

.page-news__faq-item {
    background-color: var(--background-light);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    background-color: var(--background-light);
    transition: background-color 0.3s ease;
}

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

.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-dark);
    font-size: 1em;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Use !important to ensure it overrides */
    padding: 15px 25px;
}

.page-news__faq-answer p {
    margin: 0;
}

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

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

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

.page-news__cta-bottom .page-news__section-title {
    margin-bottom: 30px;
}

.page-news__cta-bottom .page-news__section-description {
    margin-bottom: 50px;
}

.page-news__btn-large {
    padding: 18px 40px;
    font-size: 1.2em;
}

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

    .page-news__intro-text {
        font-size: 1.15em;
    }

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

    .page-news__promo-card {
        flex-direction: column;
    }

    .page-news__promo-image {
        width: 100%;
        height: 250px;
    }

    .page-news__promo-content {
        width: 100%;
        padding: 20px;
    }
}

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

    .page-news__hero-section {
        padding: 60px 0;
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

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

    .page-news__intro-text {
        font-size: 1em;
    }

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

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

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

    .page-news__article-card {
        margin-bottom: 20px;
    }

    .page-news__promo-card {
        margin: 20px auto;
    }

    .page-news__promo-image {
        height: 200px;
    }

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

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

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

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

    /* Images responsive */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__promo-card,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-section .page-news__container {
        padding-left: 0;
        padding-right: 0;
    }
    .page-news__hero-section {
        padding-left: 0;
        padding-right: 0;
    }

    /* Ensure content area images are not too small */
    .page-news__article-image, .page-news__promo-image {
        min-width: 200px;
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__promo-title {
        font-size: 1.3em;
    }
    .page-news__btn-large {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

/* Ensure images are not filtered */
.page-news img { 
    filter: none; 
}

/* Ensure content area images are not too small by CSS rules */
.page-news__latest-articles img, 
.page-news__promotions-updates img, 
.page-news__industry-insights img {
    width: 100%; /* Will be constrained by max-width: 100%; height: auto; */
    min-width: 200px; /* Enforce minimum display size */
    min-height: 200px; /* Enforce minimum display size */
    object-fit: cover;
}