/* =====================================================================
   redes.css -- bloque «Seguinos / Comunidad» (redes_html() en comun.php).
   Dos variantes: .tdp-redes--pie (pie de todas las páginas, compacto) y
   .tdp-redes--portada (sección de la landing). Primero celular: blancos de
   toque de 48 px, sin hover obligatorio. Íconos en el color de cada marca
   sobre el vidrio oscuro del sitio; el hover enciende el color de la red.
   ===================================================================== */

.tdp-redes-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.tdp-redes {
  --r-oro: var(--c-oro, #d8a24a);
  --r-oro-claro: var(--c-oro-claro, #f0c877);
  --r-texto: var(--c-hueso, #e9e6df);
  --r-tenue: var(--c-gris-calido, #9a978f);
  --r-vidrio: rgba(17, 17, 25, .72);
  --r-borde: rgba(216, 162, 74, .22);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin: 0 auto; max-width: 980px;
}

/* Color de cada marca (Simple Icons). TikTok es negro: sobre fondo oscuro va
   blanco con su doble sombra cian/rosa, como su logo. */
.tdp-redes [data-red="discord"]   { --r-marca: #5865F2; }
.tdp-redes [data-red="youtube"]   { --r-marca: #FF0000; }
.tdp-redes [data-red="tiktok"]    { --r-marca: #25F4EE; }
.tdp-redes [data-red="facebook"],
.tdp-redes [data-red="grupo"]     { --r-marca: #0866FF; }

.tdp-red-ico { width: 24px; height: 24px; flex: none; fill: var(--r-marca); transition: transform .2s ease, filter .2s ease; }
.tdp-redes [data-red="tiktok"] .tdp-red-ico { fill: #fff; filter: drop-shadow(-1px -1px 0 #25F4EE) drop-shadow(1px 1px 0 #FE2C55); }

/* ---------- Discord destacado ---------- */
.tdp-red-dc {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 440px; min-height: 52px; padding: 10px 16px;
  border-radius: 14px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #5865F2, #4752c4);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 6px 22px rgba(88, 101, 242, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tdp-red-dc .tdp-red-ico { fill: #fff; width: 28px; height: 28px; }
.tdp-red-dc-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.25; flex: 1; }
.tdp-red-dc-txt strong { font-size: 1rem; font-weight: 700; }
.tdp-redes .tdp-red-dc-txt small { font-size: .82rem; color: rgba(255, 255, 255, .9); }
.tdp-redes .tdp-red-dc-txt strong, .tdp-redes .tdp-red-txt strong { color: inherit; }
.tdp-red-dc-ir { font-size: 1.2rem; transition: transform .2s ease; }

/* ---------- Las demás ---------- */
.tdp-redes-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tdp-red {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 48px; min-height: 48px; padding: 0 12px; border-radius: 12px;
  text-decoration: none; color: var(--r-texto);
  background: var(--r-vidrio); border: 1px solid var(--r-borde);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.tdp-red-marca {
  position: absolute; right: -6px; bottom: -8px; padding: 0 6px; border-radius: 6px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1.5;
  color: #fff; background: #0866FF; border: 1px solid rgba(0, 0, 0, .4);
}

/* Foco visible (teclado) siempre; hover solo con puntero fino. */
.tdp-red-dc:focus-visible, .tdp-red:focus-visible { outline: 2px solid var(--r-oro-claro); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .tdp-red:hover { border-color: var(--r-marca); box-shadow: 0 0 0 1px var(--r-marca), 0 6px 20px color-mix(in srgb, var(--r-marca) 35%, transparent); background: rgba(17, 17, 25, .9); }
  .tdp-red:hover .tdp-red-ico { transform: scale(1.12); }
  .tdp-red-dc:hover { box-shadow: 0 8px 28px rgba(88, 101, 242, .45); }
  .tdp-red-dc:hover .tdp-red-dc-ir { transform: translateX(4px); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .tdp-red:hover, .tdp-red-dc:hover { transform: translateY(-2px); }
}
.tdp-red:active, .tdp-red-dc:active { transform: scale(.98); }

/* ---------- Pie ---------- */
footer .tdp-redes--pie { margin-bottom: 16px; }
footer .tdp-redes a, footer .tdp-redes a:hover { text-decoration: none; }
footer .tdp-red-dc { color: #fff; }

/* ---------- Portada ---------- */
.tdp-redes-seccion .tdp-redes-titulo { text-align: center; }
.tdp-redes-seccion .lede { text-align: center; margin-left: auto; margin-right: auto; max-width: 620px; }
.tdp-redes--portada { gap: 18px; }
.tdp-redes--portada .tdp-red-dc { max-width: 560px; min-height: 64px; padding: 14px 20px; }
.tdp-redes--portada .tdp-red-dc .tdp-red-ico { width: 34px; height: 34px; }
.tdp-redes--portada .tdp-red-dc-txt strong { font-size: 1.15rem; }
.tdp-redes--portada .tdp-redes-lista {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 560px;
}
.tdp-redes--portada .tdp-red { justify-content: flex-start; padding: 10px 12px; min-height: 60px; }
.tdp-redes--portada .tdp-red .tdp-red-ico { width: 28px; height: 28px; }
.tdp-red-txt { display: flex; flex-direction: column; min-width: 0; text-align: left; line-height: 1.25; }
.tdp-red-txt strong { font-size: .92rem; font-weight: 600; }
.tdp-red-txt small { font-size: .76rem; color: var(--r-tenue); }
.tdp-redes--portada .tdp-red-txt strong { color: var(--r-texto); }

@media (min-width: 720px) {
  .tdp-redes--portada .tdp-redes-lista { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 980px; }
  .tdp-redes--portada .tdp-red { flex-direction: column; justify-content: center; text-align: center; padding: 16px 10px; min-height: 120px; }
  .tdp-redes--portada .tdp-red-txt { text-align: center; align-items: center; }
  .tdp-redes--portada .tdp-red .tdp-red-ico { width: 34px; height: 34px; }
}
