/* =============================================
   BezalelWeb – blog.css
   Estilos para blog.html y artículos individuales
   ============================================= */

/* =============================================
   BLOG PREVIEW (index.html)
   ============================================= */
.blog-preview { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 48px rgba(79,142,247,.15);
}

/* Imagen de la tarjeta */
.blog-card-img-link { display: block; overflow: hidden; }

.blog-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-card2);
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .45s ease;
}

.blog-card-img-link:hover .blog-card-img img {
  transform: scale(1.05);
}

/* Colores de fondo por artículo */
.blog-card-img--1 { background: linear-gradient(135deg, #0f2044 0%, #1a3a6e 50%, #0f0f1a 100%); }
.blog-card-img--2 { background: linear-gradient(135deg, #0f3020 0%, #1a5c38 50%, #0f0f1a 100%); }
.blog-card-img--3 { background: linear-gradient(135deg, #2a0f44 0%, #5c1a6e 50%, #0f0f1a 100%); }
.blog-card-img--4 { background: linear-gradient(135deg, #2a1a0f 0%, #6e3c1a 50%, #0f0f1a 100%); }
.blog-card-img--5 { background: linear-gradient(135deg, #0f2a3a 0%, #1a5c6e 50%, #0f0f1a 100%); }
.blog-card-img--6 { background: linear-gradient(135deg, #3a0f2a 0%, #6e1a5c 50%, #0f0f1a 100%); }

/* Imágenes reales por artículo */
.blog-card-img--1 { background-image: url('../img/blog/blog-marketing-digital.webp'); }
.blog-card-img--2 { background-image: url('../img/blog/blog-seo.webp'); }
.blog-card-img--3 { background-image: url('../img/blog/blog-redes-sociales.webp'); }
.blog-card-img--4 { background-image: url('../img/blog/blog-pagina-web.webp'); }
.blog-card-img--5 { background-image: url('../img/blog/blog-email-marketing.webp'); }
.blog-card-img--6 { background-image: url('../img/blog/blog-contenido.webp'); }

/* Eliminamos los íconos emoji ahora que hay imágenes reales */
.blog-card-img--1::after,
.blog-card-img--2::after,
.blog-card-img--3::after,
.blog-card-img--4::after,
.blog-card-img--5::after,
.blog-card-img--6::after { content: none; }

/* Body de la tarjeta */
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  background: rgba(79,142,247,.1);
  padding: 3px 10px;
  border-radius: 20px;
}

.blog-date {
  font-size: .78rem;
  color: var(--text-muted);
}

.blog-card h3, .blog-card h2 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.blog-card h3 a, .blog-card h2 a {
  color: var(--text);
  transition: color .3s ease;
}

.blog-card h3 a:hover, .blog-card h2 a:hover { color: var(--accent); }

.blog-card > .blog-card-body > p,
.blog-card-body > p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  transition: color .3s ease;
  margin-top: auto;
}

.blog-read-more svg { display: none; }

.blog-read-more:hover { color: var(--accent-2); }

/* CTA debajo del grid en index */
.blog-preview-cta {
  text-align: center;
  margin-top: 48px;
}

/* =============================================
   BLOG PAGE (blog.html)
   ============================================= */
.blog-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, #0f0f1a 0%, #16162a 100%);
  border-bottom: 1px solid var(--border);
  padding-top: 80px;
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(79,142,247,.12) 0%, transparent 70%);
}

.blog-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 0;
}

.blog-hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin: 12px 0 16px;
}

.blog-hero-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.blog-page { background: var(--bg); }

.blog-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* =============================================
   ARTÍCULO INDIVIDUAL
   ============================================= */

/* Hero del artículo */
.article-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  position: relative;
  padding-top: 80px;
}

.article-hero--1 { background: url('../img/blog/blog-marketing-digital.webp') center center / cover no-repeat; }
.article-hero--2 { background: url('../img/blog/blog-seo.webp') center center / cover no-repeat; }
.article-hero--3 { background: url('../img/blog/blog-redes-sociales.webp') center center / cover no-repeat; }
.article-hero--4 { background: url('../img/blog/blog-pagina-web.webp') center center / cover no-repeat; }
.article-hero--5 { background: url('../img/blog/blog-email-marketing.webp') center center / cover no-repeat; }
.article-hero--6 { background: url('../img/blog/blog-contenido.webp') center center / cover no-repeat; }

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,22,.95) 0%, rgba(10,10,22,.5) 60%, transparent 100%);
}

.article-hero-content {
  position: relative;
  z-index: 1;
  padding: 48px 0;
  max-width: 800px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color .3s ease;
}
.article-back:hover { color: var(--accent); }

.article-hero-content .blog-tag {
  display: inline-block;
  margin-bottom: 16px;
}

.article-hero-content h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* Layout artículo: contenido + sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 80px;
}

/* Contenido del artículo */
.article-content {
  min-width: 0;
}

.article-lead {
  font-size: 1.12rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 36px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text);
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--accent);
}

.article-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 18px;
  font-size: .97rem;
}

.article-content ul,
.article-content ol {
  padding-left: 0;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-content ul li,
.article-content ol li {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.65;
  padding-left: 24px;
  position: relative;
  list-style: none;
}

.article-content ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.article-content ol {
  counter-reset: item;
}

.article-content ol li {
  counter-increment: item;
}

.article-content ol li::before {
  content: counter(item);
  position: absolute;
  left: 0; top: 2px;
  width: 18px; height: 18px;
  background: rgba(79,142,247,.2);
  color: var(--accent);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-content strong { color: var(--text); font-weight: 700; }

/* CTA dentro del artículo */
.article-cta {
  background: linear-gradient(135deg, rgba(79,142,247,.1), rgba(123,94,248,.1));
  border: 1px solid rgba(79,142,247,.25);
  border-radius: var(--radius);
  padding: 36px;
  margin-top: 48px;
  text-align: center;
}

.article-cta h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text) !important;
}

.article-cta p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.sidebar-widget h4 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-posts li { list-style: none; padding: 0; }
.sidebar-posts li::before { display: none; }

.sidebar-posts a {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
  transition: color .3s ease;
}

.sidebar-posts a:hover { color: var(--accent); }

.sidebar-cta {
  background: linear-gradient(135deg, rgba(79,142,247,.1), rgba(123,94,248,.1));
  border-color: rgba(79,142,247,.25);
  text-align: center;
}

.sidebar-cta p {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .article-sidebar { position: static; }
}

@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid--full { grid-template-columns: 1fr; }
  .article-hero-content h1 { font-size: 1.6rem; }
  .article-cta { padding: 24px; }
}
