/* ============================================================
   REDES — tarjetas con las últimas publicaciones de Instagram,
   TikTok y Threads. Patricia Alonso · patriciaalonso.es
   ============================================================ */

.redes-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 70px;
  color: #e9e4ff;
}

.redes-header {
  text-align: center;
  margin-bottom: 24px;
}

.redes-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  letter-spacing: 0.12em;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.6);
}

.redes-intro {
  margin: 0;
  color: #b9aee6;
  font-size: 1rem;
}

/* ---------- Botones de perfil ---------- */
.redes-perfiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.redes-perfil {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.55);
  background: rgba(30, 18, 60, 0.7);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.redes-perfil:hover {
  transform: translateY(-2px);
  background: rgba(168, 85, 247, 0.25);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
}

/* ---------- Filtros ---------- */
.redes-filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.redes-filtro {
  padding: 7px 16px;
  border-radius: 8px;
  color: #b9aee6;
  text-decoration: none;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.redes-filtro:hover { color: #fff; }

.redes-filtro.activo {
  color: #fff;
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
}

/* ---------- Rejilla de tarjetas ---------- */
.redes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.red-card {
  display: flex;
  flex-direction: column;
  background: rgba(22, 14, 46, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.red-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.3);
}

.red-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #120a28;
  overflow: hidden;
}

.red-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.red-card-sin-imagen {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #3b1a73, #12082b);
}

.red-card-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.red-card-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  flex: 1;
}

.red-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #b9aee6;
}

.red-card-red {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #fff;
}

.red-instagram .red-card-red i { color: #ff5fa2; }
.red-tiktok    .red-card-red i { color: #4df0ff; }
.red-threads   .red-card-red i { color: #ffffff; }

.red-card-texto {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e9e4ff;
  overflow-wrap: anywhere;
}

.red-card-enlace {
  margin-top: auto;
  font-size: 0.85rem;
  color: #c79bff;
  font-weight: 500;
}

.redes-vacio {
  text-align: center;
  color: #b9aee6;
  padding: 40px 10px;
}

/* ---------- Panel admin ---------- */
.redes-admin {
  margin-top: 50px;
  padding: 22px;
  border: 1px dashed rgba(168, 85, 247, 0.5);
  border-radius: 14px;
  background: rgba(20, 12, 42, 0.7);
}

.redes-admin h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #fff;
}

.redes-estado {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.redes-estado th,
.redes-estado td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  vertical-align: top;
}

.est-verde { color: #6ee7a8; }
.est-rojo  { color: #ff8aa0; overflow-wrap: anywhere; }
.est-gris  { color: #9a90c4; }

.redes-aviso {
  padding: 10px 14px;
  border-radius: 8px;
  margin: 0 0 14px;
  font-size: 0.9rem;
}
.redes-aviso.ok    { background: rgba(110, 231, 168, 0.12); color: #6ee7a8; }
.redes-aviso.error { background: rgba(255, 138, 160, 0.12); color: #ff8aa0; }

.redes-admin-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.redes-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: #a855f7;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.redes-btn:hover { background: #9333ea; }

.redes-btn-sec {
  background: transparent;
  border: 1px solid rgba(168, 85, 247, 0.7);
}

/* ---------- Móvil ---------- */
@media (max-width: 600px) {
  .redes-section { padding: 28px 14px 50px; }
  .redes-header h2 { font-size: 1.7rem; }
  .redes-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .red-card-cuerpo { padding: 10px 11px 12px; gap: 7px; }
  .red-card-texto { font-size: 0.82rem; }
  .red-card-enlace { font-size: 0.78rem; }
}

@media (max-width: 380px) {
  .redes-grid { grid-template-columns: 1fr; }
}