.blog-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.case-studies-header {
  text-transform: uppercase;
  background-color: #f8b82f;
  padding: 5px 10px;
  color: #fff !important;
  border-radius: 5px;
}

.case-studies-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.date-icon {
  margin-right: 5px;
}


/* Responsive adjustments */
@media screen and (max-width: 1200px) {
  .blog-section {
    grid-template-columns: repeat(3, 1fr);
  }

  .case-studies-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 900px) {
  .blog-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-studies-section {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media screen and (max-width: 600px) {
  .blog-section {
    grid-template-columns: 1fr;
  }

  .case-studies-section {
    grid-template-columns: 1fr;
  }
}

/* Blog Card */
.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #fff;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-10px);
}

/* Image fixed size */
.blog-card .blog-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.blog-card .blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

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

/* Blog Content */
.blog-card .blog-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card .blog-meta {
  font-size: 14px;
  color: #0d1e46;
  margin-bottom: 10px;
}

.blog-card .blog-title a {
  text-decoration: none;
  color: #0d1e46;
  transition: color 0.3s ease;
  cursor: pointer;
}

.blog-card:hover .blog-title a {
  color: #f8b82f;
}

.blog-card .blog-title {
  font-size: 18px;
  margin-bottom: 10px;
}

/* Limit description to 8 lines */
.blog-card .blog-desc {
  font-size: 14px;
  color: #333;
  margin-bottom: 15px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Read More button at bottom right */
.blog-card .blog-readmore {
  margin-top: auto;
  align-self: flex-end;
  display: inline-block;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 14px;
  color: #f8b82f;
  background-color: #0d1e46;
  border-radius: 30px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.blog-card .blog-readmore::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 0;
  top: 0;
  left: 0;
  background-color: #f8b82f;
  z-index: -1;
  transition: all 0.4s ease;
}

.blog-card .blog-readmore:hover::after {
  height: 100%;
}

.blog-card .blog-readmore:hover {
  color: #0d1e46;
  transform: scale(1.1);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-container button {
  min-width: 40px;
  height: 40px;
  padding: 8px 12px;
  border: 2px solid #0d1e46;
  background-color: #fff;
  color: #0d1e46;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

.pagination-container button:hover {
  background-color: #0d1e46;
  color: #f8b82f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination-container button.active {
  background-color: #f8b82f;
  color: #0d1e46;
  border-color: #f8b82f;
  box-shadow: 0 4px 12px rgba(248, 184, 47, 0.4);
}

.pagination-container button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Prev/Next buttons styling */
.pagination-container button.prev-btn,
.pagination-container button.next-btn {
  font-weight: 700;
  padding: 8px 16px;
}


.blog-detail {
  /* max-width: 900px; */
  margin: 60px auto;
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-detail img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 25px;
}

.blog-detail h1 {
  color: #0d1e46;
  font-size: 28px;
  margin-bottom: 15px;
}

.blog-meta {
  color: #555;
  font-size: 14px;
  margin-bottom: 20px;
}

.blog-content {
  color: #333;
  font-size: 16px;
  line-height: 1.8;
}

.back-btn {
  display: inline-block;
  margin-top: 25px;
  background-color: #0d1e46;
  color: #f8b82f;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  transition: 0.3s;
}

.back-btn:hover {
  background-color: #f8b82f;
  color: #0d1e46;
}

/* --- Related Posts --- */
.related-posts {
  margin-top: 80px;
}

.related-posts h3 {
  color: #0d1e46;
  font-weight: 700;
  margin-bottom: 25px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.related-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.related-card:hover {
  transform: translateY(-8px);
}

.related-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.related-card .related-content {
  padding: 15px;
}

.related-card h4 {
  color: #0d1e46;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.related-card h4 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.related-card h4 a:hover {
  color: #f8b82f;
}

.related-card p {
  font-size: 14px;
  color: #555;
}

.wave-top {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  margin-top: 20px;
}

.wave-top svg {
  position: relative;
  display: block;
  width: 100%;
  height: 80px;
  /* medium height, adjust as needed */
}

.wave-top svg path {
  fill: #0d1e46;
  /* wave color */
}

/* Blog Loader Styles */
.blog-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 60px 20px;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Add position relative to parent container */
#blog-section {
  position: relative;
  min-height: 60vh;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #0d1e46;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-title {
  font-size: 28px;
  font-weight: 700;
  color: #0d1e46;
  margin-bottom: 12px;
  animation: fadeInUp 0.6s ease-out;
}

.loader-message {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error State Styles */
.blog-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 60px 20px;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.blog-error i {
  font-size: 64px;
  color: #ef4444;
  margin-bottom: 20px;
}

.blog-error h3 {
  font-size: 24px;
  font-weight: 700;
  color: #0d1e46;
  margin-bottom: 12px;
}

.blog-error p {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 24px;
}

.retry-btn {
  padding: 12px 32px;
  background-color: #0d1e46;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background-color: #1a2f5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 30, 70, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .loader-title {
    font-size: 24px;
  }
  
  .loader-message {
    font-size: 14px;
  }
  
  .blog-error h3 {
    font-size: 20px;
  }
  
  .blog-error i {
    font-size: 48px;
  }
}