/* Blog Shortcode Tab Filtering & Cards - Matching Figma HTML Specs */

.crayola-blog-filter-section {
  width: 100%;
}

.crayola-blog-tabs-wrapper {
  position: sticky;
  /* top: 88px; */
  z-index: 40;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 16px 0;
  /* background: rgba(248, 245, 255, 0.95); */
  background: #d5d5d657;
  border-bottom: 1px solid rgba(124, 5, 241, 0.1);
   transition: top 0.3s ease-in-out;
}

.crayola-tabs-container {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.crayola-tabs-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}
.crayola-blog-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.crayola-tab-btn {
  white-space: nowrap;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #6b7280; /* text-gray-500 */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  cursor: pointer;
}

.crayola-tab-btn:hover {
  color: #7e22ce; /* hover:text-purple-700 */
  border-color: #d8b4fe; /* hover:border-purple-300 */
}

.crayola-tab-btn.active {
  background: linear-gradient(90deg, rgb(124, 5, 241), rgb(210, 92, 210));
  color: #ffffff;
  border-color: transparent;
  box-shadow:
    0 10px 15px -3px rgba(216, 180, 254, 0.4),
    0 4px 6px -4px rgba(216, 180, 254, 0.4);
}

.crayola-blog-grid-wrapper {
  width: 100%;
  padding: 80px 0; /* py-20 */
  background: rgb(248, 245, 255);
}

.crayola-container {
  max-width: 1280px; /* max-w-7xl */
  margin: 0 auto;
  padding: 0 24px; /* px-6 */
}

.crayola-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px; /* gap-8 */
}

@media (max-width: 1024px) {
  .crayola-blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .crayola-blog-grid {
    grid-template-columns: 1fr;
  }
}

.crayola-blog-card {
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.crayola-blog-card.hide {
  display: none;
}

.blog-card-inner {
  background: rgb(255, 255, 255);
  border-radius: 16px; /* rounded-2xl */
  overflow: hidden;
  border: 1.5px solid rgba(124, 5, 241, 0.08);
  box-shadow: rgba(124, 5, 241, 0.05) 0px 2px 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s ease;
  transform: translateY(0px);
}

.blog-card-inner:hover {
  transform: translateY(-4px);
  box-shadow: rgba(124, 5, 241, 0.1) 0px 10px 25px;
}

.blog-image-link {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  height: 208px; /* h-52 */
  background-color: #f3f4f6; /* bg-gray-100 */
}

.blog-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.blog-card-inner:hover .blog-image {
  transform: scale(1.05); /* group-hover:scale-105 */
}

.blog-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  pointer-events: none;
}

.blog-category-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #dbeafe; /* bg-blue-100 */
  color: #1d4ed8; /* text-blue-700 */
  border: 1px solid #bfdbfe; /* border-blue-200 */
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}

.blog-content {
  padding: 24px; /* p-6 */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9ca3af; /* text-gray-400 */
  font-size: 12px; /* text-xs */
  margin-bottom: 12px; /* mb-3 */
}

.blog-meta-top svg {
  width: 12px;
  height: 12px;
}

.blog-title {
  margin: 0 0 12px 0; /* mb-3 */
  font-size: 18px; /* text-lg */
  line-height: 1.375; /* leading-snug */
  font-weight: 700; /* font-bold */
}

.blog-title a {
  color: #111827; /* text-gray-900 */
  transition: color 0.2s ease;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-title a:hover {
  color: #7e22ce; /* group-hover:text-purple-700 */
}

.blog-excerpt {
  color: #6b7280; /* text-gray-500 */
  font-size: 14px; /* text-sm */
  line-height: 1.625; /* leading-relaxed */
  margin-bottom: 20px; /* mb-5 */
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px; /* pt-4 */
  border-top: 1px solid #f3f4f6; /* border-gray-100 */
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 8px; /* gap-2 */
}

.author-avatar {
  width: 32px; /* w-8 */
  height: 32px; /* h-8 */
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  color: #6b7280; /* text-gray-500 */
  font-size: 12px; /* text-xs */
  font-weight: 500;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px; /* gap-1 */
  color: #9333ea; /* text-purple-600 */
  font-size: 14px; /* text-sm */
  font-weight: 600; /* font-semibold */
  text-decoration: none;
  transition: color 0.2s ease;
}

.read-more-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.read-more-btn:hover {
  color: #6b21a8; /* hover:text-purple-800 */
}

.read-more-btn:hover svg {
  transform: translateX(4px);
}

/* Pagination Styles */
.crayola-blog-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.crayola-blog-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.crayola-blog-pagination ul.page-numbers li a,
.crayola-blog-pagination ul.page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
}

.crayola-blog-pagination ul.page-numbers li a:hover {
  border-color: #d8b4fe;
  color: #7e22ce;
  background: #faf5ff;
}

.crayola-blog-pagination ul.page-numbers li span.current {
  background: #7b2cbf;
  color: #ffffff;
  border-color: #7b2cbf;
  box-shadow: 0 4px 10px rgba(123, 44, 191, 0.2);
}

.crayola-blog-pagination ul.page-numbers li span.dots {
  border: none;
  background: transparent;
  color: #9ca3af;
  min-width: auto;
  padding: 0 4px;
}
