/* style/news.css */

/* Base styles for the page-news scope */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--background-color, #FFFFFF);
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-news__section-title--light {
  color: #ffffff;
}

.page-news__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__description--light {
  color: #f0f0f0;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background-color: #f5f5f5; /* Light background for separation */
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons adapt to container */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

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

.page-news__btn-primary--large {
  padding: 15px 30px;
  font-size: 1.2em;
}

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

.page-news__btn-secondary:hover {
  background: #f0f8ff;
  color: #1e87c0;
  border-color: #1e87c0;
}

/* Dark sections */
.page-news__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Content Area - Grid for news types */
.page-news__grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-news__card {
  background: #ffffff;
  color: #333333;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-news__card-title {
  font-size: 1.5em;
  color: #26A9E0;
  margin: 20px 20px 10px;
  font-weight: bold;
}

.page-news__card p {
  padding: 0 20px 20px;
  flex-grow: 1;
}

.page-news__card .page-news__btn-secondary {
  margin: 0 20px 20px;
  align-self: flex-start;
}

/* Benefits Grid */
.page-news__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__benefit-item {
  background: rgba(255, 255, 255, 0.15); /* Semi-transparent white on dark background */
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-news__benefit-title {
  font-size: 1.3em;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-news__benefit-item p {
  color: #f0f0f0;
}

.page-news__cta-wrapper {
  text-align: center;
  margin-top: 50px;
}

/* Access Grid */
.page-news__access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__access-item {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
}

.page-news__access-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}

.page-news__access-title {
  font-size: 1.4em;
  color: #26A9E0;
  margin: 0 20px 15px;
  font-weight: bold;
}

.page-news__access-item p {
  padding: 0 20px;
  margin-bottom: 20px;
}

.page-news__access-item .page-news__btn-primary {
  margin-top: 10px;
}

/* Bottom CTA Section */
.page-news__cta-bottom {
  text-align: center;
  padding: 80px 20px;
}

/* Image & Video responsiveness */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-news__video-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-news__section {
    padding: 40px 15px;
  }

  .page-news__hero-section {
    padding-top: 10px !important; /* body handles --header-offset */
    padding-bottom: 40px;
  }

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

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

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

  .page-news__grid-container,
  .page-news__benefits-grid,
  .page-news__access-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  /* Force responsive for all images and containers */
  .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__hero-section,
  .page-news__hero-image-wrapper,
  .page-news__hero-content,
  .page-news__grid-container,
  .page-news__benefits-grid,
  .page-news__benefit-item,
  .page-news__access-grid,
  .page-news__access-item,
  .page-news__cta-bottom,
  .page-news__cta-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  .page-news__hero-content,
  .page-news__cta-bottom .page-news__content-area {
    padding-left: 0;
    padding-right: 0;
  }

  .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-left: 15px;
    padding-right: 15px;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-news__cta-wrapper .page-news__btn-primary {
    margin-top: 20px;
  }
  
  .page-news__card .page-news__btn-secondary {
    width: calc(100% - 40px) !important;
    margin-left: 20px !important;
    margin-right: 20px !important;
  }
}