/* ==================================================================
   BOMBERILES DECOR — Detalles sutiles al estilo cuartel
   Uso: solo ornamentos decorativos, sin texto alternativo ni interacción.
   ================================================================== */

@media (prefers-reduced-motion: reduce) {
  .bv-ornament,
  .bv-ornament--diagonal,
  .bv-ornament--hose,
  .bv-ornament--shield,
  .bv-corner {
    animation: none !important;
    transition: none !important;
  }
}

/* Contenedor genérico para ornamentos absolutos */
.bv-ornament {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  touch-action: none;
  z-index: 0;
  contain: paint;
}

/* Asegurar que el contenido quede por encima del ornamento */
.hero,
.enrollment-hero,
.page-hero,
.section,
.unit-card,
.enrollment-path,
.card,
.fleet-card {
  position: relative;
}

/* Watermark con escudo institucional */
.bv-ornament--shield {
  width: clamp(220px, 28vw, 420px);
  aspect-ratio: 1;
  right: -12%;
  bottom: -18%;
  background: var(--menta);
  opacity: 0.05;
  -webkit-mask-image: url('../assets/dividers/escudo-fondo.webp');
  mask-image: url('../assets/dividers/escudo-fondo.webp');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  filter: saturate(0.9);
}

@media (max-width: 1024px) {
  .bv-ornament--shield {
    right: -16%;
    bottom: -22%;
    opacity: 0.04;
  }
}

@media (max-width: 720px) {
  .bv-ornament--shield {
    display: none;
  }
}

/* Banda diagonal bomberil muy sutil */
.bv-ornament--diagonal {
  inset: 0;
  background: linear-gradient(
    118deg,
    transparent 0%,
    transparent 62%,
    rgba(206, 43, 55, 0.03) 62%,
    rgba(206, 43, 55, 0.03) 63.2%,
    transparent 63.2%
  );
  opacity: 0.9;
}

/* Trazo de manguera lateral (más tenue) */
.bv-ornament--hose {
  width: clamp(160px, 18vw, 280px);
  height: 140%;
  top: -20%;
  left: -8%;
  background: var(--menta);
  opacity: 0.02;
  -webkit-mask-image: url('../assets/dividers/imagen-4.webp');
  mask-image: url('../assets/dividers/imagen-4.webp');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center left;
  mask-position: center left;
  /* rotate removed for cleaner visual */
}

@media (max-width: 1080px) {
  .bv-ornament--hose {
    display: none;
  }
}

/* Filete superior para tarjetas tipo unidad/social */
.unit-card::before,
.card--bomberil::before,
.enrollment-path::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--rojo) 0%, rgba(206, 43, 55, 0.15) 18%, transparent 72%);
  pointer-events: none;
  z-index: 2;
}

/* Variante con verde para destacar toques comunitarios */
.enrollment-path--artwork-rojo::before {
  background: linear-gradient(90deg, var(--rojo) 0%, rgba(206, 43, 55, 0.4) 18%, transparent 72%);
}

.enrollment-path--artwork-equipo::before {
  background: linear-gradient(90deg, var(--verde) 0%, rgba(0, 146, 70, 0.4) 18%, transparent 72%);
}

/* Ornamento en esquina para secciones oscuras muy puntuales */
.bv-corner {
  position: absolute;
  pointer-events: none;
  user-select: none;
  width: clamp(90px, 10vw, 140px);
  aspect-ratio: 1;
  right: 2%;
  bottom: 2%;
  background: var(--menta);
  opacity: 0.04;
  -webkit-mask-image: url('../assets/dividers/imagen-5.webp');
  mask-image: url('../assets/dividers/imagen-5.webp');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

@media (max-width: 720px) {
  .bv-corner {
    display: none;
  }
}

/* Potenciar divisores existentes con un halo muy tenue */
.bloque-divisor {
  position: relative;
}

.bloque-divisor::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: min(26rem, 70vw);
  height: 1px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(206, 43, 55, 0.25) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(0.2px);
}

/* Integración sutil con divisiones K9/DIM */
.div-is--k9 .unit-card::before,
.div-is--dim .unit-card::before {
  background: linear-gradient(90deg, var(--div-accent) 0%, color-mix(in srgb, var(--div-accent) 38%, transparent) 18%, transparent 72%);
}

.div-is--k9 .bloque-divisor::after,
.div-is--dim .bloque-divisor::after {
  background: radial-gradient(circle, color-mix(in srgb, var(--div-accent) 26%, transparent) 0%, transparent 72%);
}
