.height-include-header {
	height: calc(100dvh - var(--header-height));
}

.title-section {
	overflow: hidden;
}

.history-section .col-left.history-image--1 {
	display: flex !important;
    flex-direction: column !important;
    align-items: end !important;
    justify-content: end !important;
    padding: 0rem !important;
	
	& .elementor-widget-image {
		height: 100%;
		width: 100%;
	}
}

/* Parallax del hero: la sección siguiente (.welcome-section) cubre a la hero
   mientras el video de fondo (.hero-bg-video) queda rezagado al hacer scroll. */
.parallax-section.hero-bg-video {
	position: relative;
	z-index: 1;
	will-change: transform;
	
	& .elementor-background-video-hosted {
		transform: translate(-50%,-50%);
	}
}


.welcome-section {
	position: relative;
	z-index: 2;
}

body:not(.elementor-editor-active):not(.loaded) .title-hero :where(h2, h1) {
	opacity: 0;
}

body:not(.elementor-editor-active):not(.loaded) #site-header .elementor-widget-image,
body:not(.elementor-editor-active):not(.loaded) #site-header .cer-hamburger-btn {
	opacity: 0;
	visibility: hidden;
}

body:not(.elementor-editor-active):not(.loaded) #mouse-scrolldown {
	opacity: 0;
}

/* --- Contenedor Padre --- */
body:not(.elementor-editor-active) .chest-section {
	height: 100dvh;
	width: 100%;
	overflow: hidden;
	background-color: #FAFAFA;
	margin: 0 !important;
	box-sizing: border-box;

	transition: none !important;
	animation: none !important;
}

/* --- Contenedores Hijos (Slides) --- */
body:not(.elementor-editor-active) .chest-section-item {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	z-index: 0;
	transition: opacity .8s ease-out;
}

/* Estado Activo del item */
body:not(.elementor-editor-active) .chest-section-item.is-active {
	opacity: 1;
	z-index: 10;
}

/* --- Columna 1: Animación de la Imagen --- */
body:not(.elementor-editor-active) .chest-item-image img {
	transition: transform 1s ease-out;
	transform: scale(1.1);
	width: 100%;
	height: 100%;
	object-fit: cover;
}
body:not(.elementor-editor-active) .chest-section-item.is-active .chest-item-image img {
	/*transform: scale(1);*/
}

/* --- Columna 2: Animación del Contenido --- */
body:not(.elementor-editor-active) .chest-item-content {
	transition: all .8s ease-out;
	opacity: 0;
	/* transform: translateY(2rem); */
	display: flex;
	flex-direction: column;
	justify-content: center; /* Centra el contenido verticalmente */
}
body:not(.elementor-editor-active) .chest-section-item.is-active .chest-item-content {
	opacity: 1;
	transform: translateY(0);
}

body:not(.elementor-editor-active) .timeline-section{
	position:relative;
	transition: none !important;
	animation: none !important;
}

body:not(.elementor-editor-active) .timeline-stage{
	position:relative;
	height:100dvh;
	overflow:hidden;
}

body:not(.elementor-editor-active) .timeline-item{
	position:absolute;
	inset:0;
	display:flex;
	align-items:center;
	justify-content:space-between;
	padding-inline: clamp(1rem, 6vw ,120px);
}

body:not(.elementor-editor-active) .timeline-item:not(.exclude-padding){
	padding-bottom: 5rem;
}

body:not(.elementor-editor-active) .timeline-item:not(:first-child){
	visibility:hidden;
}

body:not(.elementor-editor-active) .timeline-left,
body:not(.elementor-editor-active) .timeline-right {
	overflow: hidden;
}

.mixed-content :where(h3, h4, h5, h6){
	color: var(--e-global-color-primary);
	font-weight: 600;
	font-size: 1rem !important;
	font-family: 'Raleway';
}


.elementor-widget-text-editor :where(h3, h4){
	margin-top: 1rem;
	font-size: 1.5rem;
	text-transform: uppercase;
}

