/* style/news.css */

/* Base Styles & Typography */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #FFFFFF;
}

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

.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__section-title {
    font-size: 2.5em;
    color: #017439;
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

.page-news p {
    margin-bottom: 15px;
}

.page-news a {
    color: #017439;
    text-decoration: none;
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    color: #ffffff;
    overflow: hidden;
    text-align: left;
}

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

.page-news__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-right: 50px;
}

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

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

.page-news__hero-image-wrapper {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 50%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.page-news__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.page-news__cta-buttons--center {
    justify-content: center;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
}

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

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

.page-news__btn-secondary {
    background-color: transparent;
    color: #FFFF00; /* Custom Register/Login font color for secondary */
    border: 2px solid #FFFF00; /* Custom Register/Login font color for border */
}

.page-news__btn-secondary:hover {
    background-color: #FFFF00;
    color: #C30808;
}

/* Grid Layout for News Cards */
.page-news__latest-news-grid .page-news__container {
    text-align: center;
}

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

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

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

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

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

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

.page-news__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #017439;
    line-height: 1.4;
}

.page-news__card-title a {
    color: #017439;
    text-decoration: none;
}

.page-news__card-title a:hover {
    text-decoration: underline;
}

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

.page-news__card-link {
    display: inline-block;
    color: #017439;
    font-weight: bold;
    text-decoration: none;
    margin-top: auto;
}

.page-news__card-link:hover {
    text-decoration: underline;
}

/* Promotions & Security Sections */
.page-news__promotions-updates .page-news__container,
.page-news__security-guide .page-news__container {
    text-align: center;
}

.page-news__promotions-updates .page-news__section-description,
.page-news__security-guide .page-news__section-description {
    color: #f0f0f0;
}

.page-news__promotions-updates .page-news__sub-title {
    color: #ffffff;
}

.page-news__promotions-updates p,
.page-news__promotions-updates a {
    color: #f0f0f0;
}

.page-news__promotions-updates a:hover {
    color: #ffffff;
}

.page-news__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 50px;
    text-align: left;
}

.page-news__text-block {
    flex: 1;
}

.page-news__image-block {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__content-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

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

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

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

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

.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); /* Change + to X or - */
}

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

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

/* Call to Action Section */
.page-news__call-to-action {
    padding: 80px 0;
    background-color: #017439;
    color: #ffffff;
}

.page-news__call-to-action .page-news__section-title {
    color: #ffffff;
}

.page-news__call-to-action .page-news__section-description {
    color: #f0f0f0;
    margin-bottom: 40px;
}

.page-news__call-to-action .page-news__cta-buttons {
    justify-content: center;
}

.page-news__call-to-action a {
    color: #FFFF00;
}

.page-news__call-to-action a:hover {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-section {
        flex-direction: column;
        text-align: center;
        padding: 80px 20px;
    }

    .page-news__hero-content {
        margin-right: 0;
        margin-bottom: 40px;
    }

    .page-news__hero-image-wrapper {
        width: 80%;
    }

    .page-news__cta-buttons {
        justify-content: center;
    }

    .page-news__content-wrapper {
        flex-direction: column;
    }

    .page-news__image-block {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

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

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

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

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

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

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

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

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

    .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 img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__container,
    .page-news__section,
    .page-news__card,
    .page-news__content-wrapper,
    .page-news__text-block,
    .page-news__image-block,
    .page-news__faq-list,
    .page-news__faq-item,
    .page-news__faq-question,
    .page-news__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important;
    }

    .page-news__hero-image-wrapper {
        width: 100%;
    }

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

    .page-news__faq-answer {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-news__faq-question {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

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

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

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 12px 20px;
    }
}