/**
 * Venezia — Sticky Header Effects for Elementor - Frontend CSS
 */

/* Fijar cabecera cuando venezia-is-sticky está activo */
.venezia-is-sticky {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 999 !important;
}

/* Modo transparente encima del banner hero */
.venezia-transparent-header:not(.venezia-is-sticky) {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 998 !important;
	background-color: transparent !important;
}

/* Espaciador para evitar saltos de layout (CLS = 0) */
.venezia-sticky-spacer {
	display: block;
	width: 100%;
	visibility: hidden;
	pointer-events: none;
	padding: 0 !important;
	border: none !important;
}

/* Compatibilidad con barra de administración de WordPress */
.admin-bar .venezia-is-sticky {
	top: 32px !important;
}

@media screen and (max-width: 782px) {
	.admin-bar .venezia-is-sticky {
		top: 46px !important;
	}
}

/* will-change activo solo durante scroll/fijación */
.venezia-sticky-header.venezia-is-sticky,
.venezia-sticky-header.venezia-header-scrolled {
	will-change: transform;
}

/* Ocultar al bajar / Mostrar al subir (F1) */
.venezia-sticky-header.venezia-header-hidden {
	transform: translateY(-100%) !important;
}

/* Transiciones fluidas a 60fps — propiedades compositables y estilos que cambian */
.venezia-sticky-header,
.venezia-sticky-header .elementor-widget-container,
.venezia-sticky-header .elementor-nav-menu,
.venezia-sticky-header .elementor-item,
.venezia-sticky-header .elementor-sub-item,
.venezia-sticky-header .elementor-button,
.venezia-sticky-header .elementor-icon,
.venezia-sticky-header .elementor-icon svg,
.venezia-sticky-header .elementor-heading-title,
.venezia-sticky-header .elementor-widget-theme-site-logo img,
.venezia-sticky-header .elementor-widget-image img,
.venezia-sticky-header .elementor-widget-image svg path,
.venezia-sticky-header .elementor-widget-theme-site-logo svg path {
	transition: background-color var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1),
				color var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1),
				fill var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1),
				stroke var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1),
				border-color var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1),
				box-shadow var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1),
				transform var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1),
				opacity var(--venezia-trans-duration, 0.35s) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transición suave para imagen de logo al alternar */
.venezia-sticky-header .elementor-widget-theme-site-logo img,
.venezia-sticky-header .elementor-widget-image img {
	transition: opacity 0.2s ease, filter var(--venezia-trans-duration, 0.35s) ease, transform var(--venezia-trans-duration, 0.35s) ease;
}

/* Soporte y posición para submenús desplegables al fijar cabecera (F9) */
.venezia-is-sticky .elementor-nav-menu--dropdown {
	max-height: calc(100vh - 80px);
	overflow-y: auto;
}

/* Desactivación por dispositivo vía CSS (F2) */
@media (min-width: 1025px) {
	.venezia-off-desktop.venezia-is-sticky {
		position: static !important;
	}
	.venezia-off-desktop + .venezia-sticky-spacer {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.venezia-off-tablet.venezia-is-sticky {
		position: static !important;
	}
	.venezia-off-tablet + .venezia-sticky-spacer {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.venezia-off-mobile.venezia-is-sticky {
		position: static !important;
	}
	.venezia-off-mobile + .venezia-sticky-spacer {
		display: none !important;
	}
}

/* Respeto estricto a prefers-reduced-motion (F4) */
@media (prefers-reduced-motion: reduce) {
	.venezia-sticky-header,
	.venezia-sticky-header * {
		transition: none !important;
		animation: none !important;
	}
}
