/* style/news.css */

/* --- General Page Styles --- */
.page-news {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light body background */
    line-height: 1.6;
    background-color: #f8f8f8; /* Slightly off-white for content sections */
}

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

.page-news__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #0A1931;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #FFD700;
    border-radius: 2px;
}

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

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background-color: #0A1931; /* Dark background for hero */
    color: #ffffff;
    overflow: hidden;
}

.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%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    filter: none; /* Ensure no CSS filter changes image color */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-news__main-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFD700; /* Gold color for main title */
}

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

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FFD700; /* Auxiliary color for CTA button */
    color: #0A1931; /* Dark text for auxiliary color button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
    border: none;
}

.page-news__cta-button:hover {
    background: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

/* Secondary CTA button style */
.page-news__cta-button--secondary {
    background: #0A1931;
    color: #FFD700;
    border: 2px solid #FFD700;
    box-shadow: none;
}

.page-news__cta-button--secondary:hover {
    background: #FFD700;
    color: #0A1931;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* --- Latest Articles Section --- */
.page-news__latest-articles {
    padding: 80px 0;
    background-color: #0A1931; /* Dark section background */
    color: #ffffff;
}

.page-news__latest-articles .page-news__section-title {
    color: #FFD700;
}

.page-news__latest-articles .page-news__section-description {
    color: #f0f0f0;
}

.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: #1a2a43; /* Slightly lighter dark background for cards */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.page-news__article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1;
}

.page-news__article-card img {
    width: 100%;
    height: 220px; /* Fixed height for article images */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #0A1931;
    filter: none; /* Ensure no CSS filter changes image color */
}

.page-news__article-card .page-news__card-title {
    font-size: 22px;
    font-weight: 700;
    color: #FFD700; /* Gold for card titles */
    padding: 20px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-card .page-news__article-excerpt {
    font-size: 16px;
    color: #cccccc;
    padding: 0 20px 15px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__article-card .page-news__article-date {
    font-size: 14px;
    color: #888888;
    padding: 0 20px 20px;
    display: block;
}

.page-news__load-more {
    text-align: center;
    margin-top: 60px;
}

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

.page-news__faq-section .page-news__section-title {
    color: #0A1931;
}

.page-news__faq-section .page-news__section-description {
    color: #555555;
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* 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 20px; /* Initial padding */
  opacity: 0;
  background: #ffffff;
  color: #555555;
}

/* 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, value large enough to contain any content */
  padding: 20px 20px !important; /* Final padding */
  opacity: 1;
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #0A1931; /* Dark background for question */
  color: #ffffff; /* White text for question */
  border: 1px solid #0A1931;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  position: relative;
  box-sizing: border-box;
}

.page-news__faq-item.active .page-news__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #FFD700; /* Auxiliary color when active */
    color: #0A1931; /* Dark text when active */
}


.page-news__faq-question:hover {
  background: #1a2a43; /* Slightly lighter dark on hover */
  border-color: #1a2a43;
}

.page-news__faq-item.active .page-news__faq-question:hover {
    background: #e6c200; /* Slightly darker auxiliary on hover when active */
    border-color: #e6c200;
}


/* Question title style */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click event */
}

/* Toggle icon */
.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold color for toggle icon */
  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: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #0A1931; /* Dark color when active */
  transform: rotate(45deg); /* Rotate to form an 'x' or 'minus' */
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {
    .page-news__container {
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero Section */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-news__intro-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        width: 100% !important; /* Ensure button adapts to full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-top: 15px;
    }

    /* Latest Articles */
    .page-news__latest-articles {
        padding: 40px 0;
    }

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

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

    .page-news__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__article-card {
        margin-bottom: 15px;
    }

    .page-news__article-card img {
         /* Adjust image height for mobile */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__article-card .page-news__card-title {
        font-size: 18px;
        padding: 15px;
    }

    .page-news__article-card .page-news__article-excerpt {
        font-size: 14px;
        padding: 0 15px 10px;
    }

    .page-news__article-card .page-news__article-date {
        padding: 0 15px 15px;
    }

    .page-news__load-more {
        margin-top: 40px;
    }
    
    /* FAQ Section */
    .page-news__faq-section {
        padding: 40px 0;
    }

    .page-news__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap;
        border-radius: 6px;
    }
    
    .page-news__faq-item.active .page-news__faq-question {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .page-news__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }

    .page-news__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }

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

    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }

    /* Image responsive adaptions for content area */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-news__hero-image img {
        border-radius: 8px;
    }
}

/* Ensure all images in content sections are responsive and not too small */
.page-news__content-area img,
.page-news__article-card img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Enforce minimum size if not already covered by layout */
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
}

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