/* style/news.css */
/* 🚨 Body background is default (white), so use dark text. */
.page-news {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light background */
    line-height: 1.6;
    background-color: #f8f8f8; /* A very light grey for subtle contrast */
}

/* Fixed Header Offset */
/* 🚨 If shared.css does NOT set padding-top on body, then this section must have it. */
/* Assuming shared.css handles body padding-top, so this section starts at 0. */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px; /* Adjust as needed, but ensure top is clear */
    padding-top: var(--header-offset, 120px); /* Desktop: ensures content is below fixed header */
    background: linear-gradient(135deg, #CC0000, #FFD700);
    overflow: hidden; /* Ensure content doesn't spill */
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 30px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background for text readability */
    color: #ffffff; /* Light text for dark background */
}

.page-news__main-title {
    font-size: 3.2em;
    color: #FFD700; /* Gold for main title */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

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

.page-news__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding doesn't push width */
}

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

.page-news__btn-primary:hover {
    background: #a30000;
    border-color: #a30000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    color: #a30000;
    border-color: #a30000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* General Container and Sections */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    width: 100%;
}

.page-news__section-title {
    font-size: 2.5em;
    color: #CC0000;
    text-align: center;
    margin-bottom: 20px;
    padding-top: 20px;
}

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

/* Latest Articles Section */
.page-news__latest-articles {
    padding-bottom: 60px;
    background-color: #f8f8f8; /* Light background */
}

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

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

.page-news__article-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency, object-fit will handle aspect ratio */
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-news__article-title a.page-news__article-link:hover {
    color: #CC0000;
}

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

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

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

.page-news__read-more:hover {
    color: #a30000;
    text-decoration: underline;
}

/* News Categories Section */
.page-news__dark-section {
    background: #CC0000; /* Primary color background */
    color: #ffffff; /* Light text for dark background */
    padding: 60px 0;
}

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

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

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

.page-news__category-item {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards on dark bg */
    border-radius: 8px;
    overflow: hidden;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.page-news__category-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.page-news__category-image {
    width: 100%;
    height: 150px; /* Fixed height for category images */
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    display: block;
}

.page-news__category-title {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.page-news__category-title a.page-news__category-link {
    color: #FFD700; /* Gold link for dark background */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__category-title a.page-news__category-link:hover {
    color: #ffffff;
}

.page-news__category-description {
    font-size: 0.95em;
    color: #e0e0e0;
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #f8f8f8;
}

.page-news__cta-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

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

.page-news__cta-description {
    font-size: 1.1em;
    color: #555555;
    margin-bottom: 30px;
}

.page-news__cta-image {
    width: 100%;
    height: auto;
    max-width: 600px; /* Max width for CTA image */
    border-radius: 8px;
    margin: 30px auto;
    display: block;
    object-fit: cover;
}

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

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

/* FAQ container styles */
.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* 🚨 Use!important ensure priority, value large enough for any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: #333333; /* Ensure text is readable */
}

/* Question styles */
.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-news__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-news__faq-question:active {
    background: #eeeeee;
}

/* Question title styles */
.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event */
    color: #333333; /* Ensure text is readable */
}

/* Toggle icon */
.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #CC0000; /* Use brand color for toggle */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #a30000; /* Darker red when active */
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }
}

@media (max-width: 768px) {
    /* 🚨 Mobile specific padding for hero section */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile: ensures content is below fixed header */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-news__hero-content {
        padding: 20px;
    }

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

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

    .page-news__hero-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__hero-image {
        border-radius: 4px;
    }

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

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

    .page-news__section-description {
        font-size: 0.95em;
        margin-bottom: 25px;
    }

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

    .page-news__article-image {
        height: 180px; /* Adjust height for mobile */
    }
    
    .page-news__article-card,
    .page-news__category-item {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

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

    .page-news__cta-section {
        padding: 50px 0;
    }

    .page-news__cta-content {
        padding: 25px 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }

    .page-news__cta-title {
        font-size: 1.6em;
    }

    .page-news__cta-description {
        font-size: 1em;
    }
    
    .page-news__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        padding-left: 0;
        padding-right: 0;
    }

    /* FAQ Mobile Styles */
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-news__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-news__faq-answer {
        padding: 0 15px;
    }
    
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
    
    /* Global image responsive rules for content area */
    .page-news img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
}

/* Ensure no CSS filters are used on images */
.page-news img {
  filter: none;
}

/* Ensure color contrast for dark and light backgrounds */
.page-news__dark-bg {
  color: #ffffff; /* Deep background with light text */
}

.page-news__light-bg {
  color: #333333; /* Light background with dark text */
}

/* Specific button and link text colors for contrast */
.page-news__btn-text {
  color: #CC0000;
}
.page-news__btn-text:hover {
  color: #a30000;
}