/*
 * Animaciones del sitio (usa los @keyframes de Animate.css: vendor/animate/animate.min.css).
 * Las animaciones de scroll las activa templates/01/js/animaciones.js.
 * Para volver atrás: quitar los <link> de animate.min.css y animaciones.css y el <script> de animaciones.js en layout.blade.php.
 */
:root{
	--animate-duration: .85s;
}

/* Elementos que esperan entrar en pantalla (solo se ocultan si el JS funciona) */
.mr-oculto{
	opacity: 0;
}

/*==== PORTADA: el texto entra cada vez que cambia la diapositiva ====*/
.carousel-item.active .carousel-caption .titulo-slide{
	animation: fadeInUp .9s cubic-bezier(.22,.61,.36,1) both;
}
.carousel-item.active .carousel-caption .texto-slide{
	animation: fadeInUp .9s .2s cubic-bezier(.22,.61,.36,1) both;
}
.carousel-item.active .carousel-caption .btn{
	animation: fadeInUp .9s .4s cubic-bezier(.22,.61,.36,1) both;
}
/* Zoom lento de la foto de fondo */
.carousel-item{
	overflow: hidden;
}
.carousel-item > .mr-fondo{
	position: absolute;
	inset: 0;
	background: inherit;
	background-size: cover;
	background-position: center;
	z-index: 0;
	transform: scale(1);
	transition: transform 9s linear;
}
.carousel-item.active > .mr-fondo{
	transform: scale(1.12);
}
.carousel-item > .carousel-gradient,
.carousel-item > .carousel-caption{
	z-index: 1;
}

/* Banner de las páginas interiores: la foto se acerca suavemente al cargar */
.banner-seccion{
	position: relative;
	isolation: isolate;
	overflow: hidden;
}
.banner-seccion::before{
	content: "";
	position: absolute;
	inset: 0;
	background: inherit;
	z-index: -1;
	animation: mrBanner 1.8s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes mrBanner{
	from{ transform: scale(1.18); }
	to{ transform: scale(1); }
}

/*==== BOTONES: brillo que cruza al pasar el mouse ====*/
.btn-color{
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.btn-color::before{
	content: "";
	position: absolute;
	top: 0;
	left: -75%;
	width: 50%;
	height: 100%;
	background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 100%);
	transform: skewX(-20deg);
	z-index: -1;
	pointer-events: none;
}
.btn-color:hover::before{
	animation: mrBrillo .75s ease;
}
@keyframes mrBrillo{
	to{ left: 130%; }
}
.btn-color:hover{
	transform: translateY(-3px);
	box-shadow: 0 12px 24px rgba(16,24,40,.25);
}

/*==== TARJETAS: elevación más marcada ====*/
.productos .card:hover,
.card.position-relative:hover,
.noticia-inicio:hover{
	transform: translateY(-8px);
	box-shadow: 0 22px 44px rgba(16,24,40,.18);
}
.img-link:hover{
	transform: translateY(-6px) scale(1.01);
}

/*==== WHATSAPP: latido para llamar la atención ====*/
.whatsapp::after{
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 3px solid #25d366;
	animation: mrLatido 2.2s ease-out infinite;
	pointer-events: none;
}
@keyframes mrLatido{
	0%{ transform: scale(1); opacity: .8; }
	80%, 100%{ transform: scale(1.65); opacity: 0; }
}
.whatsapp:hover{
	animation: tada 1s;
}

/*==== BARRA DE PROGRESO DE LECTURA ====*/
.mr-progreso{
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: var(--botones, #84b135);
	transform: scaleX(0);
	transform-origin: left;
	z-index: 10000;
	pointer-events: none;
}

/*==== Respeta "reducir movimiento" del sistema operativo ====*/
@media (prefers-reduced-motion: reduce){
	.mr-oculto{ opacity: 1; }
	.carousel-item.active .carousel-caption *,
	.banner-seccion::before,
	.whatsapp::after,
	.whatsapp:hover,
	.btn-color:hover::before{ animation: none !important; }
	.carousel-item > .mr-fondo{ transition: none; transform: none; }
}
