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

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

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

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

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

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

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

.page-news__section {
    padding: 60px 20px;
    background-color: var(--background-color, #ffffff);
}

.page-news__section:nth-of-type(even) {
    background-color: #f8f8f8;
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #017439;
    border-radius: 2px;
}

.page-news__section-intro {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: #555555;
}

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

.page-news__news-card, .page-news__promo-card, .page-news__strategy-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #333333;
}

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

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

.page-news__card-title a {
    color: #017439; /* Brand color for card titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-news__card-text {
    font-size: 0.95em;
    color: #555555;
    padding: 0 20px;
    flex-grow: 1;
}

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

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

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

.page-news__btn-primary, .page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

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

.page-news__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}

.page-news__trend-content, .page-news__security-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__image-full-width {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    display: block;
}

.page-news__image-centered {
    display: block;
    margin: 0 auto 30px auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.page-news__sub-title {
    font-size: 1.8em;
    color: #017439;
    margin-top: 40px;
    margin-bottom: 15px;
}

.page-news__text-block {
    margin-bottom: 20px;
    color: #333333;
}

.page-news__strategy-list {
    list-style: disc inside;
    margin-left: 20px;
    margin-bottom: 20px;
    color: #555555;
}

.page-news__strategy-list li {
    margin-bottom: 8px;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #f0f0f0;
}

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

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: #017439;
    background-color: #e8f5e9; /* Light green for question background */
    border-bottom: 1px solid #e0e0e0;
}

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

.page-news__faq-question h3 {
    margin: 0;
    color: inherit;
}

.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 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #333333;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Ensure it expands fully */
    padding: 20px;
}

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

/* Bottom CTA Section */
.page-news__cta-bottom {
    background-color: #017439; /* Brand color dark background */
    color: #ffffff;
    text-align: center;
    padding: 80px 20px;
}

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

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-news__btn-register, .page-news__btn-login {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-register {
    background-color: #C30808; /* Custom Register color */
    color: #FFFF00; /* Custom Register Font color */
    border: 2px solid #C30808;
}

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

.page-news__btn-login {
    background-color: #C30808; /* Custom Login color */
    color: #FFFF00; /* Custom Login Font color */
    border: 2px solid #C30808;
}

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

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

@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: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section {
        padding: 40px 15px;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-intro {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__news-grid, .page-news__promo-grid, .page-news__strategy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__card-image {
        height: 200px;
    }
    .page-news__card-title {
        font-size: 1.2em;
    }
    .page-news__sub-title {
        font-size: 1.5em;
    }
    .page-news__cta-bottom {
        padding: 60px 15px;
    }
    .page-news__cta-title {
        font-size: 2em;
    }
    .page-news__cta-description {
        font-size: 1em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary, .page-news__btn-secondary, .page-news__btn-register, .page-news__btn-login {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Mobile image and container responsive styles */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__section,
    .page-news__news-card,
    .page-news__promo-card,
    .page-news__strategy-card,
    .page-news__container,
    .page-news__trend-content,
    .page-news__security-content,
    .page-news__cta-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__hero-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* FAQ mobile adjustments */
    .page-news__faq-question {
        padding: 15px;
        font-size: 1em;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px;
    }
}

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