/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #FFFFFF; /* Explicitly set for content area if needed */
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body has header offset */
  margin-bottom: 40px;
  text-align: center;
  background-color: #f5f5f5;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
}

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

.page-blog__hero-content-area {
  padding: 40px 20px;
  background-color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-top: -80px; /* Overlap with image slightly for visual effect */
  position: relative;
  z-index: 1;
  border-radius: 8px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__main-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 15px;
  line-height: 1.2;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Section Titles and Descriptions */
.page-blog__section-title {
  font-size: 2em;
  font-weight: bold;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 15px;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: #666666;
  text-align: center;
  margin-bottom: 40px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-outline {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
}

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

.page-blog__btn-primary:hover {
  background-color: #1a8cc4;
  border-color: #1a8cc4;
}

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

.page-blog__btn-secondary:hover {
  background-color: #e0f0f8;
}

.page-blog__btn-outline {
  background-color: transparent;
  color: #26A9E0;
  border: 1px solid #26A9E0;
  padding: 8px 15px;
  font-size: 0.9em;
  margin-top: 15px;
}

.page-blog__btn-outline:hover {
  background-color: #26A9E0;
  color: #FFFFFF;
}

/* Recent Posts Section */
.page-blog__recent-posts-section {
  padding: 40px 0;
  background-color: #f9f9f9;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-blog__card-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__card-meta {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 15px;
}

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

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

/* Popular Posts Section (Slider) */
.page-blog__popular-posts-section {
  padding: 40px 0;
  background-color: #FFFFFF;
}

.page-blog__blog-slider {
  position: relative;
  margin-top: 30px;
  overflow: hidden;
}

.page-blog__blog-slider-wrapper {
  overflow: hidden;
}

.page-blog__blog-slider-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.page-blog__blog-slide {
  flex: 0 0 calc(33.333% - 14px); /* 3 items per row with gap */
  max-width: calc(33.333% - 14px);
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-blog__blog-slider-prev,
.page-blog__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(38, 169, 224, 0.8);
  color: #FFFFFF;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5em;
  z-index: 10;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-blog__blog-slider-prev {
  left: -20px;
}

.page-blog__blog-slider-next {
  right: -20px;
}

.page-blog__blog-slider-prev:hover,
.page-blog__blog-slider-next:hover {
  background-color: #26A9E0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 40px 0;
  background-color: #f9f9f9;
}

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

.page-blog__category-card {
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
}

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

.page-blog__category-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #26A9E0;
  padding: 15px;
}

/* CTA Section */
.page-blog__cta-section {
  background-color: #26A9E0;
  color: #FFFFFF;
  padding: 60px 20px;
  text-align: center;
}

.page-blog__cta-title {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #FFFFFF;
}

.page-blog__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Ensure all images are responsive by default */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-blog {
    font-size: 15px;
    line-height: 1.5;
  }

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

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

  .page-blog__hero-image-wrapper {
    max-height: 300px;
  }

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

  .page-blog__hero-content-area {
    padding: 20px 15px;
    margin-top: -40px;
  }

  .page-blog__main-title {
    font-size: 1.8em;
    max-width: 100%;
  }

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

  .page-blog__hero-cta {
    flex-direction: column;
    gap: 15px;
  }

  /* Buttons - Mobile specific */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-outline,
  .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;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-cta .page-blog__btn-primary,
  .page-blog__hero-cta .page-blog__btn-secondary,
  .page-blog__cta-buttons .page-blog__btn-primary,
  .page-blog__cta-buttons .page-blog__btn-secondary {
    width: auto !important; /* Allow buttons in flex containers to size naturally */
    flex-grow: 1; /* Allow buttons to grow in flex container */
    max-width: 100%;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Recent Posts Section */
  .page-blog__recent-posts-section {
    padding: 20px 0;
  }

  .page-blog__section-title {
    font-size: 1.5em;
  }

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

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

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

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

  /* Popular Posts Section (Slider) */
  .page-blog__popular-posts-section {
    padding: 20px 0;
  }

  .page-blog__blog-slider-track {
    gap: 15px;
  }

  .page-blog__blog-slide {
    flex: 0 0 85%; /* Show partial next slide */
    max-width: 85%;
  }

  .page-blog__blog-slider-prev,
  .page-blog__blog-slider-next {
    width: 30px;
    height: 30px;
    font-size: 1.2em;
    padding: 5px;
    left: -10px;
    right: -10px;
  }

  /* Categories Section */
  .page-blog__categories-section {
    padding: 20px 0;
  }

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

  .page-blog__category-image {
    height: 150px;
  }

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

  /* CTA Section */
  .page-blog__cta-section {
    padding: 40px 15px;
  }

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

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

  /* Ensure all images and containers are fully responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__blog-slide,
  .page-blog__category-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0px;
    padding-right: 0px;
  }
}