/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark 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 {
    padding: 60px 0;
    position: relative;
}

.page-news__section-title {
    font-size: 2.5em;
    color: #FFD700; /* Gold for main titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

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

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay */
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    max-width: 900px;
    padding: 20px;
}

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

.page-news__hero-description {
    font-size: 1.4em;
    margin-bottom: 30px;
    line-height: 1.5;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background-color: #FFD700; /* Gold */
    color: #1A237E; /* Dark blue text for contrast */
    border: 2px solid #FFD700;
}

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

.page-news__btn-secondary {
    background-color: transparent;
    color: #FFD700; /* Gold */
    border: 2px solid #FFD700;
}

.page-news__btn-secondary:hover {
    background-color: #FFD700;
    color: #1A237E;
}

/* Latest News & Featured Articles Grid */
.page-news__news-grid,
.page-news__article-grid,
.page-news__insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__news-card,
.page-news__article-card,
.page-news__insight-card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards 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;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-news__card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-news__card-title {
    font-size: 1.4em;
    color: #FFD700; /* Gold for card titles */
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1;
}

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

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

/* Dark Section styling */
.page-news__dark-section {
    background-color: #1A237E; /* Royal blue background */
    color: #ffffff;
}

.page-news__dark-section .page-news__section-title {
    color: #FFD700; /* Gold on dark blue */
}

.page-news__dark-section .page-news__section-description {
    color: #f0f0f0;
}

.page-news__dark-section .page-news__news-card,
.page-news__dark-section .page-news__article-card,
.page-news__dark-section .page-news__insight-card {
    background-color: rgba(0, 0, 0, 0.3); /* Darker cards on dark background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-news__dark-section .page-news__card-title {
    color: #FFD700;
}

.page-news__dark-section .page-news__card-date,
.page-news__dark-section .page-news__card-excerpt {
    color: #cccccc;
}

/* Categories Section */
.page-news__categories {
    background-color: #0d0d0d; /* Slightly darker than shared background for subtle contrast */
    color: #ffffff;
}

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

.page-news__category-card {
    background-color: rgba(255, 255, 255, 0.08); /* Light transparent background */
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__category-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.15);
}

.page-news__category-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__category-title {
    font-size: 1.3em;
    color: #FFD700;
    font-weight: bold;
    padding: 0 15px;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #0d0d0d;
    color: #ffffff;
}

.page-news__faq-list {
    margin-top: 40px;
}

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.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.08);
    transition: background-color 0.3s ease;
}

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

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

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

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficient height for content */
    padding: 20px 25px;
    padding-top: 0; /* Adjust padding to look better */
}

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

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

/* Global image styles for responsiveness */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure content area images are not too small */
/* This rule applies to any img within .page-news */
.page-news img:not(.page-news__hero-image) { /* Exclude hero image from this min-size rule */
    min-width: 200px;
    min-height: 200px;
}

/* Specific styles for card images to ensure they are not too small */
.page-news__news-card .page-news__card-image,
.page-news__article-card .page-news__card-image,
.page-news__insight-card .page-news__card-image,
.page-news__category-card .page-news__category-image {
    min-width: 200px;
    min-height: 200px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-news__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important;
    }

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

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

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

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

    .page-news__section-title {
        font-size: 2em;
    }

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

    .page-news__news-grid,
    .page-news__article-grid,
    .page-news__insight-grid,
    .page-news__category-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-news__news-card,
    .page-news__article-card,
    .page-news__insight-card,
    .page-news__category-card {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

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

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

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

    .page-news__section,
    .page-news__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Enforce image responsiveness for all images within .page-news */
    .page-news img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
}