/* style/news.css */

/* Base styles for the page-news scope */
.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 */
}

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

.page-news__section-title {
    font-size: 2.5rem;
    color: #ffffff; /* White text for section titles on dark background */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1rem;
    color: #f0f0f0; /* Slightly off-white for description */
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Increased height for visual impact */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.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.6); /* Dark overlay for text readability */
    z-index: -1;
}

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

.page-news__hero-description {
    font-size: 1.3rem;
    color: #f0f0f0;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* 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: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    font-size: 1.1rem;
    border: 2px solid transparent; /* Base border for consistency */
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Include padding/border in width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
    background-color: #017439; /* Main brand color */
    color: #ffffff;
}

.page-news__btn-primary:hover {
    background-color: #005f2e; /* Darker shade on hover */
    color: #ffffff;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #017439; /* Border with main brand color */
    margin-left: 20px;
}

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

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background from body */
    color: #ffffff; /* Light text for contrast */
}

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

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter card background */
    border-radius: 12px;
    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 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

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

.page-news__article-title a:hover {
    color: #017439; /* Brand color on hover */
}

.page-news__article-meta {
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 1rem;
    color: #f0f0f0;
    margin-bottom: 20px;
    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;
    font-size: 0.95rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: flex-start; /* Align to the start of the flex container */
}

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

/* In-depth Analysis Section */
.page-news__in-depth-analysis {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background */
    color: #ffffff; /* Light text */
}

.page-news__analysis-content {
    margin-top: 40px;
}

.page-news__analysis-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 30px;
    display: block;
}

.page-news__analysis-subtitle {
    font-size: 2rem;
    color: #017439; /* Brand color for subtitles */
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__in-depth-analysis p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #f0f0f0;
}

/* Tips & Guides Section */
.page-news__tips-guides {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background */
    color: #ffffff; /* Light text */
}

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

.page-news__guide-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter card background */
    border-radius: 12px;
    padding: 30px;
    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__guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__guide-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

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

.page-news__guide-title a:hover {
    color: #017439; /* Brand color on hover */
}

.page-news__guide-excerpt {
    font-size: 1rem;
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1;
}

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

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

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

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

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

.page-news__faq-question-text {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
    font-weight: bold;
}

.page-news__faq-toggle {
    font-size: 1.8rem;
    color: #017439; /* Brand color for toggle icon */
    font-weight: bold;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate for '−' effect */
}

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

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

.page-news__faq-answer p {
    font-size: 1rem;
    color: #f0f0f0;
    margin: 0;
}

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

.page-news__cta-title {
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 1.2rem;
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3rem;
    }
    .page-news__hero-description {
        font-size: 1.2rem;
    }
    .page-news__section-title {
        font-size: 2rem;
    }
    .page-news__analysis-subtitle {
        font-size: 1.8rem;
    }
    .page-news__cta-title {
        font-size: 2.2rem;
    }
}

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

    .page-news__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-news__hero-title {
        font-size: 2.5rem;
    }
    .page-news__hero-description {
        font-size: 1rem;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 12px 20px;
        font-size: 1rem;
        margin-left: 0;
        width: 100%; /* Full width for buttons */
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to container */
    }

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

    .page-news__articles-grid,
    .page-news__guides-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-news__article-card,
    .page-news__guide-card {
        padding: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-title {
        font-size: 1.3rem;
    }
    .page-news__guide-title {
        font-size: 1.2rem;
    }

    .page-news__analysis-subtitle {
        font-size: 1.5rem;
    }
    .page-news__in-depth-analysis p {
        font-size: 1rem;
    }

    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question-text {
        font-size: 1.1rem;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px;
    }

    .page-news__cta-title {
        font-size: 2rem;
    }
    .page-news__cta-description {
        font-size: 1.1rem;
    }

    /* Mobile image and video responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    /* No videos on this page, but keeping the rule for completeness */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper,
    .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; /* Add horizontal padding to prevent content from touching edges */
        padding-right: 15px; /* Add horizontal padding to prevent content from touching edges */
        overflow: hidden !important; /* Prevent horizontal scroll */
    }
    /* Specific padding for hero section to avoid double padding */
    .page-news__hero-section .page-news__container {
        padding-left: 0;
        padding-right: 0;
    }
}