/* JDServer-Webs v6.4.0 — footer con degradado por máscara (var(--brand)),
   mail centrado, logos globales, stats y enlaces legales Apple-Aurora */

footer {
  position: relative;
  z-index: 0;
  background: var(--surface);
  border-top: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border));
  padding: 22px 0 26px;
}

/* Capa tintada con el color de la estación */
footer.jd-footer-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--brand);
  opacity: .16;
  -webkit-mask-image: linear-gradient(to top, black 0%, rgba(0,0,0,0) 78%);
          mask-image: linear-gradient(to top, black 0%, transparent 78%);
  pointer-events: none;
}

/* Contenido por encima */
footer .container {
  position: relative;
  z-index: 1;
  text-align: center;
  font: 500 13px/1.6 system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Texto */
footer .footer-text p {
  margin: 3px 0;
  color: var(--muted);
}

footer .footer-text b {
  color: var(--text);
  font-weight: 600;
}

/* Logos */
.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 14px auto 10px;
}

.footer-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: auto;
  height: auto;
}

.footer-logo,
.jdserver-logo,
.wikimeteo-logo {
  display: block;
  width: 104px;
  height: 104px;
  border-radius: 18px;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  object-fit: contain;
  overflow: visible;
  opacity: .98;
  box-shadow:
    0 8px 20px rgba(0,0,0,.10),
    0 2px 6px rgba(0,0,0,.06);
  transition:
    opacity .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.footer-logos a:hover .footer-logo,
.footer-logos a:hover .jdserver-logo,
.footer-logos a:hover .wikimeteo-logo {
  opacity: 1;
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 12px 26px rgba(0,0,0,.14),
    0 4px 10px rgba(0,0,0,.08);
}

/* Fila acciones mail + stats */
.footer-actions-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px auto 8px;
  flex-wrap: wrap;
}

/* Mail */
.mail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  opacity: .75;
  transition: opacity .2s ease, transform .2s ease;
}

.mail-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.mail-icon {
  width: 18px;
  height: 18px;
}

.mail-text {
  font-size: 12px;
}

/* Stats */
.footer-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: .9;
  color: var(--muted);
  transition: opacity .2s ease, transform .2s ease;
}

.footer-stats:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.footer-stats-icon {
  fill: currentColor;
}

/* Enlaces legales */
.footer-legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px auto 4px;
}

.footer-legal-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
  background: color-mix(in oklab, var(--card) 90%, var(--brand) 10%);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
  opacity: .96;
}

.footer-legal-links a:hover {
  transform: translateY(-1px);
  opacity: 1;
  border-color: color-mix(in srgb, var(--brand) 36%, var(--border));
  background: color-mix(in oklab, var(--card) 84%, var(--brand) 16%);
  box-shadow:
    0 6px 16px rgba(0,0,0,.08),
    0 0 0 1px color-mix(in oklab, var(--brand) 10%, transparent);
}

/* Firma */
.jd-love-signature {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 11px;
  opacity: 1;
  letter-spacing: 0.03em;
  user-select: none;
  position: relative;
}

/* CHIP J+A ♾️ */
.jd-love-mark {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--border));
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  position: relative;
  cursor: default;
}

/* TOOLTIP */
.jd-love-mark::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 170%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.82);
  color: var(--text);
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
  max-width: none;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 10;
}

.jd-love-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 158%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: color-mix(in srgb, var(--surface) 85%, #000 15%) transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.jd-love-mark:hover::after,
.jd-love-mark:hover::before {
  opacity: 1;
}

@media (max-width: 600px) {
  .footer-logo,
  .jdserver-logo,
  .wikimeteo-logo {
    width: 92px;
    height: 92px;
    border-radius: 16px;
  }

  .footer-logos {
    gap: 14px;
    margin: 10px auto 6px;
  }

  .footer-legal-links {
    gap: 6px;
    margin: 10px auto 2px;
  }

  .footer-legal-links a {
    font-size: 11px;
    padding: 5px 10px;
  }
}
