/*
 * Efectos de la landing que Elementor no permite definir (animaciones).
 * Clases globales usadas en Elementor:
 *   .flor-flotante    cada flor decorativa del hero
 *   .hero-contenido   contenedor del texto del hero (deja pasar el ratón a las flores)
 */

/* ---------- Flores flotando ---------- */
@keyframes gd-flotar {
	0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
	25%  { transform: translate3d(4px, -10px, 0) rotate(3deg); }
	50%  { transform: translate3d(0, -16px, 0) rotate(0deg); }
	75%  { transform: translate3d(-4px, -8px, 0) rotate(-3deg); }
	100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.flor-flotante {
	animation: gd-flotar 7s ease-in-out infinite;
	will-change: transform;
	transition: scale .35s cubic-bezier(.34, 1.56, .64, 1), filter .35s ease;
	filter: drop-shadow(0 6px 10px rgba(25, 27, 25, .12));
	cursor: default;
}
/* Cada flor con su propio ritmo para que no se muevan al unísono */
img.flor-flotante:nth-of-type(1) { animation-duration: 6.5s; animation-delay: -1.2s; }
img.flor-flotante:nth-of-type(2) { animation-duration: 8s;   animation-delay: -3.4s; }
img.flor-flotante:nth-of-type(3) { animation-duration: 7.2s; animation-delay: -0.6s; }
img.flor-flotante:nth-of-type(4) { animation-duration: 8.6s; animation-delay: -2.1s; }
img.flor-flotante:nth-of-type(5) { animation-duration: 6.9s; animation-delay: -4.8s; }
img.flor-flotante:nth-of-type(6) { animation-duration: 7.7s; animation-delay: -5.6s; }

.flor-flotante:hover {
	scale: 1.12;
	filter: drop-shadow(0 10px 16px rgba(25, 27, 25, .2));
	animation-play-state: paused;
}

/* El texto del hero no bloquea el ratón sobre las flores, pero sus elementos sí son clicables */
.hero-contenido { pointer-events: none; }
.hero-contenido > * { pointer-events: auto; }

/* ---------- Rastro de flores al mover el ratón (js/rastro-flores.js) ----------
 * Clase global "hero-rastro" en la sección del hero. La capa queda por encima de
 * las flores fijas y por debajo del texto (.hero-contenido tiene z-index 3). */
.gd-rastro-capa { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; z-index: 2; }
.gd-rastro-flor { position: absolute; display: block; height: auto; max-width: none; opacity: 0; pointer-events: none; user-select: none; will-change: transform, opacity; filter: drop-shadow(0 6px 10px rgba(25, 27, 25, .12)); }

/* ---------- Menú en móvil y tablet (js/menu-movil.js) ----------
 * Clases globales en Elementor:
 *   .cabecera        la cabecera (header)        → recibe .menu-abierto al abrir
 *   .menu-principal  el <nav> con los enlaces    (el mismo del escritorio)
 *   .menu-toggle     el botón hamburguesa (3 .menu-toggle-barra dentro)
 */
.menu-toggle { display: none !important; }
/* En escritorio el menú es la barra normal: sin sombra ni transición del panel móvil */
@media (min-width: 1025px) {
	.cabecera .menu-principal { box-shadow: none !important; transition: none !important; }
}

@media (max-width: 1024px) {
	.elementor .cabecera .menu-toggle {
		display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; gap: 5px !important;
		width: 44px !important; height: 44px !important; min-width: 44px !important; flex: 0 0 44px !important; padding: 0 !important; margin: 0 !important;
		border: 0 !important; border-radius: 10px !important; background: #165632 !important; cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	.elementor .cabecera .menu-toggle:focus-visible { outline: 2px solid #87B146; outline-offset: 2px; }
	.elementor .cabecera .menu-toggle .menu-toggle-barra {
		display: block !important; flex: 0 0 auto !important; width: 22px !important; height: 2px !important; min-height: 2px !important; padding: 0 !important; margin: 0 !important;
		border-radius: 2px !important; background: #FFFDF5 !important; transition: transform .25s ease, opacity .2s ease;
	}
	.elementor .cabecera.menu-abierto .menu-toggle .menu-toggle-barra:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.elementor .cabecera.menu-abierto .menu-toggle .menu-toggle-barra:nth-child(2) { opacity: 0; }
	.elementor .cabecera.menu-abierto .menu-toggle .menu-toggle-barra:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	/* El botón "Inscríbete ahora" se pega al hamburguesa */
	.cabecera .menu-principal + * { margin-left: auto !important; }

	/* Panel desplegable */
	.cabecera .menu-principal {
		display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 0 !important;
		position: absolute !important; top: 100%; left: 0; right: 0; width: 100% !important;
		padding: 8px 16px 16px !important; background: #FFFDF5;
		box-shadow: 0 12px 24px rgba(25, 27, 25, .12); border-top: 1px solid rgba(25, 27, 25, .06);
		visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
		transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
	}
	.cabecera.menu-abierto .menu-principal {
		visibility: visible; opacity: 1; transform: none; pointer-events: auto;
		transition: opacity .2s ease, transform .2s ease, visibility 0s;
	}
	.cabecera .menu-principal > * { border-bottom: 1px solid rgba(135, 177, 70, .35); }
	.cabecera .menu-principal > *:last-child { border-bottom: 0; }
	.cabecera .menu-principal a { display: block !important; padding: 14px 8px !important; font-size: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.gd-rastro-capa { display: none; }
	.menu-toggle .menu-toggle-barra, .cabecera .menu-principal { transition: none; }
	.flor-flotante { animation: none; transition: none; }
	.flor-flotante:hover { scale: 1; }
}
