/* Blogs Page Specific Styles */

/* Hero Section Enhancements */
.blogs-hero {
  background: var(--sqube-red);
  position: relative;
  overflow: hidden;
}

.blogs-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

/* Blog Card Animations */
.blog-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.blog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.blog-card:hover::before {
  left: 100%;
}

/* Category Icons */
.category-icon {
  transition: all 0.3s ease;
  position: relative;
}

.category-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(138, 0, 0, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.category-icon:hover::after {
  width: 100px;
  height: 100px;
}

/* Search Input Enhancements */
.blog-search {
  position: relative;
  transition: all 0.3s ease;
}

.blog-search:focus-within {
  transform: scale(1.02);
  box-shadow: 0 0 0 4px rgba(138, 0, 0, 0.1);
}

/* Featured Article Card */
.featured-article {
  transition: all 0.3s ease;
  position: relative;
}

.featured-article:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.featured-article img {
  transition: transform 0.3s ease;
}

.featured-article:hover img {
  transform: scale(1.05);
}

/* Author Avatar */
.author-avatar {
  transition: all 0.3s ease;
}

.author-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Bookmark Button */
.bookmark-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bookmark-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.bookmark-btn:hover::before {
  left: 100%;
}

.bookmark-btn:hover {
  transform: scale(1.1);
}

/* Filter Buttons */
.filter-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

/* Loading Animation for Blog Cards */
.blog-card.loading {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered Animation for Blog Grid */
.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 Category Hover Effects */
.blog-category {
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-category:hover {
  transform: translateY(-4px);
}

.blog-category.active {
  background: var(--primary);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Newsletter Form Enhancements */
.newsletter-form {
  position: relative;
}

.newsletter-form input:focus {
  box-shadow: 0 0 0 3px rgba(138, 0, 0, 0.1);
  border-color: var(--sqube-red);
}

/* Read More Button */
.read-more-btn {
  transition: all 0.3s ease;
  position: relative;
}

.read-more-btn::after {
  content: "";
  position: absolute;
  right: -20px;
  opacity: 0;
  transition: all 0.3s ease;
}

.read-more-btn:hover::after {
  right: -10px;
  opacity: 1;
}

.read-more-btn:hover {
  transform: translateX(4px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .blog-card {
    margin-bottom: 1rem;
  }

  .category-icon {
    width: 60px;
    height: 60px;
  }

  .blog-search {
    margin-bottom: 1rem;
  }

  .featured-article {
    flex-direction: column;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .blog-card {
    /* background: #1f2937; */
    border: 1px solid #374151;
  }

  .blog-card:hover {
    border-color: var(--sqube-red);
  }
}

/* Print Styles */
@media print {
  .blog-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .blog-card:hover {
    transform: none;
  }

  .bookmark-btn,
  .filter-btn {
    display: none;
  }
}
