:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #ffffff;
    --background-dark: #0d0d0d; /* Assuming a dark background from shared, adjust if needed */
    --accent-login: #EA7C07;
}

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default to dark text for light background */
    background-color: var(--background-light); /* Default to light background */
}

/* Adjust text color for dark sections */
.page-news__dark-section {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__description {
    color: var(--text-light);
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-light);
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 600px; /* Limit height for hero image */
}

.page-news__hero-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
}

.page-news__main-title {
    font-size: clamp(2em, 3.5vw, 3.2em); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.page-news__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-dark);
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    margin-right: 15px;
}

.page-news__btn-primary:hover {
    background-color: #208ac2; /* Darker shade of primary-color */
    border-color: #208ac2;
}

.page-news__btn-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Section Titles */
.page-news__section-title {
    font-size: clamp(1.8em, 3vw, 2.8em);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.page-news__sub-title {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Latest News Section */
.page-news__latest-news {
    padding: 60px 0;
    background-color: #f9f9f9;
}

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

.page-news__news-card {
    background-color: var(--background-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    color: var(--text-dark); /* Ensure text color contrast */
}

.page-news__news-card:hover {
    transform: translateY(-5px);
}

.page-news__card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 25px;
}

.page-news__card-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #208ac2; /* Darker shade of primary-color */
}

.page-news__card-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.page-news__card-excerpt {
    font-size: 1em;
    color: #555;
    margin-bottom: 20px;
}

.page-news__read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #208ac2; /* Darker shade of primary-color */
}

.page-news__view-all-wrapper {
    text-align: center;
    margin-top: 30px;
}

/* Analysis Section */
.page-news__analysis-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

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

.page-news__analysis-text {
    flex: 2;
}

.page-news__analysis-image {
    flex: 1;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

/* Guides Section */
.page-news__guides-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

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

.page-news__guide-item {
    background-color: var(--background-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    color: var(--text-dark); /* Ensure text color contrast */
}

.page-news__guide-title {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

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

.page-news__faq-item {
    background-color: var(--background-light);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-dark); /* Ensure text color contrast */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
}

.page-news__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555;
    line-height: 1.6;
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color); /* Brand color background */
    color: var(--text-light);
}

.page-news__cta-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.1; /* Subtle overlay */
    z-index: 1;
    display: block; /* Ensure it's treated as a block for max-width */
}

.page-news__cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.page-news__cta-section .page-news__section-title {
    color: var(--text-light);
    margin-bottom: 25px;
}

.page-news__cta-section .page-news__description {
    color: var(--text-light);
    margin-bottom: 40px;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container takes full width */
    box-sizing: border-box; /* Include padding/border in width */
    overflow: hidden; /* Prevent overflow */
}

.page-news__cta-buttons .page-news__btn-primary,
.page-news__cta-buttons .page-news__btn-secondary {
    flex-grow: 1; /* Allow buttons to grow */
    max-width: 250px; /* Max width for individual buttons */
}

.page-news__cta-buttons .page-news__btn-secondary {
    background-color: var(--text-light);
    color: var(--primary-color);
    border-color: var(--text-light);
}

.page-news__cta-buttons .page-news__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--text-light);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__analysis-content {
        flex-direction: column;
        align-items: center;
    }
    .page-news__analysis-image {
        max-width: 600px;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-content {
        padding: 30px 15px;
    }

    .page-news__main-title {
        font-size: 2em; /* Smaller on mobile */
    }

    .page-news__description {
        font-size: 1em;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 15px;
        margin-right: 0;
        margin-bottom: 15px; /* Stack buttons */
    }

    .page-news__cta-buttons {
        flex-direction: column !important; /* Stack CTA buttons */
        gap: 15px !important;
        padding: 0 15px;
    }

    .page-news__cta-buttons .page-news__btn-primary,
    .page-news__cta-buttons .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
    }

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

    .page-news__sub-title {
        font-size: 1.4em;
    }

    .page-news__news-grid,
    .page-news__guide-grid {
        grid-template-columns: 1fr;
    }

    .page-news__card-image {
        height: 200px;
    }

    .page-news__card-title {
        font-size: 1.2em;
    }

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

    .page-news__analysis-image {
        max-width: 100%;
    }

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

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

    /* Mobile specific image and video rules */
    .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__cta-section,
    .page-news__latest-news,
    .page-news__analysis-section,
    .page-news__guides-section,
    .page-news__faq-section {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important; /* Ensure no horizontal scroll */
    }

    .page-news__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
        padding-left: 0;
        padding-right: 0;
    }

    .page-news__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__cta-section {
        padding-left: 0;
        padding-right: 0;
    }
    .page-news__cta-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}