/* style/news.css */

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

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

/* 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;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    background-color: #017439; /* Brand primary color for dark background */
    overflow: hidden;
    box-sizing: border-box;
}

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

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

.page-news__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.page-news__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF;
}

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

/* 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;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* 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: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
}

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

/* Section Titles */
.page-news__section-title {
    font-size: 2.5em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-news__dark-bg .page-news__section-title {
    color: #FFFFFF;
}

/* Text Block */
.page-news__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-news__dark-bg .page-news__text-block {
    color: #f0f0f0;
}

/* Images within content */
.page-news__image-content {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Lists */
.page-news__list,
.page-news__numbered-list {
    list-style-type: disc;
    margin: 20px 0 20px 20px;
    padding: 0;
}

.page-news__numbered-list {
    list-style-type: decimal;
}

.page-news__list-item {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.page-news__dark-bg .page-news__list-item {
    color: #f0f0f0;
}

/* Card Grid */
.page-news__card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    color: #333333;
}

.page-news__dark-bg .page-news__card {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.page-news__dark-bg .page-news__card-text {
    color: #f0f0f0;
}

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

.page-news__card-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
    padding: 0 15px;
}

.page-news__dark-bg .page-news__card-title {
    color: #FFFFFF;
}

.page-news__card-text {
    font-size: 1em;
    padding: 0 15px;
    flex-grow: 1;
}

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

.page-news__faq-list {
    margin-top: 40px;
}

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

.page-news__faq-item:last-child .page-news__faq-question {
    border-bottom: none;
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #017439;
    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;
    background-color: #f9f9f9;
    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: 0;
    font-size: 1em;
}

/* Section specific colors */
.page-news__overview-section,
.page-news__guide-section,
.page-news__why-choose-section,
.page-news__faq-section {
    background-color: #FFFFFF;
    color: #333333;
}

.page-news__highlights-section,
.page-news__types-section {
    background-color: #017439;
    color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.5em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__card-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        min-height: 400px;
        padding: 40px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure space for fixed header on mobile */
    }
    .page-news__hero-title {
        font-size: 2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__container {
        padding: 15px;
    }
    .page-news__text-block,
    .page-news__list-item,
    .page-news__card-text {
        font-size: 0.95em;
    }
    .page-news__card-grid {
        grid-template-columns: 1fr;
    }
    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 10px 20px;
    }

    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-news__hero-section .page-news__container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Mobile button responsiveness */
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important; /* Take full width */
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 10px; /* Add space between stacked buttons */
    }

    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__faq-question {
        font-size: 1em;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
    }
}