/* ======================
BLOG PAGE - frontend/pages/blog.blade.php
Modularizado desde style.css / responsive.css.
Las tarjetas/sidebar compartidas (.wsus__single_blog, .wsus__blog_*) siguen en style.css.
====================== */

/* Blog grid: equal height cards + title truncation */
.blog-grid > [class*="col-"] {
  display: flex;
}
.blog-grid .wsus__single_blog {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.blog-grid .wsus__single_blog img {
  height: 203px;
  width: 100%;
  object-fit: cover;
}
.blog-grid .wsus__blog_text {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-grid .wsus__blog_text_center {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-grid .wsus__blog_text_center a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-grid .wsus__blog_text_center .date {
  margin-top: auto;
}
.blog-grid > [class*="col-"] .wsus__blog_empty {
  width: 100%;
}

/* ======================
BLOG CATEGORY CHIPS & RESULT
====================== */
.wsus__blog_result {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  margin-bottom: 20px;
}
.wsus__blog_result strong {
  color: #0284c7;
}

.wsus__blog_cats_bar {
  position: sticky;
  top: 122px;
  z-index: 60;
  background: transparent;
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, top 0.3s ease;
}
/* smart header oculto: la barra se pega arriba del todo */
body.header_hidden .wsus__blog_cats_bar {
  top: 0;
}
.wsus__blog_cats_bar .container {
  padding-top: 10px;
  padding-bottom: 10px;
}
.wsus__blog_cats_bar.is-stuck {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wsus__blog_cats {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  align-content: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.wsus__blog_cats::-webkit-scrollbar {
  display: none;
}
.wsus__blog_cats a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  font-size: 14px;
  color: #475569;
  background: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.wsus__blog_cats a:hover {
  border-color: #0ea5e9;
  color: #0ea5e9;
}
.wsus__blog_cats a.active {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 55%, #0284c7 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.wsus__blog_toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 12px;
}

.wsus__blog_search_bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  padding: 0 16px;
  height: 42px;
  background: #fff;
  min-width: 240px;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.wsus__blog_search_bar:focus-within {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.wsus__blog_search_bar i {
  color: #0284c7;
  font-size: 14px;
}
.wsus__blog_search_bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: #334155;
  background: transparent;
  min-width: 0;
}
.wsus__blog_search_clear {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.wsus__blog_search_clear:hover {
  color: #e11d48;
}

#blog-search-spinner {
  color: #0284c7;
  width: 16px;
  height: 16px;
  border-width: 2px;
  flex-shrink: 0;
}

/* ======================
BLOG CARD SKELETON
====================== */
.blog-skeleton .wsus__blog_img {
  height: 203px;
  background: #eef0f3;
}
.blog-skeleton__img,
.blog-skeleton__badge,
.blog-skeleton__line {
  background: #eef0f3;
  position: relative;
  overflow: hidden;
}
.blog-skeleton__img::after,
.blog-skeleton__badge::after,
.blog-skeleton__line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.7) 50%, transparent 70%);
  animation: vendor-card-shimmer 1.4s infinite;
}
.blog-skeleton__img {
  display: block;
  height: 100%;
  border-radius: 0;
}
.blog-skeleton__badge {
  display: inline-block;
  width: 70px;
  height: 20px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.blog-skeleton__line {
  display: block;
  height: 14px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.blog-skeleton__line-1 {
  width: 90%;
}
.blog-skeleton__line-2 {
  width: 70%;
  margin-bottom: 6px;
}
.blog-skeleton__line-date {
  width: 40%;
  height: 12px;
  margin-top: auto;
  margin-bottom: 0;
}

/* ======================
BLOG EMPTY STATE
====================== */
.wsus__blog_empty {
  text-align: center;
  padding: 60px 16px 70px;
  animation: wsus-empty-pop 0.45s ease;
}
.wsus__blog_empty_icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0f2fe 0%, #cffafe 55%, #bae6fd 100%);
  color: #0284c7;
  font-size: 46px;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.2);
}
.wsus__blog_empty_icon svg {
  width: 46px;
  height: 46px;
}
.wsus__blog_empty_title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.wsus__blog_empty_sub {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* ======================
MOBILE (<=991.98px)
====================== */
@media (max-width: 991.98px) {
  .wsus__blog_cats_bar {
    top: var(--hh, 96px);
    overflow-x: clip;
  }
  .wsus__blog_toolbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
  }
  .wsus__blog_search_bar {
    width: 100%;
    min-width: 0;
  }
  .wsus__blog_cats {
    flex: none;
    width: 100%;
    max-width: 100%;
    position: relative;
  }
  .wsus__blog_cats::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 36px;
    background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
    pointer-events: none;
  }
}
