/* style/news.css */

/* General Styling for News Page */
.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 from shared.css */
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

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

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

.page-news__section-description {
    font-size: 1.1em;
    color: #f0f0f0;
    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: 600px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #ffffff;
    padding: 20px; /* For mobile padding */
}

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

.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: -1;
}

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

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

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

.page-news__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more-btn {
    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;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
}

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

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

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

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

.page-news__read-more-btn {
    background-color: transparent;
    color: #017439;
    border: 2px solid #017439;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
}

.page-news__read-more-btn:hover {
    background-color: #017439;
    color: #ffffff;
}

/* Latest Articles Section */
.page-news__latest-articles-section {
    padding: 80px 0;
    background-color: #0d0d0d; /* Slightly lighter than #000 for contrast, but still dark */
}

.page-news__article-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 on dark 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;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

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

.page-news__article-card a {
    text-decoration: none;
    color: inherit; /* Inherit color from parent */
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure link covers the whole card */
}

.page-news__article-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block; /* Important for image responsiveness */
    min-height: 200px; /* Minimum size requirement */
}

.page-news__article-title {
    font-size: 1.4em;
    margin: 20px 20px 10px 20px;
    color: #ffffff;
    flex-grow: 1; /* Allow title to take available space */
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin: 0 20px 20px 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__article-card .page-news__read-more-btn {
    margin: 0 20px 20px 20px;
    align-self: flex-start; /* Align button to start */
}


/* Featured Analysis Section */
.page-news__featured-analysis-section {
    padding: 80px 0;
    background-color: #000;
}

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

.page-news__analysis-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.page-news__analysis-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    min-height: 200px; /* Minimum size requirement */
}

.page-news__analysis-title {
    font-size: 1.5em;
    margin: 20px 20px 10px 20px;
    color: #ffffff;
    flex-grow: 1;
}

.page-news__analysis-text {
    font-size: 1em;
    color: #cccccc;
    margin: 0 20px 20px 20px;
    flex-grow: 1;
}

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

/* Tips Section */
.page-news__tips-section {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color for a dark section */
    color: #ffffff; /* White text on dark green */
}

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

.page-news__tips-item {
    background-color: rgba(255, 255, 255, 0.1); /* Lighter background for tips */
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.page-news__tips-item p {
    color: #f0f0f0;
    font-size: 0.95em;
}

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

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

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

.page-news__faq-item summary {
    list-style: none; /* Hide default marker for details */
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15em;
    font-weight: bold;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

.page-news__faq-item summary:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #FFFF00; /* Custom color for toggle */
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-news__faq-answer {
    padding: 15px 25px 20px 25px;
    font-size: 1em;
    color: #cccccc;
}

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

/* CTA Bottom Section */
.page-news__cta-bottom-section {
    padding: 60px 0;
    background-color: #0d0d0d; /* Dark background */
    text-align: center;
}

.page-news__cta-bottom-content {
    background-color: rgba(1, 116, 57, 0.15); /* Semi-transparent brand color */
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

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

.page-news__cta-bottom-description {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

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

@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;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__hero-section {
        height: auto;
        min-height: 400px;
        padding: 40px 15px;
    }

    .page-news__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

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

    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news__read-more-btn {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__latest-articles-section,
    .page-news__featured-analysis-section,
    .page-news__tips-section,
    .page-news__faq-section,
    .page-news__cta-bottom-section {
        padding: 50px 0;
    }

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

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

    .page-news__article-grid,
    .page-news__analysis-grid,
    .page-news__tips-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__article-image,
    .page-news__analysis-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 200px !important; /* Ensure min height */
    }

    .page-news__article-card,
    .page-news__analysis-item,
    .page-news__tips-item,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__article-title,
    .page-news__analysis-title,
    .page-news__tips-title {
        font-size: 1.2em;
        margin: 15px;
    }

    .page-news__article-excerpt,
    .page-news__analysis-text,
    .page-news__tips-item p {
        font-size: 0.9em;
        margin: 0 15px 15px 15px;
    }

    .page-news__article-card .page-news__read-more-btn,
    .page-news__analysis-item .page-news__read-more-btn {
        margin: 0 15px 15px 15px;
    }

    .page-news__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-news__faq-answer {
        padding: 10px 20px 15px 20px;
        font-size: 0.9em;
    }

    .page-news__cta-bottom-content {
        padding: 30px 20px;
    }

    .page-news__cta-bottom-title {
        font-size: 1.8em;
    }
    .page-news__cta-bottom-description {
        font-size: 1em;
    }
}

@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__cta-bottom-title {
        font-size: 1.5em;
    }
}

/* Image color filter restriction */
.page-news img {
    filter: none !important; /* Ensure no filter is applied */
}