.page-news {
  font-family: 'Arial', sans-serif;
  color: #1F2D3D;
  background-color: #F4F7FB;
}

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

.page-news__hero-section {
  padding-top: 10px; /* Aligns with shared header offset, preventing double padding */
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(180deg, #2F6BFF 0%, #6FA3FF 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px; /* Space between image and text */
}

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

.page-news__hero-content {
  max-width: 900px;
  padding: 20px;
  z-index: 1;
  margin-top: 0; /* Ensures content is below the image */
  margin-bottom: 40px;
}

.page-news__hero-title {
  font-size: clamp(2.2em, 4vw, 3.5em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-news__hero-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  width: auto; /* Default for desktop */
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-news__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

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

.page-news__btn-secondary:hover {
  background: #f0f0f0;
  color: #2F6BFF;
  border-color: #2F6BFF;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.2);
}

.page-news__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #1F2D3D;
  text-align: center;
  margin-bottom: 15px;
}

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

.page-news__latest-news,
.page-news__guides-tips {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background color for light sections */
  color: #1F2D3D;
}

.page-news__featured-articles,
.page-news__cta-section {
  padding: 60px 0;
  background-color: #2F6BFF; /* Brand primary color for dark sections */
  color: #ffffff;
}

.page-news__featured-articles .page-news__section-title,
.page-news__featured-articles .page-news__section-description,
.page-news__cta-section .page-news__cta-title,
.page-news__cta-section .page-news__cta-description {
  color: #ffffff;
}

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

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

.page-news__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-news__card-meta {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 10px;
}

.page-news__card-title {
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}

.page-news__card-title a {
  color: #1F2D3D;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #2F6BFF;
}

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

.page-news__card-link {
  display: inline-block;
  color: #2F6BFF;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-news__card-link:hover {
  text-decoration: underline;
  color: #4A8BFF;
}

.page-news__view-all-button-container {
  text-align: center;
  margin-top: 20px;
}

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

.page-news__featured-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.page-news__featured-card .page-news__card-image {
  height: 280px;
}

.page-news__featured-card .page-news__card-content {
  padding: 25px;
}

.page-news__featured-card .page-news__card-title a {
  color: #ffffff;
}

.page-news__featured-card .page-news__card-title a:hover {
  color: #A5C4FF;
}

.page-news__featured-card .page-news__card-excerpt {
  color: #f0f0f0;
}

.page-news__featured-card .page-news__card-link {
  color: #A5C4FF;
}

.page-news__featured-card .page-news__card-link:hover {
  color: #ffffff;
}

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

.page-news__guide-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__guide-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

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

.page-news__guide-title a {
  color: #1F2D3D;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__guide-title a:hover {
  color: #2F6BFF;
}

.page-news__guide-text {
  font-size: 0.95em;
  color: #333333;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__cta-section {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #2F6BFF 0%, #6FA3FF 100%);
}

.page-news__cta-title {
  font-size: 2.8em;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}

.page-news__cta-description {
  font-size: 1.2em;
  color: #f0f0f0;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-news__btn-large {
  padding: 15px 35px;
  font-size: 1.1em;
  border-radius: 10px;
}

/* General image styling */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: clamp(2em, 5vw, 3em);
  }

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

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

  .page-news__news-grid,
  .page-news__featured-grid,
  .page-news__guides-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: 10px !important; /* Mobile specific top padding */
  }

  .page-news__hero-image-wrapper {
    max-height: 300px;
    margin-bottom: 15px;
  }

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

  .page-news__hero-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    line-height: 1.3;
  }

  .page-news__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-news__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-news__latest-news,
  .page-news__featured-articles,
  .page-news__guides-tips,
  .page-news__cta-section {
    padding: 40px 0;
  }

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

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

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

  .page-news__news-grid,
  .page-news__featured-grid,
  .page-news__guides-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-news__card-content {
    padding: 15px;
  }

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

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

  .page-news__featured-card .page-news__card-image {
    height: 200px;
  }

  .page-news__featured-card .page-news__card-content {
    padding: 15px;
  }

  .page-news__guide-item {
    padding: 20px;
  }

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

  .page-news__guide-text {
    font-size: 0.85em;
  }

  .page-news__cta-section {
    padding: 60px 15px;
  }

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

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

  .page-news__btn-large {
    font-size: 1em;
    padding: 12px 25px;
  }

  /* Universal image responsive for mobile */
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}