/* style/blog.css */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background: #f0f8ff; /* Light blue background for hero */
  text-align: center;
  padding-bottom: 40px;
}

.page-blog__hero-image-wrapper {
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-blog__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive H1 font size */
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #555;
}

/* General Section Styling */
.page-blog__section-title {
  font-size: 2.2rem;
  color: #26A9E0;
  text-align: center;
  margin: 40px 0 30px;
  font-weight: 600;
  position: relative;
}

.page-blog__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #26A9E0;
  margin: 10px auto 0;
  border-radius: 2px;
}

.page-blog__subsection-title {
  font-size: 1.8rem;
  color: #333333;
  margin: 30px 0 20px;
  font-weight: 600;
}

.page-blog__content-introduction p,
.page-blog__latest-posts p {
  margin-bottom: 15px;
}

.page-blog__content-introduction ul {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
}

.page-blog__content-introduction li {
  margin-bottom: 10px;
}

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

/* CTA Button Styling */
.page-blog__cta-button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-blog__btn-primary:hover {
  background: #1e87d4;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background: #e6f7ff;
  transform: translateY(-2px);
}

.page-blog__cta-section {
  background: #f8f8f8;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  margin-top: 50px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.page-blog__cta-title {
  font-size: 2rem;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__cta-text {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 30px;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Blog Grid */
.page-blog__latest-posts {
  padding: 50px 0;
  background: #ffffff;
}

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

.page-blog__blog-card {
  background: #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;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

.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: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__blog-card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
}

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

.page-blog__blog-card-title {
  font-size: 1.3rem;
  color: #26A9E0;
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.4;
}

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

.page-blog__blog-card-excerpt {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  color: #26A9E0;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__container {
    padding: 15px;
  }

  /* Hero Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 20px;
  }

  .page-blog__hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

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

  /* General Section Styling */
  .page-blog__section-title {
    font-size: 1.8rem;
    margin: 30px 0 20px;
  }

  .page-blog__subsection-title {
    font-size: 1.5rem;
  }

  /* CTA Button Styling */
  .page-blog__cta-button,
  .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;
    padding: 12px 20px;
    margin-bottom: 10px; /* Add space between stacked buttons */
  }

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

  .page-blog__cta-section {
    padding: 25px;
    margin-top: 30px;
  }

  .page-blog__cta-title {
    font-size: 1.6rem;
  }

  .page-blog__cta-text {
    font-size: 1rem;
  }

  /* Blog Grid */
  .page-blog__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__blog-card-image {
    height: 180px; /* Adjust image height for mobile */
  }

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

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

  .page-blog__latest-posts {
    padding: 30px 0;
  }

  /* General Image adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

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