/* 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 background */
  background-color: #ffffff; /* Default body background is white */
}

/* Section container for consistent padding and max-width */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  padding: 40px 0;
  background-color: #f8f8f8; /* Light background for the hero section */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-blog__hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  min-height: 200px;
}

.page-blog__hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__main-title {
  font-size: clamp(2em, 3.5vw, 2.8em); /* Responsive font size */
  font-weight: 700;
  color: #26A9E0; /* Brand color for main title */
  margin-bottom: 15px;
  line-height: 1.2;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1em;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0 10px 15px 10px; /* Spacing for multiple buttons */
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Crucial for responsive buttons */
  white-space: normal;
  word-wrap: break-word;
}

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

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

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0; /* Primary brand color for text */
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #f0f8ff;
  color: #1f8ac9;
}

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

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-blog__post-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 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 20px rgba(0, 0, 0, 0.15);
}

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

.page-blog__post-thumbnail {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Minimum size for images */
  min-width: 200px;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1;
}

.page-blog__post-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #333333;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: #555555;
}

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

/* Categories Section */
.page-blog__categories {
  padding: 60px 0;
  background-color: #26A9E0; /* Primary brand color as background */
  color: #ffffff; /* White text for dark background */
  text-align: center;
}

.page-blog__categories .page-blog__section-title {
  color: #ffffff; /* White title for dark background */
}

.page-blog__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.page-blog__category-item {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #f0f8ff; /* Light blue background */
  text-align: center;
}

.page-blog__cta-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 40px;
}

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

/* Copyright Info */
.page-blog__copyright-info {
  text-align: center;
  padding: 20px 0;
  font-size: 0.9em;
  color: #777777;
  background-color: #f8f8f8;
  border-top: 1px solid #eeeeee;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__main-title {
    font-size: clamp(1.8em, 4vw, 2.5em);
  }

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

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

@media (max-width: 768px) {
  /* General mobile container padding */
  .page-blog__container {
    padding: 0 15px;
  }

  /* Images responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Image containers responsive */
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__cta-section,
  .page-blog__post-card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  /* Buttons responsive */
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 0 0 15px 0 !important; /* Stack buttons vertically */
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack CTA buttons vertically */
    gap: 15px;
  }

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

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

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

  .page-blog__post-thumbnail {
    min-height: 180px; /* Adjust minimum height for mobile */
  }

  .page-blog__category-list {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__category-item {
    width: 100%;
  }
}

/* Ensure no CSS filter is used on images */
.page-blog img {
  filter: none !important;
}

/* Content area images minimum size and no small icons */
.page-blog__post-thumbnail,
.page-blog__hero-image {
  min-width: 200px;
  min-height: 200px;
}

/* Video styles (if any) */
.page-blog video,
.page-blog__video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.page-blog__video-section,
.page-blog__video-container,
.page-blog__video-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-blog__video-section {
    padding-top: 10px !important;
  }
  
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}