/* style/news.css */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff;
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    padding-top: var(--header-offset, 120px);
    background-color: #017439;
}

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFF00;
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
}

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

/* Buttons */
.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: #C30808; /* Custom color for Register/Login */
    color: #FFFF00; /* Custom font color for Register/Login */
    border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    color: #005c2a;
    border-color: #005c2a;
}

/* Section Titles and Descriptions */
.page-news__section-title {
    font-size: 2.2em;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    margin-top: 40px;
}

.page-news__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__article-card {
    background: #ffffff;
    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;
    color: #333333;
}

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

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

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

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

.page-news__article-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #666666;
    margin-bottom: 20px;
}

.page-news__read-more {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

/* Dark sections */
.page-news__dark-section {
    background-color: #017439;
    color: #ffffff;
    padding: 80px 20px;
}

.page-news__dark-section .page-news__section-title {
    color: #ffffff;
}

.page-news__dark-section .page-news__section-description {
    color: #e0e0e0;
}

.page-news__dark-section .page-news__btn-primary {
    background: #C30808;
    color: #FFFF00;
    border-color: #C30808;
}

.page-news__dark-section .page-news__btn-primary:hover {
    background: #a00606;
    border-color: #a00606;
}

.page-news__dark-section .page-news__btn-secondary {
    background: #ffffff;
    color: #017439;
    border-color: #ffffff;
}

.page-news__dark-section .page-news__btn-secondary:hover {
    background: #f0f0f0;
    color: #005c2a;
    border-color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

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

.page-news__faq-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    background-color: #f0f8f0;
    transition: background-color 0.3s ease;
}

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

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

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(0deg); /*  becomes "-" or similar */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    color: #555555;
}

.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-bottom: 15px;
}

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

.page-news__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: #005c2a;
}

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

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

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

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

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

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

    .page-news__hero-cta {
        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;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

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

    .page-news__article-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__article-card,
    .page-news__latest-news,
    .page-news__featured-articles,
    .page-news__promotions-updates,
    .page-news__faq-section {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      overflow: hidden !important;
    }

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

    .page-news__dark-section {
      padding: 60px 15px;
    }

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

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

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