/* style/blog.css */

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

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

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column; /* Stack image and content vertically */
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background-color: #f0f8ff; /* Light background for the whole section */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height of the image wrapper */
  overflow: hidden;
  margin-bottom: 30px; /* Space between image and content */
}

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

.page-blog__hero-content {
  max-width: 800px;
  padding: 0 20px;
}

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

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

.page-blog__hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Section Titles and Descriptions */
.page-blog__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons are responsive */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #e0f2ff;
  color: #1a7bb0;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #f9f9f9;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

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

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1; /* Allows content to expand */
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: #26A9E0; /* Brand color for blog post titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #1a7bb0;
  text-decoration: underline;
}

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

.page-blog__post-excerpt {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start; /* Align to the start of the flex container */
}

.page-blog__read-more:hover {
  color: #1a7bb0;
  text-decoration: underline;
}

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

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Dark background with brand color */
  color: #FFFFFF; /* White text for contrast */
  text-align: center;
}

.page-blog__cta-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 40px auto;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap */
}

/* Responsive styles for images, videos, and buttons */
@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px !important; /* Add side padding for mobile */
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* Small top padding for mobile */
  }

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

  .page-blog__hero-content {
    padding: 0 15px;
  }

  .page-blog__hero-title {
    font-size: 2rem;
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important; /* Full width buttons on mobile */
    max-width: 100% !important;
    padding: 12px 15px !important;
    font-size: 1rem;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__hero-actions,
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 10px;
  }

  .page-blog__latest-posts,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
    padding-top: 20px;
  }

  .page-blog__section-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Single column for posts on mobile */
  }

  .page-blog__post-image {
    height: 180px; /* Slightly smaller height for mobile post images */
  }

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

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

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

  .page-blog__post-card,
  .page-blog__latest-posts,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Image style restrictions */
.page-blog img {
  filter: none !important; /* Ensure no filter changes image color */
}

/* Text color contrast enforcement */
.page-blog__light-bg {
  background-color: #f9f9f9;
  color: #333333;
}

.page-blog__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}