.blogs-section {
  margin: 50px 0;
  overflow-x: hidden;
}

.blogs-section h3 {
  color: #084298;
  font-weight: 700;
  margin-bottom: 10px;
}

.blogs-section .section-subtitle {
  color: #084298;
  font-weight: 500;
  margin-bottom: 30px;
}

/* CSS Grid for equal width & height cards */
.blogs-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 16px;
  border-top: 6px solid #fdb72e;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease, transform 0.6s ease;
  opacity: 0;
  transform: translateY(20px);
}

.blog-card.show {
  opacity: 1;
  transform: translateY(0);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
  border-top-color: #bc8e05;
}

/* Image wrapper ensures uniform image height */
.image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid #ddd;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* scales images uniformly */
}

.blog-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1; /* ensures content stretches to match card height */
}

.blog-content h4 {
  color: #084298;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.blog-content p {
  color: #444;
  font-size: 0.95rem;
  margin-bottom: auto;
}

.read-more {
  text-decoration: none;
  color: #fdb72e;
  font-weight: 500;
  margin-top: 10px;
  transition: color 0.2s;
}

.read-more:hover {
  color: #bc8e05;
}

#load-more-btn {
  background: #fdb72e;
  border: none;
  color: #084298;
  font-weight: 700;
  padding: 10px 25px;
  border-radius: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
}

#load-more-btn:hover {
  background: #bc8e05;
  transform: translateY(-2px);
}

.hidden-card {
  display: none;
}

/* Hidden cards start invisible */
.hidden-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: none; /* Keep them hidden initially */
}

/* Show class triggers fade-in */
.blog-card.show {
  opacity: 1;
  transform: translateY(0);
  display: flex; /* Ensure flex layout for card */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blogs-container {
    grid-template-columns: 1fr;
  }
}

.image-wrapper {
  position: relative; /* required for overlay */
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid #ddd;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  transition: transform 0.4s ease;
}

/* Hover effect: scale + shadow */
.blog-card:hover .image-wrapper {
  transform: scale(1.05); 
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.blog-card:hover .image-wrapper img {
  transform: scale(1.05);
}

/* Golden overlay */
.image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(253, 183, 46, 0); /* start transparent */
  transition: background 0.4s ease;
  pointer-events: none; /* allow clicks through overlay */
}

.blog-card:hover .image-wrapper::after {
  background: rgba(253, 183, 46, 0.15); /* subtle golden tint on hover */
}
.read-more:hover {
  color: #bc8e05;
  transform: translateX(4px);
  text-shadow: 0 0 6px rgba(253,183,46,0.6);
}

/* --- Performance Optimizations for Mobile --- */
@media (max-width: 768px) {
  /* Use lighter, crisper shadows instead of heavy blurs */
  .blog-card,
  .blog-item,
  .blog-entry {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
  }

  /* Remove costly shadow transitions, keep transform/opacity only */
  .blog-card,
  .blog-item,
  .blog-entry {
    transition: transform 0.3s ease, opacity 0.4s ease !important;
  }

  /* Optional: add subtle hover effect without box-shadow animation */
  .blog-card:hover,
  .blog-item:hover,
  .blog-entry:hover {
    transform: scale(1.02);
    opacity: 0.98;
  }
}
