/* style/news.css */

/* Base styles for the news page content */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #ffffff; /* Light text for dark sections */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 70vh; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    min-height: 400px; /* Ensure minimum height */
}

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

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

.page-news__hero-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    max-width: 900px;
    padding: 20px;
}

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

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

.page-news__hero-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

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

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

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

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

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

.page-news__btn-register {
    background-color: #C30808; /* Specific color for register button */
    border-color: #C30808;
    color: #FFFF00; /* Specific font color for register/login */
}

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

/* Articles Section */
.page-news__articles-section {
    padding: 80px 0;
    background-color: #0d0d0d; /* Slightly lighter dark background for this section */
    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: rgba(255, 255, 255, 0.05); /* Semi-transparent white for card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-news__article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    /* No filter allowed */
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #ffffff;
}

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

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

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin-bottom: 15px;
    flex-grow: 1;
}

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

.page-news__read-more-btn:hover {
    background-color: #005a2d;
}

/* Benefits Section */
.page-news__benefits-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Another dark background */
    color: #ffffff;
}

.page-news__benefits-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-news__benefits-item {
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.page-news__benefits-heading {
    font-size: 1.4em;
    color: #017439; /* Brand color for headings */
    margin-bottom: 15px;
}

.page-news__benefits-text {
    font-size: 1em;
    color: #e0e0e0;
}

/* Guide Section */
.page-news__guide-section {
    padding: 80px 0;
    background-color: #0d0d0d;
    color: #ffffff;
}

.page-news__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-news__guide-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.page-news__guide-icon {
    width: 100%;
    max-width: 250px; /* Constrain icon size */
    height: auto;
    margin-bottom: 20px;
    border-radius: 5px;
    object-fit: cover;
    /* No filter allowed */
}

.page-news__guide-heading {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 10px;
}

.page-news__guide-text {
    font-size: 1em;
    color: #cccccc;
}

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

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

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

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-heading {
    font-size: 1.2em;
    color: #ffffff;
    margin: 0;
    flex-grow: 1;
}

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

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Change to '-' visually */
}

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

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large */
    padding: 20px;
}

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 10px; /* Add some spacing at the bottom of the answer */
}

/* Conclusion Section */
.page-news__conclusion-section {
    padding: 80px 0;
    background-color: #017439; /* Primary brand color for conclusion */
    color: #ffffff;
    text-align: center;
}

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

.page-news__conclusion-section .page-news__section-description {
    color: #f0f0f0;
    margin-bottom: 50px;
}


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

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        height: auto;
        min-height: 300px;
        padding: 60px 0;
    }

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

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

    .page-news__hero-cta-group {
        flex-direction: column;
        gap: 15px;
    }

    .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;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container,
    .page-news__hero-cta-group {
        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; /* Ensure flex context for wrap */
        flex-direction: column; /* Stack buttons vertically */
    }

    .page-news__articles-section,
    .page-news__benefits-section,
    .page-news__guide-section,
    .page-news__faq-section,
    .page-news__conclusion-section {
        padding: 40px 0;
    }

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

    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-news__articles-grid,
    .page-news__benefits-list,
    .page-news__guide-steps {
        grid-template-columns: 1fr;
    }

    .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__article-card,
    .page-news__benefits-item,
    .page-news__guide-item,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__faq-heading {
        font-size: 1em;
    }
    .page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px;
    }
}

/* Ensure content area images are not too small */
.page-news__articles-section img,
.page-news__benefits-section img,
.page-news__guide-section img {
    min-width: 200px;
    min-height: 200px;
}

/* Specific styling for dark/light backgrounds to ensure contrast */
.page-news__dark-section {
    background-color: #0d0d0d;
    color: #ffffff;
}

.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__article-title a,
.page-news__dark-section .page-news__guide-heading {
    color: #ffffff;
}

.page-news__dark-section .page-news__section-description,
.page-news__dark-section .page-news__article-excerpt,
.page-news__dark-section .page-news__guide-text {
    color: #f0f0f0;
}