/* style/news.css */

/* Base styles for the page */
.page-news {
    font-family: Arial, sans-serif;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF;
    line-height: 1.6;
}

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

.page-news__section-title {
    font-size: 36px;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: #333333;
}

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

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

.page-news__hero-button {
    display: inline-block;
    background-color: #C30808;
    color: #FFFF00;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-news__hero-button:hover {
    background-color: #a00606;
}

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
}

/* Articles Section */
.page-news__articles-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

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

.page-news__article-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

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

.page-news__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
}

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

.page-news__article-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #017439;
    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: #005f2e;
}

.page-news__article-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more-button {
    display: inline-block;
    background-color: #017439;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}

.page-news__read-more-button:hover {
    background-color: #005f2e;
}

/* Promotional Banner */
.page-news__promo-banner {
    padding: 60px 20px;
    text-align: center;
    color: #ffffff; /* White text for dark background */
    background-color: #017439;
}

.page-news__promo-title {
    font-size: 40px;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__promo-description {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__promo-button {
    display: inline-block;
    background-color: #C30808;
    color: #FFFF00;
    padding: 18px 35px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-news__promo-button:hover {
    background-color: #a00606;
}

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

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

.page-news__faq-item {
    background-color: #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;
    font-size: 20px;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    background-color: #fcfcfc;
    border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-item[open] .page-news__faq-question {
    border-bottom: 1px solid transparent; /* Remove border when open */
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 24px;
    margin-left: 15px;
    line-height: 1;
    transition: transform 0.3s ease;
}

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

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

.page-news__faq-item[open] .page-news__faq-answer {
    max-height: 500px; /* Adjust as needed */
    padding-top: 10px;
}

/* Details element specific styling */
.page-news__faq-item summary {
    list-style: none;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 40px;
    }
    .page-news__hero-description {
        font-size: 18px;
    }
    .page-news__section-title {
        font-size: 30px;
    }
    .page-news__article-title {
        font-size: 22px;
    }
    .page-news__promo-title {
        font-size: 34px;
    }
}

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

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

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

    /* Mobile images */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .page-news__article-image {
        height: auto; /* Allow auto height for mobile article images */
    }

    /* Mobile buttons */
    .page-news__hero-button,
    .page-news__read-more-button,
    .page-news__promo-button,
    .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-left: 15px;
        padding-right: 15px;
        text-align: center;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-card {
        margin-bottom: 20px;
    }

    .page-news__hero-title {
        font-size: 32px;
    }
    .page-news__hero-description {
        font-size: 16px;
    }
    .page-news__section-title {
        font-size: 28px;
    }
    .page-news__article-title {
        font-size: 20px;
    }
    .page-news__promo-title {
        font-size: 30px;
    }
    .page-news__promo-description {
        font-size: 18px;
    }
    .page-news__faq-question {
        font-size: 18px;
        padding: 15px;
    }
    .page-news__faq-answer {
        font-size: 15px;
        padding: 0 15px 15px;
    }
    .page-news__faq-item[open] .page-news__faq-answer {
        padding-top: 5px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 28px;
    }
    .page-news__promo-title {
        font-size: 26px;
    }
}