.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Explicitly set for clarity, though body is default white */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding to account for fixed header, as body has padding-top */
    margin-bottom: 40px;
    background-color: #f8f8f8;
    overflow: hidden; /* Ensure no image overflow */
}

.page-news__hero-image-container {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

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

.page-news__main-title {
    font-size: clamp(2em, 4vw, 2.8em); /* Use clamp for H1 font size */
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

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

/* CTA Button - Primary */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
    background-color: #a30606;
    transform: translateY(-2px);
}

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

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* Section Titles */
.page-news__section-title {
    font-size: 2.2em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

/* News List Section */
.page-news__news-list-section {
    padding: 40px 0;
    background-color: #f9f9f9;
}

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

.page-news__news-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__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.page-news__card-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

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

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

.page-news__card-date {
    font-size: 0.85em;
    color: #888888;
    margin-top: auto; /* Push date to bottom */
    display: block;
}

.page-news__read-more {
    display: inline-block;
    margin-top: 10px;
    color: #017439;
    font-weight: bold;
    text-decoration: none;
}

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

.page-news__view-all-button-wrapper {
    text-align: center;
}

/* About News Section */
.page-news__about-news-section {
    padding: 60px 0;
}

.page-news__dark-section {
    background-color: #017439; /* Brand main color */
    color: #FFFFFF; /* White text for dark background */
}

.page-news__dark-section .page-news__section-title {
    color: #FFFFFF;
}

.page-news__dark-section .page-news__description,
.page-news__dark-section p {
    color: #f0f0f0;
}

.page-news__about-content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.page-news__about-text {
    flex: 1;
}

.page-news__about-text p {
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.7;
}

.page-news__about-image-wrapper {
    flex: 1;
    text-align: center;
}

.page-news__about-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block; /* Ensure it behaves like a block element for max-width */
    margin: 0 auto;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #f5f5f5;
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  color: #333333; /* Ensure text color for FAQ item */
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #017439; /* Question text color */
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}
details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #f5f5f5;
}
.page-news__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #017439; /* Ensure question text color */
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555; /* Answer text color */
}

/* --- Responsive Styles --- */

/* Tablet and Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-news__container {
        padding: 15px;
    }

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

    .page-news__main-title {
        font-size: clamp(1.8em, 5vw, 2.5em);
    }

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

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

    .page-news__news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

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

    .page-news__about-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .page-news__about-image-wrapper {
        order: -1; /* Image above text on smaller screens */
    }

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

/* Mobile (max-width: 768px) - All modules must have rules */
@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden; /* Prevent horizontal scroll */
    }

    /* Hero Section */
    .page-news__hero-section {
        padding-top: 10px !important;
        margin-bottom: 20px;
    }

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

    .page-news__main-title {
        font-size: clamp(1.5em, 7vw, 2em);
        margin-bottom: 15px;
    }

    .page-news__description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    /* Section Titles */
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    /* CTA Buttons - All buttons must adapt */
    .page-news__cta-button,
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      white-space: normal !important;
      word-wrap: break-word !important;
      padding: 12px 20px !important;
      font-size: 1em !important;
    }

    /* Button containers */
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container,
    .page-news__view-all-button-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px !important;
      padding-right: 15px !important;
      overflow: hidden !important;
      display: flex;
      flex-direction: column; /* Stack buttons vertically on mobile */
      gap: 10px;
    }
    .page-news__view-all-button-wrapper {
        text-align: center;
    }

    /* News List Section */
    .page-news__news-list-section {
        padding: 20px 0;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .page-news__news-card {
        margin-left: 0;
        margin-right: 0;
    }

    .page-news__card-image {
        height: 200px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

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

    .page-news__card-excerpt {
        font-size: 0.9em;
    }

    /* About News Section */
    .page-news__about-news-section {
        padding: 30px 0;
    }

    .page-news__about-content-wrapper {
        gap: 20px;
    }

    .page-news__about-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-news__faq-section {
        padding: 30px 0;
    }

    details.page-news__faq-item summary.page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-qtext {
        font-size: 15px;
    }
    .page-news__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    details.page-news__faq-item .page-news__faq-answer {
        padding: 0 15px 15px;
    }

    /* General Image Responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    .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;
    }
}