/* Blog Section Styles */
.container-blog {
  padding: 8rem 0;
  overflow: hidden;
  /* background-image: linear-gradient(#02061E, #01020c91), url(../assets/images/bg.jpg); */
  /* background-repeat: no-repeat; */
  /* background-size: cover; */
  /* background-position: 70%; */
  position: relative;
}

.container-blog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgb(8 14 44), #080E2D);
  pointer-events: none;
}

.blog {
  position: relative;
  z-index: 1;
}

.blog__heading {
  font-size: 4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6rem;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Swiper Container */
.blog-swiper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  overflow: hidden;
  position: relative;
}

.posts-container {
  display: flex;
  align-items: stretch;
}

.blog-swiper .swiper-slide {
  height: auto;
  display: flex;
  flex-direction: column;
  margin-right: 7px !important;
  margin-left: 7px !important;
}

/* Override Swiper's default spacing */
.blog-swiper .swiper-wrapper {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0px 20px;
}

.blog-card {
  background: rgb(45 45 67 / 80%);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 10px;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.blog-card__image-container {
  position: relative;
  height: 248px;
  overflow: hidden;
}

.blog-card__category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__image {
  transform: scale(1.05);
}

.blog-card__meta {
  position: absolute;
  width: 46%;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.blog-card__date,
.blog-card__views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-card__content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-card__title {
  font-family: system-ui;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-card__author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(102, 126, 234, 0.3);
  object-fit: cover;
}

.blog-card__author-name {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
}

.blog-card__verified {
  color: #4a90e2;
  font-size: 0.8rem;
}

.blog-card__likes {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

.blog-card__likes i {
  color: #ff6b6b;
}

/* Swiper Navigation Buttons */
.blog-swiper-button-next,
.blog-swiper-button-prev {
  color: #667eea !important;
  background: rgba(45, 45, 67, 0.9);
  border-radius: 50%;
  width: 50px !important;
  height: 50px !important;
  margin-top: -25px !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  z-index: 10 !important;
  position: absolute !important;
}

.blog-swiper-button-next {
  right: 10px !important;
}

.blog-swiper-button-prev {
  left: 10px !important;
}

.blog-swiper-button-next:hover,
.blog-swiper-button-prev:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: scale(1.1);
}

.blog-swiper-button-next::after,
.blog-swiper-button-prev::after {
  font-size: 18px !important;
  font-weight: bold;
}

/* Swiper Pagination */
.blog-swiper-pagination {
  position: relative !important;
  margin-top: 2rem;
}

.blog-swiper-pagination .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  transition: all 0.3s ease;
}

.blog-swiper-pagination .swiper-pagination-bullet-active {
  background: #667eea;
  transform: scale(1.2);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .container-blog {
    padding: 4rem 0;
  }
  
  .blog__heading {
    font-size: 2.5rem;
    margin-bottom: 3rem;
  }
  
  .blog-swiper {
    padding: 0 1rem;
  }
  
  .blog-swiper .swiper-wrapper {
    padding: 0 10px;
  }
  
  .blog-swiper .swiper-slide {
    padding: 0 8px;
  }
  
  .posts-container {
    gap: 1.5rem;
  }

  /* Hide navigation buttons on mobile */
  .blog-swiper-button-next,
  .blog-swiper-button-prev {
    display: none !important;
  }
  
  .blog-card__image-container {
    height: 180px;
  }
  
  .blog-card__content {
    padding: 1.25rem;
  }
  
  .blog-card__title {
    font-size: 1.1rem;
  }
}

/* Tablet styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .blog-swiper {
    padding: 0 2rem;
  }
  
  .blog-swiper .swiper-wrapper {
    padding: 0 15px;
  }
  
  .blog-swiper .swiper-slide {
    padding: 0 10px;
  }
  
  .blog-swiper-button-next {
    right: 5px !important;
  }

  .blog-swiper-button-prev {
    left: 5px !important;
  }
}

@media screen and (max-width: 480px) {
  .blog__heading {
    font-size: 2rem;
  }
  
  .blog-swiper {
    padding: 0 0.5rem;
  }
  
  .blog-card__content {
    padding: 1rem;
  }
  
  .blog-card__title {
    font-size: 1rem;
  }
  
  .blog-card__excerpt {
    font-size: 0.85rem;
  }
}

/* Animation for cards */
.blog-card.hidden {
  opacity: 0;
  transform: translateY(30px);
}

.blog-card.hidden.fromBottom {
  animation: slideInFromBottom 0.6s ease forwards;
}

@keyframes slideInFromBottom {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for multiple cards */
.blog-card:nth-child(1) {animation-delay: 0.1s;}
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }
.blog-card:nth-child(7) { animation-delay: 0.7s; }
.blog-card:nth-child(8) { animation-delay: 0.8s; }
.blog-card:nth-child(9) { animation-delay: 0.9s; }
.blog-card:nth-child(10) { animation-delay: 1.0s; }
