/* ==========================================================================
   GENIOS.TV - ÚLTIMAS PUBLICACIONES EN REDES (SOCIAL FEED HUB)
   Estilos unificados para Facebook, TikTok, YouTube e Instagram
   ========================================================================== */

.social-hub-section {
  padding: 2.5rem 0 3.5rem;
  background: #F8FAFF;
  position: relative;
}

/* Encabezado */
.social-hub-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-hub-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.social-hub-icon-neon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(123, 0, 255, 0.15), rgba(0, 229, 229, 0.15));
  border: 1px solid rgba(123, 0, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--brand-purple);
  box-shadow: 0 4px 14px rgba(123, 0, 255, 0.15);
  flex-shrink: 0;
}

.social-hub-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #240047;
  margin: 0;
  letter-spacing: -0.02em;
}

.social-hub-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

/* Barra de Botones / Filtros (Estilo Noticias Región) */
.social-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.social-btn {
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #e2e8f0);
  color: #240047;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(36, 0, 71, 0.04);
}

.social-btn i {
  font-size: 0.95rem;
  transition: transform 0.25s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 0, 71, 0.08);
}

.social-btn:hover i {
  transform: scale(1.15);
}

/* Estados Activos por Red Social */
.social-btn.active[data-network="todos"] {
  background: linear-gradient(110deg, #7B00FF, #00E5E5);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(123, 0, 255, 0.35);
}

.social-btn.active[data-network="facebook"],
.social-btn:hover[data-network="facebook"] {
  background: #1877F2;
  border-color: #1877F2;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.35);
}

.social-btn.active[data-network="tiktok"],
.social-btn:hover[data-network="tiktok"] {
  background: #000000;
  border-color: #fe2c55;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(254, 44, 85, 0.35);
}

.social-btn.active[data-network="youtube"],
.social-btn:hover[data-network="youtube"] {
  background: #FF0000;
  border-color: #FF0000;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(255, 0, 0, 0.35);
}

.social-btn.active[data-network="instagram"],
.social-btn:hover[data-network="instagram"] {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(225, 48, 108, 0.35);
}

/* Grid de Publicaciones */
.social-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  width: 100%;
}

/* Tarjeta Multimedia */
.social-hub-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 16px rgba(36, 0, 71, 0.05);
  position: relative;
  cursor: pointer;
}

.social-hub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(36, 0, 71, 0.12);
}

.social-hub-card[data-network="facebook"]:hover {
  border-color: rgba(24, 119, 242, 0.4);
}

.social-hub-card[data-network="tiktok"]:hover {
  border-color: rgba(254, 44, 85, 0.4);
}

.social-hub-card[data-network="youtube"]:hover {
  border-color: rgba(255, 0, 0, 0.4);
}

.social-hub-card[data-network="instagram"]:hover {
  border-color: rgba(225, 48, 108, 0.4);
}

/* Portada / Media */
.social-hub-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f0d1b;
}

/* Ajuste vertical para TikTok en su pestaña individual */
.social-hub-card.card-tiktok-tall .social-hub-media {
  aspect-ratio: 9 / 12;
}

.social-hub-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.social-hub-card:hover .social-hub-img {
  transform: scale(1.05);
}

/* Badge de Plataforma Flotante */
.social-hub-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 0.70rem;
  font-weight: 800;
  color: #FFFFFF;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.social-hub-badge.facebook {
  background: rgba(24, 119, 242, 0.9);
}

.social-hub-badge.tiktok {
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(254, 44, 85, 0.6);
}

.social-hub-badge.youtube {
  background: rgba(255, 0, 0, 0.9);
}

.social-hub-badge.instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

/* Play Icon Overlay para videos */
.social-hub-play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
}

.social-hub-card:hover .social-hub-play-icon {
  transform: scale(1.15);
  background: rgba(254, 44, 85, 0.9);
  border-color: #FFFFFF;
}

/* Duración / Stats Overlay */
.social-hub-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  z-index: 2;
}

/* Cuerpo de la Tarjeta */
.social-hub-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  background: #FFFFFF;
}

.social-hub-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-dim, #94a3b8);
}

.social-hub-handle {
  font-weight: 700;
  color: var(--brand-purple, #7B00FF);
}

.social-hub-caption {
  font-size: 0.83rem;
  color: #1e293b;
  line-height: 1.45;
  margin: 0 0 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}

/* Pie de Tarjeta / Interacciones */
.social-hub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

.social-hub-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-hub-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.social-hub-action-link {
  color: var(--brand-purple, #7B00FF);
  font-weight: 700;
  font-size: 0.75rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-hub-card:hover .social-hub-action-link {
  transform: translateX(3px);
  color: #00E5E5;
}

/* Estado Vacío */
.social-hub-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1rem;
  background: #FFFFFF;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: var(--text-muted, #64748b);
}

.social-hub-empty i {
  font-size: 2.5rem;
  opacity: 0.35;
  margin-bottom: 0.75rem;
  display: block;
}

/* Modal Lightbox Unificado */
.social-hub-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.social-hub-modal-overlay.is-active {
  display: flex;
  opacity: 1;
}

.social-hub-modal-box {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  display: flex;
  flex-direction: column;
}

.social-hub-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 10;
  transition: transform 0.2s, background 0.2s;
}

.social-hub-modal-close:hover {
  transform: rotate(90deg);
  background: #fe2c55;
}

/* Responsive */
@media (max-width: 1080px) {
  .social-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .social-nav-bar {
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }
  .social-btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.95rem;
  }
  .social-hub-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .social-hub-title {
    font-size: 1.25rem;
  }
}

