/**
 * HMB Social Networks v2 — Estética Metal
 */

/* ── Tokens ── */
.hmb-social {
  --icon-size: 48px;        /* default md — override con --icon-size en style="" */
  --glow-opacity: 0;
  --fire: #CC2200;
  --blood: #8B0000;
}

/* ── Título ── */
.hmb-social__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
}
.hmb-social__title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8B0000, transparent);
}
.hmb-social__title-text {
  font-family: 'Metal Mania', cursive;
  font-size: 16px;
  color: #EFEFEF;
  letter-spacing: 3px;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(204,34,0,.4);
}

/* ── Grid ── */
.hmb-social__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ── Item base — estética METAL ── */
.hmb-social__item {
  --brand: #CC2200;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width:  var(--icon-size);
  height: var(--icon-size);
  text-decoration: none;
  color: #777;
  /* Fondo metálico oscuro */
  background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 50%, #111 100%);
  /* Borde estilo forja */
  border: 1px solid #333;
  border-top-color: #444;
  border-bottom-color: #000;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  transition: color .3s, border-color .3s, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
  /* Efecto grabado */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    inset 0 -1px 0 rgba(0,0,0,.5),
    0 2px 4px rgba(0,0,0,.6);
}

/* Brillo superior metálico */
.hmb-social__item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Glow de color de marca */
.hmb-social__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--brand);
  opacity: 0;
  transition: opacity .3s;
  z-index: 0;
}

.hmb-social__item:hover::after { opacity: .12; }

.hmb-social__item:hover {
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 12px color-mix(in srgb, var(--brand) 50%, transparent),
    0 6px 20px rgba(0,0,0,.7);
}

.hmb-social__item:active {
  transform: translateY(-1px) scale(1.02);
}

/* ── Icono ── */
.hmb-social__icon-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hmb-social__svg {
  display: block;
  width:  calc(var(--icon-size) * 0.48);
  height: calc(var(--icon-size) * 0.48);
  transition: transform .3s, filter .3s;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.8));
}

.hmb-social__item:hover .hmb-social__svg {
  transform: scale(1.12);
  filter: drop-shadow(0 0 6px var(--brand));
}

/* ── Label ── */
.hmb-social__label {
  position: relative;
  z-index: 2;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ── TAMAÑOS predefinidos ── */
.hmb-social--sm { --icon-size: 36px; }
.hmb-social--md { --icon-size: 48px; }
.hmb-social--lg { --icon-size: 62px; }

/* ── LAYOUT con labels ── */
.hmb-social--labels .hmb-social__grid { flex-direction: column; gap: 5px; }
.hmb-social--labels .hmb-social__item { width: 100%; height: auto; padding: 9px 14px; border-radius: 3px; justify-content: flex-start; }

/* ── BARRA compacta ── */
.hmb-social--bar .hmb-social__grid { gap: 0; border: 1px solid #222; border-radius: 3px; overflow: hidden; }
.hmb-social--bar .hmb-social__item { border: none; border-radius: 0; border-right: 1px solid #222; flex: 1; min-width: var(--icon-size); }
.hmb-social--bar .hmb-social__item:last-child { border-right: none; }

/* ── Animación entrada ── */
.hmb-social--animated .hmb-social__item {
  animation: hmbSocialFadeIn .4s ease both;
}
.hmb-social--animated .hmb-social__item:nth-child(1)  { animation-delay: .05s; }
.hmb-social--animated .hmb-social__item:nth-child(2)  { animation-delay: .10s; }
.hmb-social--animated .hmb-social__item:nth-child(3)  { animation-delay: .15s; }
.hmb-social--animated .hmb-social__item:nth-child(4)  { animation-delay: .20s; }
.hmb-social--animated .hmb-social__item:nth-child(5)  { animation-delay: .25s; }
.hmb-social--animated .hmb-social__item:nth-child(6)  { animation-delay: .30s; }
.hmb-social--animated .hmb-social__item:nth-child(7)  { animation-delay: .35s; }
.hmb-social--animated .hmb-social__item:nth-child(8)  { animation-delay: .40s; }
.hmb-social--animated .hmb-social__item:nth-child(9)  { animation-delay: .45s; }
.hmb-social--animated .hmb-social__item:nth-child(10) { animation-delay: .50s; }
.hmb-social--animated .hmb-social__item:nth-child(11) { animation-delay: .55s; }

@keyframes hmbSocialFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Accesibilidad ── */
@media (prefers-reduced-motion: reduce) {
  .hmb-social--animated .hmb-social__item { animation: none; }
  .hmb-social__item { transition: none; }
}

.hmb-social__item:focus-visible {
  outline: 2px solid #CC2200;
  outline-offset: 3px;
}
