/* style/news.css */

/* --- General Page Styles --- */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #FFFFFF; /* Ensures consistency with body background */
}

.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: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

.page-news__paragraph {
    margin-bottom: 15px;
    color: #444444;
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    padding-top: calc(var(--header-offset, 120px) + 80px); /* Adjust for fixed header */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ffffff; /* White text for dark background */
    background-color: #017439; /* Brand color as dark background */
    min-height: 500px;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

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

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

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Overlay effect */
    filter: none; /* Ensure no filter changes original image color */
}

/* --- 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;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

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

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

.page-news__btn-secondary {
    background-color: #017439; /* Brand color */
    color: #FFFFFF;
    border: 2px solid #017439;
    margin: 10px;
}

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

.page-news__read-more-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #017439;
    color: #FFFFFF;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

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

/* --- Latest Updates Section --- */
.page-news__latest-updates {
    padding: 60px 0;
    background-color: #f8f8f8; /* Light background for contrast */
    color: #333333;
}

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

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

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

.page-news__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    filter: none; /* Ensure no filter changes original image color */
}

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

.page-news__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
}

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

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

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

.page-news__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: bold;
}

.page-news__pagination-link:hover,
.page-news__pagination-link--active {
    background-color: #017439;
    color: #ffffff;
}

/* --- Guides & Tips Section --- */
.page-news__guides-tips {
    padding: 60px 0;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* White text for dark background */
}

.page-news__guides-tips .page-news__section-title,
.page-news__guides-tips .page-news__section-description {
    color: #ffffff;
}

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

.page-news__guide-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #333333; /* Dark text for light card background */
}

.page-news__guide-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__guide-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: none; /* Ensure no filter changes original image color */
}

.page-news__guide-item .page-news__guide-title {
    font-size: 1.4em;
    margin: 20px 20px 10px 20px;
    font-weight: bold;
}

.page-news__guide-item .page-news__guide-title a {
    color: #017439; /* Brand color for link */
    text-decoration: none;
}

.page-news__guide-item .page-news__guide-title a:hover {
    color: #005a2e;
}

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

.page-news__guide-item .page-news__read-more-btn {
    align-self: flex-start;
    margin: 0 20px 20px 20px;
}

/* --- Industry Trends Section --- */
.page-news__industry-trends {
    padding: 60px 0;
    background-color: #f8f8f8; /* Light background */
    color: #333333;
}

.page-news__trend-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.page-news__text-block {
    flex: 2;
    min-width: 300px;
    color: #333333;
}

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

.page-news__trend-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    filter: none; /* Ensure no filter changes original image color */
}

.page-news__trend-content a {
    color: #017439;
    text-decoration: underline;
}

.page-news__trend-content a:hover {
    color: #005a2e;
}

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

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

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

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

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

.page-news__faq-title {
    margin: 0;
    flex-grow: 1;
    color: #017439; /* Ensures good contrast */
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    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;
    background-color: #ffffff;
    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; /* Sufficient height for content */
    padding: 15px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
    color: #555555;
}

.page-news__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: #005a2e;
}

/* --- CTA Section --- */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #ffffff;
    text-align: center;
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
    color: #ffffff;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__hero-section {
        padding-top: calc(var(--header-offset, 120px) + 60px);
    }
}

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

    .page-news__hero-section {
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header adjustment */
    }

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

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

    .page-news__hero-image-wrapper {
        position: relative;
        height: 250px;
        margin-top: 30px;
    }

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

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

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

    .page-news__article-grid,
    .page-news__guide-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
    }

    .page-news__trend-content {
        flex-direction: column;
        gap: 20px;
    }

    .page-news__image-block {
        order: -1; /* Image above text on mobile */
    }

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

    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Mobile image/video/button container responsiveness */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-updates,
    .page-news__guides-tips,
    .page-news__industry-trends,
    .page-news__faq-section,
    .page-news__cta-section,
    .page-news__article-grid,
    .page-news__guide-grid,
    .page-news__trend-content,
    .page-news__cta-buttons,
    .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;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    
    .page-news__hero-section.page-news__dark-section {
        padding-left: 0;
        padding-right: 0;
    }

    /* Buttons specific mobile styles */
    .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;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .page-news__cta-buttons {
        display: flex;
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@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;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 10px 20px;
    }
}