/* Blog Page Styles */

/* Section Padding */
.sect-pt4 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Title Styles */
.title-box {
  margin-bottom: 3rem;
}

.title-a {
  text-decoration: none;
  font-size: 2.5rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}

/* Blog Section */
.blog-mf {
  background-color: #d9dcd6;
  min-height: 70vh;
}

/* Cover Image Section */
.section-counter.paralax-mf.bg-image {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.overlay-mf {
  background: rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Loading States */
.spinner-border {
  width: 3rem;
  height: 3rem;
}

#blog-loading {
  padding: 4rem 0;
}

#blog-error {
  padding: 2rem 0;
}

/* Fade-in animation for dynamically loaded content */
.blog-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

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

/* Staggered animation for multiple cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Blog Cards */
.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.card-text {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Blog Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #0582CA 0%, #003554 100%);
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(5, 130, 202, 0.4);
}

.btn-lg {
  padding: 12px 30px;
  font-size: 1.1rem;
  border-radius: 30px;
}

/* Header Spacer */
.header-spacer {
  flex-shrink: 0;
}

/* Blog Grid Improvements */
.row.mb-5 {
  margin-bottom: 4rem !important;
}

/* Blog Post Animations */
.card {
  cursor: pointer;
}

.card-body .btn:hover {
  background: linear-gradient(135deg, #0582CA 0%, #003554 100%);
}

/* Enhanced hover states */
.card:hover .card-title {
  color: #0582CA;
}

.card:hover .card-text {
  color: #555;
}

/* Loading and transition improvements */
.card-img-top {
  background-color: #f8f9fa;
  background-image: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                    linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                    linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                    linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Blog Redirect Section */
.blog-redirect-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid rgba(0,0,0,0.1);
}

.blog-redirect-title {
  color: #333;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.blog-redirect-description {
  color: #6c757d;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.blog-redirect-btn {
  background: linear-gradient(135deg, #0582CA 0%, #003554 100%);
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.blog-redirect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(5, 130, 202, 0.4);
  color: #fff;
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sect-pt4 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .title-a {
    font-size: 2rem;
  }

  .card-img-top {
    height: 180px;
  }

  .card-body {
    padding: 1.2rem;
  }

  .card-title {
    font-size: 1.1rem;
  }
  
  /* Blog Redirect Section Responsive */
  .blog-redirect-title {
    font-size: 1.6rem;
  }
  
  .blog-redirect-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .blog-redirect-btn {
    padding: 10px 25px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .title-a {
    font-size: 1.5rem;
  }

  .card-img-top {
    height: 160px;
  }

  .card-body {
    padding: 1rem;
  }

  .sect-pt4 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  /* Blog Redirect Section Mobile */
  .blog-redirect-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
  }
  
  .blog-redirect-description {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }
  
  .blog-redirect-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
}