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

.page-blog__hero-carousel-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Rely on body for header offset */
  margin-bottom: 40px;
}

.page-blog__hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.page-blog__hero-slide {
  display: none;
  position: relative;
  width: 100%;
}

.page-blog__hero-slide.is-active {
  display: block;
}

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

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #ffffff;
  max-width: 80%;
  z-index: 10;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

.page-blog__hero-title {
  font-size: 3.2em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-blog__hero-description {
  font-size: 1.2em;
  line-height: 1.5;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__hero-slider-prev,
.page-blog__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(47, 107, 255, 0.7);
  color: #ffffff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.5em;
  border-radius: 50%;
  z-index: 15;
  transition: background-color 0.3s ease;
}

.page-blog__hero-slider-prev:hover,
.page-blog__hero-slider-next:hover {
  background-color: #2F6BFF;
}

.page-blog__hero-slider-prev {
  left: 10px;
}

.page-blog__hero-slider-next {
  right: 10px;
}

.page-blog__home-content-box {
  max-width: 91%;
  margin: 0 auto 40px auto;
  padding: 10px 16px;
  border: 5px solid #D6E2FF;
  border-radius: 15px;
  box-shadow: 0 0 20px #A5C4FF;
  height: 700px;
  background-color: #F4F7FB;
  color: #1F2D3D;
}

.page-blog__home-content-inner {
  height: 100%;
  overflow-y: auto;
  padding-right: 10px; /* For scrollbar spacing */
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #2F6BFF;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

.page-blog__section-description {
  font-size: 1.1em;
  line-height: 1.6;
  color: #1F2D3D;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-blog__latest-posts-section,
.page-blog__featured-posts-section {
  padding: 40px 20px;
  margin-bottom: 20px;
}

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

.page-blog__blog-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #1F2D3D;
}

.page-blog__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-blog__blog-card-image {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
}

.page-blog__blog-card-content {
  padding: 20px;
}

.page-blog__blog-card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2F6BFF;
  line-height: 1.4;
}

.page-blog__blog-card-meta {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 15px;
}

.page-blog__blog-card-excerpt {
  font-size: 1em;
  line-height: 1.6;
  color: #1F2D3D;
  margin-bottom: 20px;
}

.page-blog__blog-card-readmore {
  display: inline-block;
  color: #2F6BFF;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__blog-card-readmore:hover {
  color: #6FA3FF;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

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

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #2F6BFF;
  border: 2px solid #2F6BFF;
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background-color: #2F6BFF;
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(47, 107, 255, 0.4);
}

.page-blog__cta-section {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  padding: 60px 20px;
  text-align: center;
  color: #ffffff;
  border-radius: 10px;
  margin-top: 40px;
}

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

.page-blog__cta-description {
  font-size: 1.1em;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: #f0f0f0;
}

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

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

/* General button responsiveness */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog a[class*="button"],
.page-blog a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-buttons,
.page-blog__button-group,
.page-blog__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-blog__hero-carousel-section {
    padding-top: 10px !important;
    margin-bottom: 20px;
  }

  .page-blog__hero-content {
    max-width: 95%;
    padding: 15px;
  }

  .page-blog__hero-title {
    font-size: 2em;
    margin-bottom: 10px;
  }

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

  .page-blog__hero-slider-prev,
  .page-blog__hero-slider-next {
    padding: 8px 12px;
    font-size: 1.2em;
  }

  .page-blog__home-content-box {
    max-width: 100% !important;
    height: auto !important;
    padding: 10px;
    border-radius: 0;
    margin-bottom: 20px;
  }

  .page-blog__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0;
  }

  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 20px;
  }

  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 20px;
    padding: 0 15px;
  }

  .page-blog__blog-grid {
    grid-template-columns: repeat(1, 1fr) !important;
    gap: 20px;
    padding: 0 15px;
  }

  .page-blog__blog-card-image {
    height: 180px;
  }

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

  .page-blog__blog-card-excerpt {
    font-size: 0.95em;
  }

  .page-blog__cta-section {
    padding: 40px 15px;
    border-radius: 0;
    margin-top: 20px;
  }

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

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0 !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__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-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* --- Tablet Responsive Styles (max-width: 1024px) --- */
@media (max-width: 1024px) and (min-width: 769px) {
  .page-blog__hero-title {
    font-size: 2.5em;
  }

  .page-blog__hero-description {
    font-size: 1.1em;
  }

  .page-blog__home-content-box {
    max-width: 95%;
    height: 600px;
  }

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

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

  .page-blog__cta-description {
    font-size: 1em;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 10px 20px;
    font-size: 1em;
  }
}