/* =====================================================
   FOOTER PREMIUM
   Ricardo Lozano Child / GeneratePress
   Archivo: assets/css/02-footer.css
   ===================================================== */

.site-footer,
.site-info,
.footer-widgets {
  background: #ffffff !important;
}

.site-footer {
  position: relative !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(219, 228, 238, .82) !important;
}

.site-footer::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;

  background:
    radial-gradient(circle at 14% 18%, rgba(47,98,255,.055), transparent 34%),
    radial-gradient(circle at 74% 22%, rgba(16,185,129,.040), transparent 36%),
    radial-gradient(circle at 92% 16%, rgba(242,99,238,.035), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;

  pointer-events: none !important;
  z-index: 0 !important;
}

.site-footer > *,
.site-info,
.inside-site-info {
  position: relative !important;
  z-index: 1 !important;
}

.footer-widgets-container,
.inside-site-info {
  width: min(calc(100vw - 96px), 1280px) !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.site-info {
  padding: 0 !important;
}

.inside-site-info {
  min-height: 96px !important;
  padding: 28px 0 !important;

  border-top: 1px solid rgba(219, 228, 238, .86) !important;

  color: #94a3b8 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
}

.inside-site-info a {
  color: #64748b !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

.inside-site-info a:hover {
  color: #2f62ff !important;
}

/* Widgets del footer si los usas */
.footer-widgets {
  padding: 92px 0 56px !important;
}

.footer-widgets-container {
  padding: 0 !important;
}

.footer-widgets .inside-footer-widgets {
  display: grid !important;
  grid-template-columns: minmax(320px, 1.4fr) minmax(180px, .55fr) minmax(220px, .65fr) !important;
  gap: clamp(48px, 8vw, 120px) !important;
  align-items: start !important;
}

.footer-widget-1,
.footer-widget-2,
.footer-widget-3 {
  margin: 0 !important;
}

.footer-widgets h2,
.footer-widgets h3,
.footer-widgets .widget-title {
  margin: 0 0 24px 0 !important;
  color: #071126 !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.footer-widgets p,
.footer-widgets li,
.footer-widgets a {
  color: #64748b !important;
  font-size: 17px !important;
  line-height: 1.65 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.footer-widgets a:hover {
  color: #2f62ff !important;
}

.footer-widgets ul {
  display: grid !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Marca del footer si usas texto Ricardo Lozano */
.footer-widgets .widget:first-child h2,
.footer-widgets .widget:first-child h3,
.footer-widgets .widget:first-child .widget-title {
  position: relative !important;
  padding-left: 32px !important;

  color: #071126 !important;
  font-size: 28px !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.footer-widgets .widget:first-child h2::before,
.footer-widgets .widget:first-child h3::before,
.footer-widgets .widget:first-child .widget-title::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;

  width: 20px !important;
  height: 40px !important;
  border-radius: 8px !important;

  background: linear-gradient(180deg, #2f62ff 0%, #2454df 100%) !important;

  box-shadow:
    0 12px 26px rgba(47,98,255,.22),
    inset 0 1px 0 rgba(255,255,255,.26) !important;
}

/* Chip disponibilidad */
.footer-widgets .rl-footer-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;

  margin-top: 26px !important;
  padding: 10px 18px !important;

  border-radius: 999px !important;
  border: 1.25px solid transparent !important;

  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(247,251,255,.86)) padding-box,
    linear-gradient(100deg, #2f62ff, #10b981, #f263ee) border-box !important;

  color: #2454df !important;
  font-size: 15px !important;
  font-weight: 850 !important;

  box-shadow:
    0 12px 28px rgba(47,98,255,.08),
    inset 0 1px 0 rgba(255,255,255,.96) !important;
}

.footer-widgets .rl-footer-pill::before {
  content: "" !important;
  width: 9px !important;
  height: 9px !important;
  border-radius: 999px !important;
  background: #3f73ff !important;
  box-shadow: 0 0 0 5px rgba(47,98,255,.12) !important;
}

/* Movil */
@media (max-width: 767px) {
  .footer-widgets-container,
  .inside-site-info {
    width: calc(100vw - 48px) !important;
  }

  .footer-widgets {
    padding: 72px 0 42px !important;
  }

  .footer-widgets .inside-footer-widgets {
    grid-template-columns: 1fr !important;
    gap: 42px !important;
  }

  .inside-site-info {
    min-height: 0 !important;
    padding: 24px 0 34px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    font-size: 13.5px !important;
  }
}

/* =====================================================
   FOOTER - UN SOLO WIDGET CON HTML PREMIUM
   ===================================================== */

.footer-widgets .inside-footer-widgets {
  display: block !important;
}

.footer-widgets .widget,
.footer-widgets .widget_custom_html,
.footer-widgets .textwidget,
.footer-widgets .custom-html-widget {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.rl-footer-premium {
  display: grid !important;
  grid-template-columns: minmax(320px, 1.4fr) minmax(160px, .5fr) minmax(230px, .7fr) !important;
  gap: clamp(48px, 8vw, 120px) !important;
  align-items: start !important;

  width: min(calc(100vw - 96px), 1280px) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
}

.rl-footer-brand h2 {
  position: relative !important;
  margin: 0 0 28px 0 !important;
  padding-left: 32px !important;

  color: #071126 !important;
  font-size: 30px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
}

.rl-footer-brand h2::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;

  width: 20px !important;
  height: 40px !important;
  border-radius: 8px !important;

  background: linear-gradient(180deg, #2f62ff 0%, #2454df 100%) !important;
}

.rl-footer-brand p {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 17px !important;
  line-height: 1.65 !important;
}

.rl-footer-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;

  margin-top: 28px !important;
  padding: 10px 18px !important;

  border-radius: 999px !important;
  border: 1.25px solid transparent !important;

  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(247,251,255,.86)) padding-box,
    linear-gradient(100deg, #2f62ff, #10b981, #f263ee) border-box !important;

  color: #2454df !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

.rl-footer-pill::before {
  content: "" !important;
  width: 9px !important;
  height: 9px !important;
  border-radius: 999px !important;
  background: #3f73ff !important;
}

.rl-footer-col {
  display: grid !important;
  gap: 16px !important;
}

.rl-footer-col h3 {
  margin: 0 0 12px 0 !important;

  color: #071126 !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.rl-footer-col a {
  color: #64748b !important;
  font-size: 17px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.rl-footer-col a:hover {
  color: #2f62ff !important;
}

.rl-footer-bottom {
  grid-column: 1 / -1 !important;

  display: flex !important;
  justify-content: space-between !important;
  gap: 24px !important;

  margin-top: 56px !important;
  padding-top: 32px !important;

  border-top: 1px solid rgba(219, 228, 238, .86) !important;
}

.rl-footer-bottom p {
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* Movil */
@media (max-width: 767px) {
  .rl-footer-premium {
    grid-template-columns: 1fr !important;
    width: calc(100vw - 48px) !important;
    gap: 42px !important;
  }

  .rl-footer-bottom {
    margin-top: 12px !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
}

/* Oculta el pie de pagina nativo inferior de GeneratePress */
.site-info {
  display: none !important;
}

.generate-back-to-top {
  display: none !important;
}

/* =====================================================
   FOOTER - COPYRIGHT CENTRADO Y SIN FRASE FINAL
   ===================================================== */

html body .rl-footer-premium .rl-footer-bottom {
  justify-content: center !important;
  text-align: center !important;
}

html body .rl-footer-premium .rl-footer-bottom p:nth-child(2) {
  display: none !important;
}

html body .rl-footer-premium .rl-footer-bottom p:first-child {
  width: 100% !important;
  margin: 0 auto !important;
  text-align: center !important;
}

/* =====================================================
   FOOTER - TABLET RESPONSIVE FIX
   Evita corte en columna Clases
   ===================================================== */

@media (min-width: 1025px) and (max-width: 1180px) {
  html body .rl-footer-premium {
    width: calc(100vw - 72px) !important;
    grid-template-columns: minmax(260px, 1.1fr) minmax(130px, .48fr) minmax(210px, .72fr) !important;
    gap: 44px !important;
  }

  html body .rl-footer-col,
  html body .rl-footer-brand {
    min-width: 0 !important;
  }

  html body .rl-footer-col a {
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  html body .footer-widgets-container {
    width: calc(100vw - 64px) !important;
    max-width: 860px !important;
  }

  html body .rl-footer-premium {
    width: 100% !important;
    max-width: 860px !important;

    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 42px 52px !important;
  }

  html body .rl-footer-brand {
    grid-column: 1 / -1 !important;
    max-width: 620px !important;
  }

  html body .rl-footer-col {
    min-width: 0 !important;
  }

  html body .rl-footer-col h3 {
    margin-bottom: 14px !important;
  }

  html body .rl-footer-col a {
    display: block !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    font-size: 16.5px !important;
    line-height: 1.45 !important;
  }

  html body .rl-footer-bottom {
    grid-column: 1 / -1 !important;
    margin-top: 22px !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* =====================================================
   BOTON VOLVER ARRIBA - PREMIUM
   Recupera el boton nativo de GeneratePress
   ===================================================== */

.generate-back-to-top,
.generate-back-to-top:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  position: fixed !important;
  right: clamp(18px, 2vw, 28px) !important;
  bottom: calc(22px + env(safe-area-inset-bottom)) !important;

  width: 52px !important;
  height: 52px !important;

  border-radius: 18px !important;
  border: 1.25px solid rgba(147, 197, 253, .42) !important;

  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.28), transparent 36%),
    linear-gradient(145deg, #4f7cff 0%, #2f62ff 62%, #2454df 100%) !important;

  box-shadow:
    0 18px 38px rgba(47,98,255,.22),
    0 8px 18px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.24) !important;

  color: #ffffff !important;
  font-size: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;

  z-index: 99999 !important;

  transform: translateY(0) !important;
  transition:
    transform .22s cubic-bezier(.2,.8,.2,1),
    box-shadow .22s cubic-bezier(.2,.8,.2,1),
    border-color .22s cubic-bezier(.2,.8,.2,1) !important;
}

.generate-back-to-top::before {
  content: "\2191" !important;
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #ffffff !important;
}

.generate-back-to-top:hover,
.generate-back-to-top:focus,
.generate-back-to-top:active {
  transform: translateY(-3px) !important;
  border-color: rgba(191, 219, 254, .72) !important;

  box-shadow:
    0 24px 48px rgba(47,98,255,.28),
    0 10px 22px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.30) !important;
}

@media (max-width: 767px) {
  .generate-back-to-top,
  .generate-back-to-top:visited {
    width: 48px !important;
    height: 48px !important;
    right: 18px !important;
    bottom: calc(18px + env(safe-area-inset-bottom)) !important;
    border-radius: 16px !important;
  }

  .generate-back-to-top::before {
    font-size: 22px !important;
  }
}

/* =====================================================
   FIX BOTON VOLVER ARRIBA - SIN TROMPICONES
   ===================================================== */

html.rl-fast-scroll-top,
html.rl-fast-scroll-top body {
  scroll-behavior: auto !important;
}

.generate-back-to-top {
  touch-action: manipulation !important;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* =====================================================
   FOOTER - ENLACES LEGALES
   ===================================================== */

html body .rl-footer-premium .rl-footer-bottom {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;

  text-align: center !important;
}

html body .rl-footer-premium .rl-footer-bottom p {
  width: 100% !important;
  margin: 0 auto !important;
  text-align: center !important;
}

html body .rl-footer-premium .rl-footer-legal {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px 20px !important;

  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
}

html body .rl-footer-premium .rl-footer-legal a {
  color: #94a3b8 !important;
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  text-decoration: none !important;

  transition:
    color .2s ease,
    transform .2s ease !important;
}

html body .rl-footer-premium .rl-footer-legal a:hover,
html body .rl-footer-premium .rl-footer-legal a:focus {
  color: #4f7cff !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 767px) {
  html body .rl-footer-premium .rl-footer-legal {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    text-align: left !important;
  }

  html body .rl-footer-premium .rl-footer-bottom {
    align-items: flex-start !important;
    text-align: left !important;
  }

  html body .rl-footer-premium .rl-footer-bottom p {
    text-align: left !important;
  }
}

/* Footer 4 columnas con legal separado */
html body .rl-footer-premium {
  grid-template-columns:
    minmax(280px, 1.18fr)
    minmax(140px, .46fr)
    minmax(220px, .68fr)
    minmax(230px, .68fr) !important;

  gap: clamp(42px, 5.8vw, 86px) !important;
}

html body .rl-footer-legal-col a {
  color: #64748b !important;
}

html body .rl-footer-legal-col a:hover {
  color: #4f7cff !important;
}

html body .rl-footer-premium .rl-footer-bottom {
  grid-column: 1 / -1 !important;
  justify-content: center !important;
  text-align: center !important;
}

html body .rl-footer-premium .rl-footer-bottom p {
  width: 100% !important;
  margin: 0 auto !important;
  text-align: center !important;
}

@media (min-width: 768px) and (max-width: 1120px) {
  html body .rl-footer-premium {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 48px 64px !important;
  }

  html body .rl-footer-brand {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 767px) {
  html body .rl-footer-premium {
    grid-template-columns: 1fr !important;
    gap: 38px !important;
  }

  html body .rl-footer-premium .rl-footer-bottom {
    margin-top: 6px !important;
    padding-top: 28px !important;
  }

  html body .rl-footer-col {
    gap: 14px !important;
  }
}