/* ============================================================
   Accidentis · Revelado técnico del logo (topbar)
   Prefijo namespaced: accts-reveal-*
   ============================================================ */

.accts-reveal {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  line-height: 1;
  padding-block: 4px;
  margin-block: -4px;
}

.accts-reveal__text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: opacity, transform, filter;
}

.accts-reveal__slab {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: -6px;
  right: -6px;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #f5faff 46%,
    #edf4ff 52%,
    #ffffff 100%
  );
  transform: translateX(-130%) skewX(-12deg);
  pointer-events: none;
  border-radius: 6px;
  opacity: 0;
  z-index: 2;
  will-change: transform, opacity;
}

.accts-reveal__scan {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: -24px;
  width: 18px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 208, 219, 0.85) 50%,
    transparent 100%
  );
  filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  will-change: left, opacity;
}

/* --- Activación --- */
.accts-reveal.is-play .accts-reveal__text {
  animation: accts-reveal-logoIn 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.accts-reveal.is-play .accts-reveal__slab {
  animation: accts-reveal-slab 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.accts-reveal.is-play .accts-reveal__scan {
  animation: accts-reveal-scan 1.8s ease forwards;
}

/* --- Keyframes --- */
@keyframes accts-reveal-logoIn {
  0%   { opacity: 0; transform: scale(0.92); filter: blur(10px); }
  38%  { opacity: 0; transform: scale(0.95); filter: blur(8px); }
  58%  { opacity: 0.55; transform: scale(0.985); filter: blur(2px); }
  78%  { opacity: 1; transform: scale(1.015); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes accts-reveal-slab {
  0%   { opacity: 1; transform: translateX(-130%) skewX(-12deg); }
  55%  { opacity: 1; transform: translateX(6%)    skewX(-12deg); }
  75%  { opacity: 0.9; transform: translateX(20%) skewX(-10deg); }
  100% { opacity: 0; transform: translateX(135%)  skewX(-8deg); }
}

@keyframes accts-reveal-scan {
  0%   { left: -24px;                opacity: 0; }
  18%  {                             opacity: 0.9; }
  70%  { left: calc(100% + 4px);     opacity: 0.85; }
  100% { left: calc(100% + 28px);    opacity: 0; }
}

/* --- Respeto por reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  .accts-reveal.is-play .accts-reveal__text,
  .accts-reveal.is-play .accts-reveal__slab,
  .accts-reveal.is-play .accts-reveal__scan {
    animation: none !important;
  }
  .accts-reveal__text { opacity: 1 !important; transform: none !important; filter: none !important; }
  .accts-reveal__slab,
  .accts-reveal__scan { display: none !important; }
}

/* --- Móvil: escala los overlays algo más finos en logos compactos --- */
@media (max-width: 480px) {
  .accts-reveal__scan { width: 14px; }
}

/* ============================================================
   Botón teléfono en topbar móvil — estilo "incoming call":
   azul lleno destacando contra el topbar blanco, con un halo
   suave que se expande lentamente en bucle. Hipnótico, no brusco.
   ============================================================ */
@keyframes acc-phone-ring {
  0%   { box-shadow: 0 0 0 0   rgba(17, 79, 245, 0.55); }
  100% { box-shadow: 0 0 0 18px rgba(17, 79, 245, 0); }
}
.topbar-phone-mobile {
  background: #114ff5 !important;
  color: #ffffff !important;
  border-color: #114ff5 !important;
  animation: acc-phone-ring 2.6s cubic-bezier(.4, 0, .2, 1) infinite;
}
.topbar-phone-mobile i { color: #ffffff !important; }
@media (prefers-reduced-motion: reduce) {
  .topbar-phone-mobile { animation: none; }
}

/* Bicicleta SVG: el viewBox tiene mucho espacio inferior vacío,
   desplazamos la imagen hacia abajo para centrar visualmente la bici. */
img[src$="/bicicleta.svg"] { transform: translateY(18%); }

/* Dropdown activo: cuando el item activo se sobrevuela, el span se pone
   bg-primary (azul) y el <i> con color primario se vuelve invisible.
   Aseguramos que el icono se ponga blanco en hover. */
.dd-item.active:hover i { color: #ffffff !important; }

/* SVG <img> dentro del item activo del dropdown (coche, moto, caminar, bicicleta):
   las SVGs originales son cian (#00d8e9); las teñimos a azul primario (#114ff5)
   para que el icono refleje "estás en esta sección", igual que el <i> activo. */
.dd-item.active img {
  filter: brightness(0) saturate(100%) invert(22%) sepia(98%) saturate(2891%) hue-rotate(229deg) brightness(95%) contrast(102%) !important;
}
/* Al sobrevolar el item activo, el span se pone azul oscuro: el icono debe ser blanco. */
.dd-item.active:hover img {
  filter: brightness(0) invert(1) !important;
}
