/* ============================================
   BLOG.CSS - Estilos para blog.php
   OscaChip Informática - Blog de Pichy
   ============================================ */

/* ============================================
   HERO DEL BLOG
   ============================================ */

.blog-hero {
  background: #FFFFFF;
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pichy-hero-img {
  max-width: 300px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
}

.blog-hero .lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(51, 65, 85, 0.9);
}

/* ============================================
   CATEGORÍAS/FILTROS
   ============================================ */

.blog-categories {
  background: #FFFFFF;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-category {
  background: #F1F5F9;
  color: #334155;
  border: 2px solid transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-category:hover {
  background: #E2E8F0;
  color: #1E293B;
}

.btn-category.active {
  background: #0F766E;
  color: #FFFFFF;
  border-color: #0F766E;
}

/* ============================================
   TARJETAS DE ARTÍCULOS
   ============================================ */

.blog-articles {
  margin-bottom: 3rem;
}

.blog-card {
  background: #FFFFFF;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.2);
  border-color: #0F766E;
}

.blog-card.coming-soon {
  position: relative;
}

.blog-card.coming-soon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 1;
}

/* Header de la tarjeta (imagen) */
.blog-card-header {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.badge-coming-soon {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  color: #FFFFFF;
}

.badge-new {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
}

/* Body de la tarjeta */
.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: #64748B;
}

.blog-category {
  color: #0F766E;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.blog-date {
  color: #64748B;
}

.blog-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--osc-text-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-excerpt {
  color: rgba(51, 65, 85, 0.8);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: auto;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(51, 65, 85, 0.7);
  font-weight: 500;
}

.blog-author-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.blog-reading-time {
  font-size: 0.8rem;
  color: rgba(51, 65, 85, 0.5);
}

/* ============================================
   NEWSLETTER CTA
   ============================================ */

.blog-newsletter {
  margin-top: 4rem;
  margin-bottom: 3rem;
}

.newsletter-box {
  background: linear-gradient(135deg,
      rgba(45, 212, 191, 0.04) 0%,
      rgba(94, 234, 212, 0.06) 100%);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(45, 212, 191, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.newsletter-box h3 {
  color: var(--osc-text-dark);
}

.newsletter-box p {
  color: rgba(51, 65, 85, 0.9);
  line-height: 1.7;
}

/* ============================================
   MENSAJE "PRÓXIMAMENTE"
   ============================================ */

.blog-coming-soon-message {
  margin-top: 3rem;
}

.coming-soon-box {
  background: #FFFFFF;
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px dashed rgba(45, 212, 191, 0.3);
}

.coming-soon-pichy {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.1));
}

.coming-soon-box h3 {
  color: var(--osc-text-dark);
}

.coming-soon-box p {
  color: rgba(51, 65, 85, 0.9);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
  .blog-hero {
    padding: 2rem 1.5rem;
  }

  .pichy-hero-img {
    max-width: 200px;
    margin-bottom: 1.5rem;
  }

  .blog-categories {
    padding: 1rem;
  }

  .btn-category {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
  }
}

@media (max-width: 576px) {
  .blog-hero {
    padding: 1.5rem 1rem;
    border-radius: 1rem;
  }

  .blog-title {
    font-size: 1.1rem;
  }

  .blog-card-body {
    padding: 1rem;
  }

  .blog-categories {
    padding: 1rem;
  }

  .btn-category {
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
  }

  .newsletter-box {
    padding: 2rem 1.5rem;
    border-radius: 1rem;
  }

  .coming-soon-box {
    padding: 2rem 1.5rem;
    border-radius: 1rem;
  }

  .coming-soon-pichy {
    width: 120px;
    height: 120px;
  }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(2) {
  animation-delay: 0.1s;
}

.blog-card:nth-child(3) {
  animation-delay: 0.2s;
}

.blog-card:nth-child(4) {
  animation-delay: 0.3s;
}

.blog-card:nth-child(5) {
  animation-delay: 0.4s;
}

.blog-card:nth-child(6) {
  animation-delay: 0.5s;
}

.badge-new {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
}

/* Badge Nuevo (verde) */
.badge-new {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
}

/* Enlace de tarjeta blog */
.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.blog-card-link:hover {
  color: inherit;
}

.blog-card-link .blog-card {
  transition: transform 0.3s ease;
}

.blog-card-link:hover .blog-card {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(45, 212, 191, 0.25);
}

/* ============================================
   BLOG 2.0 - AFILIACIÓN Y GUÍAS
   ============================================ */

/* Tabla de Contenidos (TOC) */
.toc-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.75rem;
}

.toc-list a {
  color: #0F766E;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: #0D9488;
  text-decoration: underline;
}

/* Tablas de Errores (Responsive) */
.table-responsive {
  overflow-x: auto;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.error-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
}

.error-table th {
  background: #0F766E;
  color: #fff;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.error-table td {
  padding: 1rem;
  border-bottom: 1px solid #E2E8F0;
  color: #334155;
}

.error-table tr:last-child td {
  border-bottom: none;
}

.error-table tr:nth-child(even) {
  background: #F8FAFC;
}

/* Cajas de Afiliados (Amazon Style) */
.affiliate-box {
  background: #fff;
  border: 2px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 2rem;
  align-items: center;
  transition: transform 0.3s ease;
}

.affiliate-box:hover {
  border-color: #F59E0B;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
  transform: translateY(-2px);
}

.affiliate-img-wrapper {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.affiliate-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.affiliate-content {
  flex-grow: 1;
}

.affiliate-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.affiliate-desc {
  font-size: 0.9rem;
  color: #64748B;
  margin-bottom: 1rem;
}

.affiliate-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-amazon {
  background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
  border: 1px solid #a88734;
  color: #111;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.btn-amazon:hover {
  background: linear-gradient(to bottom, #f5d78e, #eeb933);
  transform: scale(1.02);
  color: #111;
}

@media (max-width: 768px) {
  .affiliate-box {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }

  .affiliate-price-row {
    justify-content: center;
  }
}
/* ============================================
   BLOG REDESIGN OVERRIDES
   ============================================ */

.blog-hero {
  background: linear-gradient(135deg, rgba(16, 182, 166, 0.08), rgba(244, 178, 71, 0.08));
  border: 1px solid rgba(16, 182, 166, 0.12);
  box-shadow: 0 16px 32px rgba(8, 16, 18, 0.08);
}

.btn-category.active {
  background: var(--osc-accent);
  border-color: var(--osc-accent);
}

.blog-card:hover {
  box-shadow: 0 18px 40px rgba(12, 127, 116, 0.2);
  border-color: var(--osc-accent);
}

.blog-category {
  color: var(--osc-accent);
}

.blog-card-link:hover .blog-card {
  box-shadow: 0 18px 40px rgba(12, 127, 116, 0.25);
}