/**
 * SERTELEC — motion / feedback visual (ERP + catálogo + móvil)
 * Paleta: ámbar #f59e0b · zinc oscuro
 */
@keyframes sertelec-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sertelec-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35), 0 0 16px rgba(245, 158, 11, 0.16); }
  50% { box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.55), 0 0 24px rgba(245, 158, 11, 0.28); }
}
@keyframes sertelec-fab-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 28px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 14px 34px rgba(16, 185, 129, 0.55); }
}

/* —— Controles primarios (todas las superficies) —— */
.sertelec-btn-glow,
button.bg-amber-500,
a.bg-amber-500,
.erp-btn-accent {
  transition:
    transform 0.15s ease,
    box-shadow 0.22s ease,
    background-color 0.15s ease,
    filter 0.15s ease !important;
}
button.bg-amber-500:hover,
a.bg-amber-500:hover,
.sertelec-btn-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}
button.bg-amber-500:active,
a.bg-amber-500:active,
.sertelec-btn-glow:active,
.erp-btn-accent:active {
  transform: scale(0.98);
}
.erp-btn-accent:hover {
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.35);
  transform: translateY(-1px);
}

/* Cards ERP / login: entrada suave */
.sertelec-rise,
body.bg-black > .bg-zinc-900.rounded-2xl,
.erp-page-main > .bg-zinc-900.rounded-2xl,
.erp-page-main > .bg-zinc-900.border {
  animation: sertelec-rise 0.45s ease both;
}

/* —— Catálogo público —— */
#nav-mobile {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition:
    grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    padding 0.25s ease;
  padding-top: 0;
  padding-bottom: 0;
}
#nav-mobile > .nav-mobile-inner {
  min-height: 0;
  overflow: hidden;
}
#nav-mobile.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
#nav-mobile.hidden {
  display: grid !important;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  padding-top: 0;
  padding-bottom: 0;
}
#nav-mobile.hidden.is-open,
#nav-mobile.is-open {
  pointer-events: auto;
}
@media (min-width: 768px) {
  #nav-mobile,
  #nav-mobile.hidden,
  #nav-mobile.is-open {
    display: none !important;
  }
}

header .catalogo-nav-link {
  position: relative;
  transition: color 0.18s ease, transform 0.15s ease;
}
header .catalogo-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: #f59e0b;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
header .catalogo-nav-link.is-active,
header .catalogo-nav-link.text-amber-500 {
  color: #f59e0b;
}
header .catalogo-nav-link.is-active::after,
header .catalogo-nav-link.text-amber-500::after {
  transform: scaleX(1);
}
header .catalogo-nav-link:hover {
  transform: translateY(-1px);
}

#nav-mobile a.is-active,
#nav-mobile a.bg-zinc-900.text-amber-500 {
  box-shadow: inset 3px 0 0 #f59e0b, 0 0 18px rgba(245, 158, 11, 0.12);
}

article[data-card] {
  transition:
    transform 0.22s ease,
    box-shadow 0.25s ease,
    border-color 0.2s ease !important;
  animation: sertelec-rise 0.5s ease both;
}
article[data-card]:nth-child(2) { animation-delay: 0.04s; }
article[data-card]:nth-child(3) { animation-delay: 0.08s; }
article[data-card]:nth-child(4) { animation-delay: 0.12s; }
article[data-card]:nth-child(5) { animation-delay: 0.16s; }
article[data-card]:nth-child(6) { animation-delay: 0.2s; }
article[data-card]:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(245, 158, 11, 0.25) !important;
  border-color: rgba(252, 211, 77, 0.55) !important;
}

a[aria-label="Cotizar por WhatsApp"],
a[title="Cotizar por WhatsApp"] {
  animation: sertelec-fab-pulse 2.8s ease-in-out infinite;
}

/* Login cards */
body.sertelec-login .sertelec-login-card {
  animation: sertelec-rise 0.5s ease both;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(245, 158, 11, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