.elementor-widget-text-editor :where(h5, h6){
	margin-top: 1rem;
	font-size: 1rem;
	text-transform: uppercase;
}


.col-right {
    position: relative;
    min-height: 100dvh;
   
}

/* --- History Section: contenedor padre --- */
body:not(.elementor-editor-active) .history-section {
	height: 100dvh;
	width: 100%;
	overflow: hidden;
	margin: 0 !important;
	transition: none !important;
	animation: none !important;
}

/* --- History Row: slides apiladas (como chest-section-item) --- */
body:not(.elementor-editor-active) .history-row {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	z-index: 0;
	display: flex;
	align-items: stretch;
	transition: opacity .8s ease-out;
}

body:not(.elementor-editor-active) .history-row.is-active {
	opacity: 1;
	z-index: 10;
}

/* Columnas dentro de cada fila */
body:not(.elementor-editor-active) .history-row .col-left,
body:not(.elementor-editor-active) .history-row .col-right {
	flex: 1 1 50%;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(1rem, 4vw, 5rem);
}

body:not(.elementor-editor-active) .history-row .col-left img,
body:not(.elementor-editor-active) .history-row .col-right img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Bloques de texto dentro de una fila (scoped para vencer estilos de Elementor) */
body:not(.elementor-editor-active) .history-row .content-block {
	position: absolute !important;
	inset: 0 !important;
	opacity: 0;
	pointer-events: none;
	padding: clamp(2rem, 4vw, 5rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* El primero de cada fila siempre visible al cargar */
body:not(.elementor-editor-active) .history-row .content-block:first-child {
	opacity: 1;
	pointer-events: auto;
}

/* --- Fallback: estructura vieja sin .history-row --- */
body:not(.elementor-editor-active) .history-section .content-block {
	position: absolute !important;
	inset: 0 !important;
	opacity: 0;
	pointer-events: none;
}

body:not(.elementor-editor-active) .history-section .content-block:first-child {
	opacity: 1;
	pointer-events: auto;
}

body:not(.elementor-editor-active) .history-section .col-left {
	position: relative;
	transition: none !important;
	animation: none !important;
}

.bg-noise {
	position: relative;
}

/* Overlay de ruido sobre la imagen de fondo de Elementor */
.e-con.e-flexbox-base.bg-noise::before, .bg-video::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("../images/noise.png");
	background-repeat: repeat;
	background-size: 200px 200px;
	opacity: 0.05;
	pointer-events: none;
	z-index: 10;
	
	animation: noise-shift 0.2s steps(2) infinite;
}

@keyframes noise-shift {
    0% {
        background-position: 0 0;
    }

    25% {
        background-position: 15px -10px;
    }

    50% {
        background-position: -10px 15px;
    }

    75% {
        background-position: 10px 10px;
    }

    100% {
        background-position: -15px -10px;
    }
}

.bg-video::after {
	opacity: 0.07;
}

/* Mantiene el contenido de la columna por encima del ruido */
.bg-noise > * {
	position: relative;
	z-index: 2;
}

.bg-video {
	position: absolute;
}

.credentials {
	& .elementor-counter-number-wrapper {
		align-items: flex-end;
	}

	& .elementor-counter-number-suffix, & .elementor-counter-number-prefix {
		font-size: 1.2rem;
		line-height: 1rem;
	}

	& .elementor-counter-title {
		width: 90%;
		text-align: center;
		line-height: 1.2rem !important;
	}
}


/* ICON MENU LOGIC  */

/* .icon-menu {
	cursor: pointer;
	height: 100%;

	.elementor-icon-wrapper {
		height: 100%;
	}

	& .elementor-icon {
		display: flex;
		align-items: center;
		height: 100%;
	}
} */

/* Contenedor de nav links que se expande hacia la izquierda desde el icon-menu */
.nav-menu-container {
	position: absolute;
    top: 0;
    height: 100%;
    width: 0;
    overflow: hidden;
    z-index: 30;
    background: var(--e-global-color-primary);
    display: flex;
    align-items: center;
    box-sizing: border-box;
    z-index: -1;
    right: 0;
    height: 100%;
}

.nav-menu-container > * {
	flex: 0 0 auto;
	white-space: nowrap;
}

#tahefobu-header {
	position: sticky;
	top: var(--ta-sticky-top);
	z-index: 9999;
}

