/* ===================================================
   Blog TezlikSoftware — Category tabs + grid design
   =================================================== */

:root {
  --cat-dev: #2563eb;
  --cat-pricing: #7c3aed;
  --cat-mrp: #059669;
  --cat-dev-bg: #eff6ff;
  --cat-pricing-bg: #f5f3ff;
  --cat-mrp-bg: #ecfdf5;
  --card-radius: 12px;
  --shadow-card: 0 2px 12px rgba(0,0,0,.07);
  --shadow-hover: 0 8px 28px rgba(0,0,0,.13);
}

/* ---- Hero overrides ---- */
.blog-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1a4068 100%);
  padding: 72px 0 56px;
  text-align: center;
}
.blog-hero h1 {
  font-family: 'Dosis', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.blog-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Category tab bar ---- */
.blog-tabs-wrap {
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.blog-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.blog-tabs::-webkit-scrollbar { display: none; }

.blog-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  font-family: 'Dosis', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
  margin-bottom: -2px;
}
.blog-tab:hover { color: #111827; }

.blog-tab.active[data-cat="todos"]   { color: #111827; border-color: #111827; }
.blog-tab.active[data-cat="desarrollo"] { color: var(--cat-dev); border-color: var(--cat-dev); }
.blog-tab.active[data-cat="pricing"]   { color: var(--cat-pricing); border-color: var(--cat-pricing); }
.blog-tab.active[data-cat="mrp"]       { color: var(--cat-mrp); border-color: var(--cat-mrp); }

.blog-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  padding: 0 5px;
  background: #f3f4f6;
  color: #374151;
}
.blog-tab.active[data-cat="desarrollo"] .blog-tab-count { background: var(--cat-dev-bg); color: var(--cat-dev); }
.blog-tab.active[data-cat="pricing"]   .blog-tab-count { background: var(--cat-pricing-bg); color: var(--cat-pricing); }
.blog-tab.active[data-cat="mrp"]       .blog-tab-count { background: var(--cat-mrp-bg); color: var(--cat-mrp); }

/* ---- Main grid section ---- */
.blog-section-new {
  background: #f9fafb;
  padding: 52px 0 80px;
  min-height: 520px;
}

/* ---- Section header per category ---- */
.blog-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.blog-section-header h2 {
  font-family: 'Dosis', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.blog-section-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  border-radius: 2px;
}

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

/* ---- Article card ---- */
.blog-card {
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform .22s, box-shadow .22s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: inherit;
}

.blog-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #e5e7eb;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }

/* category badge on image */
.blog-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-desarrollo { background: var(--cat-dev-bg); color: var(--cat-dev); }
.badge-pricing    { background: var(--cat-pricing-bg); color: var(--cat-pricing); }
.badge-mrp        { background: var(--cat-mrp-bg); color: var(--cat-mrp); }

.blog-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .8rem;
  color: #9ca3af;
  margin-bottom: 10px;
}
.blog-card-meta span { display: flex; align-items: center; gap: 4px; }

.blog-card-title {
  font-family: 'Dosis', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 8px;
}
.blog-card-excerpt {
  font-size: .88rem;
  color: #6b7280;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 16px;
}
.blog-card-link {
  font-size: .85rem;
  font-weight: 700;
  color: var(--cat-dev);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: gap .2s;
}
.blog-card-link:hover { gap: 8px; text-decoration: none; color: var(--cat-dev); }
.badge-pricing ~ * .blog-card-link,
.blog-card[data-cat="pricing"] .blog-card-link   { color: var(--cat-pricing); }
.blog-card[data-cat="mrp"] .blog-card-link       { color: var(--cat-mrp); }

/* ---- Empty state ---- */
.blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  grid-column: 1 / -1;
}
.blog-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.blog-empty p { font-size: 1rem; }

/* ---- Loading skeleton ---- */
.blog-skeleton {
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.skel-img {
  height: 200px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skel-body { padding: 20px 22px; }
.skel-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 10px;
}
.skel-line.short { width: 55%; }
.skel-line.med { width: 80%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Pagination ---- */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 44px;
}
.blog-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  text-decoration: none;
}
.blog-page-btn:hover { background: #f3f4f6; }
.blog-page-btn.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.blog-page-btn.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ---- CTA strip ---- */
.blog-cta-strip {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 52px 0;
  text-align: center;
}
.blog-cta-strip h2 {
  font-family: 'Dosis', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.blog-cta-strip p { color: rgba(255,255,255,.75); margin-bottom: 24px; }
.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .2s;
}
.blog-cta-btn:hover { opacity: .88; color: #fff; text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-hero h1 { font-size: 2rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 18px; }
  .blog-tab { padding: 12px 14px; font-size: .88rem; }
  .blog-section-new { padding: 36px 0 60px; }
}
