/* ==========================================================================
   Cards & Animated Gold Gradient Borders — Barbería El Firulete
   ========================================================================== */

@keyframes ef-gold-spin {
  to {
    --ef-gold-angle: 360deg;
  }
}

@keyframes ef-gold-shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Borde con gradiente dorado animado mediante pseudo-elemento con mask */
.ef-gold-border {
  position: relative;
  border-radius: var(--ef-radius-md);
  background: var(--ef-color-superficie);
  box-shadow: var(--ef-shadow-card);
  isolation: isolate;
}

.ef-gold-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--ef-gold-angle),
    rgba(143, 107, 20, 0.35) 0deg,
    #d4af37 65deg,
    #fff1b8 110deg,
    #dd3333 165deg,
    #d4af37 220deg,
    rgba(143, 107, 20, 0.3) 300deg,
    rgba(143, 107, 20, 0.35) 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: ef-gold-spin 7s linear infinite;
  z-index: 2;
}

.ef-gold-border:hover::before {
  padding: 2px;
  animation-duration: 3.5s;
}

.ef-gold-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.14), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.ef-gold-border > * {
  position: relative;
  z-index: 1;
}

/* Línea divisoria dorada con pulso */
.ef-gold-divider {
  height: 2px;
  width: 100%;
  max-width: 180px;
  background: linear-gradient(90deg, transparent, var(--ef-color-dorado), var(--ef-color-primario), var(--ef-color-dorado-claro), transparent);
  background-size: 200% 100%;
  animation: ef-gold-shimmer 4s ease infinite;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ef-gold-border::before,
  .ef-gold-divider {
    animation: none;
  }
}
