/* =============================
   SCROLL TO TOP - PREMIUM UI
   ============================= */

#toTop {
  position: fixed;
  bottom: 105px;
  right: 32px;

  width: 52px;
  height: 52px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(20, 24, 32, 0.65);
  backdrop-filter: blur(10px);

  color: #fff;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);

/* =============================
   FLOAT BUTTON SYSTEM (UNIFICADO)
   ============================= */

.float-btn {
  position: fixed;

  width: 52px;
  height: 52px;

  right: 32px;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(20, 24, 32, 0.65);
  backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  cursor: pointer;
  text-decoration: none;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);

  transition: transform .3s ease, background .3s ease, opacity .3s ease;

  z-index: 999;
}

/* ICONO */
.float-btn svg {
  width: 22px;
  height: 22px;
  transition: transform .3s ease;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* HOVER UNIFICADO */
.float-btn:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.08);
}

.float-btn:hover svg {
  transform: translateY(-2px);
}

/* =============================
   TO TOP
   ============================= */

#toTop {
  bottom: 105px;

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
}

#toTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#toTop:active {
  transform: scale(0.96);
}

/* =============================
   WHATSAPP
   ============================= */

.wa-float {
  bottom: 28px;
}

/* eliminamos lo feo */
.wa-pulse {
  display: none;
}

/* icono WhatsApp override (solo color) */
.wa-float svg {
  fill: currentColor;
}

/* =============================
   RESPONSIVE
   ============================= */

/* Tablet */
@media (max-width: 768px) {
  .float-btn {
    width: 48px;
    height: 48px;
    right: 24px;
  }

  .float-btn svg {
    width: 20px;
    height: 20px;
  }

  #toTop {
    bottom: 94px;
  }

  .wa-float {
    bottom: 24px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .float-btn {
    width: 44px;
    height: 44px;
    right: 20px;
    border-radius: 12px;
  }

  .float-btn svg {
    width: 18px;
    height: 18px;
  }

  #toTop {
    bottom: 85px;
  }

  .wa-float {
    bottom: 18px;
  }
}

/* Small */
@media (max-width: 320px) {
  .float-btn {
    width: 40px;
    height: 40px;
    right: 16px;
  }

  .float-btn svg {
    width: 16px;
    height: 16px;
  }

  #toTop {
    bottom: 70px;
  }

  .wa-float {
    bottom: 14px;
  }
}
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);

  transition: 
    opacity 0.35s ease,
    transform 0.35s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;

  z-index: 999;
}

/* SVG */
#toTop svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

/* Estado visible */
#toTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Hover elegante */
#toTop:hover {
  background: linear-gradient(
    135deg,
    var(--blue),
    var(--amber)
  );

  box-shadow:
    0 12px 35px rgba(0,0,0,0.35),
    0 0 12px rgba(0, 180, 255, 0.25);
}

/* micro animación del ícono */
#toTop:hover svg {
  transform: translateY(-2px);
}

/* Active (click) */
#toTop:active {
  transform: scale(0.96);
}

/* =============================
   RESPONSIVE
   ============================= */

/* Tablet */
@media (max-width: 768px) {
  #toTop {
    bottom: 94px;
    right: 24px;
    width: 48px;
    height: 48px;
  }

  #toTop svg {
    width: 20px;
    height: 20px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  #toTop {
    bottom: 85px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  #toTop svg {
    width: 18px;
    height: 18px;
  }
}

/* Small devices */
@media (max-width: 320px) {
  #toTop {
    bottom: 48px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  #toTop svg {
    width: 16px;
    height: 16px;
  }
}


/* WHATSAPP FLOAT */
.wa-float{position:fixed;bottom:28px;right:28px;z-index:998;width:58px;height:58px;border-radius:50%;background:#25D366;box-shadow:0 4px 24px rgba(37,211,102,.45);display:flex;align-items:center;justify-content:center;transition:transform .2s ease,box-shadow .2s ease;text-decoration:none}
.wa-float:hover{transform:scale(1.1) translateY(-3px);box-shadow:0 8px 32px rgba(37,211,102,.6)}
.wa-float svg{width:30px;height:30px;fill:#fff}
.wa-pulse{position:absolute;inset:0;border-radius:50%;background:rgba(37,211,102,.35);animation:waPulse 2.5s ease-out infinite}
@keyframes waPulse{0%{transform:scale(1);opacity:.7}100%{transform:scale(1.7);opacity:0}}

/* =============================
   WHATSAPP RESPONSIVE ONLY
   (NO MODIFICA TU CSS BASE)
   ============================= */

/* Tablets y laptops pequeñas */
@media (max-width: 1024px) {
  .wa-float {
    width: 54px;
    height: 54px;
    bottom: 24px;
    right: 24px;
  }

  .wa-float svg {
    width: 28px;
    height: 28px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .wa-float {
    width: 50px;
    height: 50px;
    bottom: 22px;
    right: 22px;
  }

  .wa-float svg {
    width: 26px;
    height: 26px;
  }
}

/* Móviles */
@media (max-width: 480px) {
  .wa-float {
    width: 46px;
    height: 46px;
    bottom: 18px;
    right: 18px;
  }

  .wa-float svg {
    width: 24px;
    height: 24px;
  }
}

/* Móviles pequeños */
@media (max-width: 360px) {
  .wa-float {
    width: 42px;
    height: 42px;
    bottom: 16px;
    right: 16px;
  }

  .wa-float svg {
    width: 22px;
    height: 22px;
  }
}

/* Extra pequeño (320px o menos) */
@media (max-width: 320px) {
  .wa-float {
    width: 40px;
    height: 40px;
    bottom: 14px;
    right: 14px;
  }

  .wa-float svg {
    width: 20px;
    height: 20px;
  }
}