.border-middle::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    border-top: 1px solid var(--e-global-color-accent);
}

.elementor.elementor-19[data-elementor-id="19"] {
	position: relative;
	z-index: 1;
	background: var( --e-global-color-d6fe00d);
}

@media (width < 768px) {
	
	body:not(.elementor-editor-active) .chest-section {
		min-height: 100svh !important;
		height: auto !important;
	}
	
    body:not(.elementor-editor-active) .chest-section-item {
		position: relative !important;
        height: auto;
        min-height: calc(85svh - var(--header-height));
        /*max-height: calc(100dvh - (var(--header-height) / 2.5));*/
        padding-top: 0;
		/*padding-block: var(--header-height);*/
		opacity: 1;
        visibility: visible;
    }

    body:not(.elementor-editor-active) .chest-item-image {
        height: 30svh;
		position: sticky;
		top: 0;
    }

    body:not(.elementor-editor-active) .chest-item-content {
        height: auto;
        min-height: 50svh;
        /*max-height: 50dvh;
        overflow-y: auto;
		overscroll-behavior-y: auto; 
        -webkit-overflow-scrolling: touch;*/
        justify-content: flex-start;
        padding-top: 1.5rem;
		opacity: 1;
    }

    body:not(.elementor-editor-active) .chest-item-content::-webkit-scrollbar {
        display: none;
    }
    body:not(.elementor-editor-active) .chest-item-content {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
	
	.credentials {
		& .elementor-counter-title {
			width: 100%;
		}
	}
	
	body:not(.elementor-editor-active) .history-row .content-block {
		padding: clamp(1rem, 4vw, 5rem);
	}
	
	body:not(.elementor-editor-active) .history-section {
		max-height: 100svh !important;
		min-height: 100svh !important;
	}
}

body:not(.elementor-editor-active) .col-left.bg-noise {
	padding: 0 !important
}

@media (width < 768px) {
	body:not(.elementor-editor-active) .history-row {
		padding-block: var(--header-height);
		height: initial;
	}
	
	body:not(.elementor-editor-active) .history-row .col-left{
		height: 40svh;
		min-height: 40svh;
	}
	
	body:not(.elementor-editor-active) .history-row .col-right{
		height: 52svh;
		min-height: 40svh;
	}
	
	body:not(.elementor-editor-active) .history-row#responsabilidad-social {
		& .col-right {
			min-height: 70%;
			height: 70%;
			flex: 1;
		}
		
		& .col-left {
			min-height: 30%;
			height: 30%;
		}
	}
	
	body:not(.elementor-editor-active) .history-row .col-left,
	body:not(.elementor-editor-active) .history-row .col-right {
		flex: inherit;
	}
	
	body:not(.elementor-editor-active) .history-row{
		height: auto;
        min-height calc(100svh - var(--header-height));
		box-sizing: content-box;
    	padding-top: var(--header-height);
	}
	
	body:not(.elementor-editor-active) .history-row .content-block {
		min-height: 0;
	}
	
	body:not(.elementor-editor-active) .history-row .content-block {
		/*flex-direction: row;*/
	}
	
	.flex-col {
		flex-direction: column !important;
	}
	
	/*body:not(.elementor-editor-active) .chest-section-item {
		position: relative !important;
	}
	
	body:not(.elementor-editor-active) .chest-section-item {
        height: auto !important;
        min-height: auto !important;
        max-height: inherit !important;
        padding-top: 0 !important;
    }
	
	body:not(.elementor-editor-active) .chest-section {
		height: auto !important;
	}
	
	 body:not(.elementor-editor-active) .chest-item-content {
        max-height: inherit !important;
    }*/
	
	body:not(.elementor-editor-active) .timeline-item:not(.exclude-padding){
		padding-bottom: 4rem;
	}
}
