/* Agile Design — Blog (home.php) */

/* ============================================================
   HERO
   ============================================================ */
.blog-hero {
  position: relative;
  background: linear-gradient(135deg, #0B1120 0%, #0D1835 40%, #0F2060 75%, #1A3580 100%);
  padding: 88px 0 80px;
  overflow: hidden;
}

.blog-hero-glow-r {
  position: absolute; top: -100px; right: -80px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(75,117,255,.28) 0%, transparent 65%);
  pointer-events: none;
}
.blog-hero-glow-l {
  position: absolute; bottom: -120px; left: -60px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,54,79,.09) 0%, transparent 65%);
  pointer-events: none;
}

.blog-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 16px rgba(255,255,255,.1);
  border-radius: 9999px; padding: 5px 14px; margin-bottom: 24px;
}
.blog-hero-eyebrow-text {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: #fff;
}

.blog-hero-h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 5vw, 58px); line-height: 1.1;
  color: #fff; margin: 0 0 18px; letter-spacing: -.025em;
  text-wrap: balance;
}
.blog-hero-accent { color: #E8364F; }

.blog-hero-desc {
  font-family: var(--font-body); font-size: 17px;
  color: rgba(255,255,255,.58); max-width: 520px;
  margin: 0 auto; line-height: 1.65;
}

/* ============================================================
   LAYOUT — sidebar + contenido
   ============================================================ */
.blog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 88px;
  background: #fff;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.blog-sidebar {
  position: sticky;
  top: 86px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 16px 12px;
  box-shadow: var(--shadow-card-soft);
}

.blog-sidebar-label {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: #94A3B8;
  margin-bottom: 12px;
  padding-left: 4px;
}

.blog-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Ítem de categoría */
.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease;
}
.cat-item:hover { background: #EEF0F6; }

/* Chip de ícono */
.cat-icon-wrap {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: #EEF0F6;
  color: #94A3B8;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .18s, color .18s;
}
.cat-icon-wrap svg { display: block; }

/* Label */
.cat-label {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  color: #334155;
  flex: 1;
  line-height: 1.2;
  transition: font-weight .15s, color .15s;
}

/* Contador */
.cat-count {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  background: #EEF0F6;
  color: #94A3B8;
  padding: 2px 7px;
  border-radius: 9999px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
  transition: background .18s, color .18s;
}

/* ============================================================
   CONTENIDO — columna derecha
   ============================================================ */
.blog-content { min-width: 0; }

/* ============================================================
   CARD DESTACADA (Featured)
   ============================================================ */
.blog-featured-card {
  display: grid;
  grid-template-columns: 2fr 3fr;
  margin-bottom: 28px; overflow: hidden;
  text-decoration: none; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.blog-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-elevated);
}

.blog-feat-img {
  min-height: 240px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.blog-dot-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 22px 22px; pointer-events: none;
}

.blog-feat-content { padding: 32px 36px; display: flex; flex-direction: column; }

.blog-feat-badges {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.blog-badge-featured {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: #fff; background: #E8364F; padding: 4px 11px; border-radius: 9999px;
}

.blog-feat-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(20px, 2.2vw, 28px); line-height: 1.2;
  color: var(--fg1); margin: 0 0 12px; letter-spacing: -.02em;
  text-wrap: balance;
}
.blog-feat-excerpt {
  font-family: var(--font-body); font-size: 15px;
  color: var(--fg3); line-height: 1.7; margin: 0 0 auto;
}
.blog-feat-footer {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 20px;
}
.blog-read-link {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--brand-accent); display: inline-flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}

/* ============================================================
   GRILLA — 2 columnas
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ============================================================
   CARD DE ARTÍCULO
   ============================================================ */
.blog-card {
  display: flex; flex-direction: column;
  overflow: hidden; text-decoration: none; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-elevated);
}

.blog-card-img {
  height: 176px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.blog-card-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; flex: 1;
}

/* ============================================================
   ELEMENTOS COMPARTIDOS (badge, meta, avatar)
   ============================================================ */
.blog-cat-badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 9999px; white-space: nowrap;
  align-self: flex-start;
}

.blog-card-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; line-height: 1.3; color: var(--fg1);
  margin: 9px 0 7px; letter-spacing: -.01em;
  text-wrap: balance;
}
.blog-card-excerpt {
  font-family: var(--font-body); font-size: 13px;
  color: var(--fg3); line-height: 1.65; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.blog-post-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 16px; flex-wrap: wrap;
}
.blog-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 9px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.blog-meta-text { font-family: var(--font-body); font-size: 12px; color: var(--fg3); }
.blog-meta-dot  { color: var(--border-default); font-size: 11px; }

/* ============================================================
   ESTADO VACÍO
   ============================================================ */
.blog-empty {
  text-align: center; padding: 60px 0;
  font-family: var(--font-body); font-size: 15px; color: var(--fg3);
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.blog-cta-section { padding: 0 0 80px; background: #fff; }

.blog-cta-inner {
  background: linear-gradient(135deg, #0B1120 0%, #0F2060 55%, #1A3580 100%);
  border-radius: 20px; padding: 48px 52px;
  display: flex; align-items: center; gap: 36px;
  justify-content: space-between; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.blog-cta-glow {
  position: absolute; top: -80px; right: -60px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(75,117,255,.22) 0%, transparent 65%);
  pointer-events: none;
}

.blog-cta-h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(20px, 2.5vw, 28px); line-height: 1.2;
  color: #fff; margin: 0 0 10px; letter-spacing: -.02em;
  text-wrap: balance;
}
.blog-cta-desc {
  font-family: var(--font-body); font-size: 15px;
  color: rgba(255,255,255,.58); line-height: 1.6; margin: 0;
  max-width: 480px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Tablet ≤ 960px: sidebar en fila horizontal compacta */
@media (max-width: 960px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 20px 64px;
  }
  .blog-sidebar {
    position: static;
    padding: 12px;
  }
  .blog-sidebar-label { margin-bottom: 8px; }
  .blog-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .blog-sidebar nav .cat-item {
    width: auto;
    padding: 7px 12px;
  }
  .blog-feat-img       { min-height: 200px; }
  .blog-featured-card  { grid-template-columns: 1fr; }
  .blog-cta-inner      { padding: 36px 28px; }
}

/* Mobile ≤ 600px: grid de 1 columna */
@media (max-width: 600px) {
  .blog-hero         { padding: 64px 0 56px; }
  .blog-grid         { grid-template-columns: 1fr; }
  .blog-feat-content { padding: 24px 20px; }
  .blog-cta-inner    { flex-direction: column; text-align: center; }
  .blog-cta-inner > div:last-child { align-self: center; }
}
