/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #ffffff; /* Default background for the main content area */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
    background: linear-gradient(135deg, #26A9E0, #1a7bbd); /* Brand color gradient */
    color: #ffffff;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

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

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
}

.page-news__intro-text {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.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;
    box-sizing: border-box; /* Crucial for responsiveness */
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background-color: #EA7C07; /* Login color for primary action */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

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

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

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

/* General Section Styles */
.page-news__latest-news,
.page-news__deep-analysis,
.page-news__guides-updates,
.page-news__faq-section,
.page-news__call-to-action {
    padding: 60px 0;
}

.page-news__dark-bg {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-news__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    color: inherit; /* Inherit color from parent section */
}

.page-news__text-block {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto 30px auto;
    text-align: center;
}

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

.page-news__article-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    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.15);
}

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

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

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

.page-news__card-title a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #1a7bbd;
}

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

.page-news__read-more {
    display: inline-block;
    color: #EA7C07;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
    color: #d16b06;
}

/* Deep Analysis Section */
.page-news__deep-analysis .page-news__section-title {
    color: #ffffff;
}

.page-news__deep-analysis .page-news__text-block {
    color: #f0f0f0;
}

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

.page-news__analysis-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    padding-bottom: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-news__analysis-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-news__item-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 0 20px;
}

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

.page-news__item-title a:hover {
    color: #f0f0f0;
}

.page-news__item-description {
    font-size: 0.95em;
    color: #f0f0f0;
    padding: 0 20px;
}

/* Guides and Updates Section */
.page-news__guide-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-news__guide-item {
    background-color: #f9f9f9;
    border-left: 5px solid #26A9E0;
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-news__guide-item h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
}

.page-news__guide-item h3 a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__guide-item h3 a:hover {
    color: #1a7bbd;
}

.page-news__guide-item p {
    color: #555555;
    margin-bottom: 0;
}

/* FAQ Section */
.page-news__faq-section .page-news__section-title {
    color: #ffffff;
}

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

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    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);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question h3 {
    margin: 0;
    font-size: 1.2em;
    color: #ffffff;
}

.page-news__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffffff;
    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-out, padding 0.3s ease-out;
}

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

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

.page-news__faq-answer a {
    color: #EA7C07;
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

/* Call to Action Section */
.page-news__call-to-action {
    text-align: center;
    background-color: #f5f5f5;
    padding: 80px 0;
}

.page-news__call-to-action .page-news__section-title {
    color: #26A9E0;
}

.page-news__call-to-action .page-news__text-block {
    color: #555555;
    margin-bottom: 40px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__article-image,
    .page-news__analysis-image {
        height: 220px;
    }
}

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

    .page-news__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure space below fixed header */
        min-height: 300px;
    }

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

    .page-news__intro-text {
        font-size: 1em;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Constrain button group width */
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box !important;
        padding: 0 15px; /* Add padding to prevent overflow */
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 0.9em;
        box-sizing: border-box !important;
    }

    .page-news__latest-news,
    .page-news__deep-analysis,
    .page-news__guides-updates,
    .page-news__faq-section,
    .page-news__call-to-action {
        padding: 40px 0;
    }

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

    .page-news__text-block {
        font-size: 1em;
        padding: 0 15px;
    }

    .page-news__article-grid,
    .page-news__analysis-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .page-news__article-image,
    .page-news__analysis-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__article-card,
    .page-news__analysis-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__card-title,
    .page-news__item-title {
        font-size: 1.2em;
        padding: 0 15px;
    }
    
    .page-news__card-content, .page-news__item-description {
        padding: 0 15px;
    }

    .page-news__guide-item {
        padding: 15px 20px;
        margin: 0 15px 15px 15px;
    }
    
    .page-news__faq-list {
        padding: 0 15px;
    }

    .page-news__faq-question {
        padding: 15px 20px;
    }

    .page-news__faq-question h3 {
        font-size: 1.1em;
    }

    .page-news__faq-answer {
        padding: 0 20px;
    }

    .page-news__faq-item.active .page-news__faq-answer {
        padding: 10px 20px 20px 20px;
    }

    /* Ensure all image containers are responsive */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__article-grid,
    .page-news__analysis-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    /* No video section in this page, so no specific video padding-top needed here */
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__intro-text {
        font-size: 0.9em;
    }
    .page-news__article-image,
    .page-news__analysis-image {
        height: 180px;
    }
}

/* Image specific styles to ensure no filters */
.page-news img {
    filter: none; /* Explicitly remove any potential filter */
}