/**
 * Entradas de sección inspiradas en el movimiento editorial de Venora.
 * Las reglas solo se activan cuando JavaScript confirma soporte.
 */

.pharmavet-button-hover__wrap {
	position: relative;
	display: inline-block;
	height: var(--pharmavet-button-line-height);
	overflow: hidden;
	font: inherit;
	line-height: inherit;
}

.wp-block-button > .wp-block-button__link.pharmavet-button-hover,
a.button.pharmavet-button-hover,
button.button.pharmavet-button-hover,
.kt-button.pharmavet-button-hover {
	display: inline-flex !important;
	grid-template-columns: none !important;
	align-items: center;
	justify-content: center;
	column-gap: 0 !important;
}

.pharmavet-button-hover__text {
	display: block;
	height: var(--pharmavet-button-line-height);
	font: inherit;
	line-height: inherit;
	white-space: nowrap;
}

.pharmavet-button-hover__text--second {
	display: none;
}

.pharmavet-button-hover::before,
.pharmavet-button-hover::after {
	display: none !important;
	content: none !important;
}

.pharmavet-motion-enabled .pharmavet-button-hover__text {
	transform: translateY(0);
	transition: transform 300ms cubic-bezier(.25, .46, .45, .94);
	will-change: transform;
}

.pharmavet-motion-enabled .pharmavet-button-hover__text--second {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	display: block;
}

.pharmavet-motion-enabled .pharmavet-button-hover:hover .pharmavet-button-hover__text,
.pharmavet-motion-enabled .pharmavet-button-hover:focus-visible .pharmavet-button-hover__text,
.pharmavet-motion-enabled .pharmavet-button-hover:active .pharmavet-button-hover__text {
	transform: translateY(-100%);
}

/* Sección corporativa dividida: fotografía a la izquierda y contenido a la derecha. */
.entry-content > .wp-block-group.has-theme-palette-7-background-color {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
	padding: 0 !important;
	overflow: hidden;
	background: #d93425 !important;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color > .wp-block-group__inner-container {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container {
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: none;
	min-height: clamp(500px, 46vw, 680px);
	margin: 0;
	padding: 0;
	gap: 0;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container > .wp-block-column {
	align-self: stretch;
	box-sizing: border-box;
	width: 50%;
	min-width: 0;
	flex: 0 0 50% !important;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container > .wp-block-column:first-child {
	display: flex;
	padding: 0 !important;
	overflow: hidden;
	background: #e8e8e8;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:first-child figure,
.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:first-child img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:first-child img {
	object-fit: cover;
	object-position: center;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:first-child img.pharmavet-story-parallax-image {
	transform: translate3d(0, var(--pharmavet-story-parallax, 0), 0) scale(1.06);
	transform-origin: center;
	will-change: transform;
}

/* Variante con varias imágenes en la columna izquierda. Cada figura ocupa
 * su lugar en el flujo, pero queda fijada para que la siguiente suba por
 * delante y la sustituya visualmente. */
.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack {
	overflow: visible;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack .wp-block-columns.site-container {
	align-items: flex-start;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack .wp-block-columns.site-container > .wp-block-column:first-child {
	display: flex;
	flex-direction: column;
	overflow: visible;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack .wp-block-column:first-child > figure.wp-block-image {
	z-index: var(--pharmavet-story-index, 1);
	position: sticky;
	top: 100px;
	height: clamp(500px, 46vw, 680px);
	min-height: clamp(500px, 46vw, 680px);
	overflow: hidden;
	background: #e8e8e8;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack .wp-block-columns.site-container > .wp-block-column:last-child {
	position: sticky;
	top: 100px;
	height: clamp(500px, 46vw, 680px);
	min-height: clamp(500px, 46vw, 680px);
	align-self: flex-start;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container > .wp-block-column:last-child {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(2rem, 4vw, 4rem) clamp(2.25rem, 7vw, 8rem) !important;
	color: #ffffff;
	background: #d93425;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:last-child h2 {
	max-width: 11ch;
	margin: 0 0 clamp(1rem, 2vw, 1.75rem);
	color: inherit;
	font-size: clamp(2.35rem, 4.5vw, 4.75rem);
	font-weight: 800;
	line-height: .98;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:last-child h2 .titulo-normal {
	font-weight: 300;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:last-child p,
.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:last-child blockquote {
	max-width: 42rem;
	color: inherit;
	font-size: clamp(.9rem, 1.15vw, 1rem);
	line-height: 1.65;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:last-child blockquote {
	margin: .45rem 0 0;
	padding: 0;
	border: 0;
}

.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:last-child .wp-block-buttons {
	margin-top: clamp(1rem, 2vw, 1.75rem);
}

.pharmavet-motion-enabled .pharmavet-reveal {
	opacity: 0;
	filter: blur(7px);
	transform: translate3d(0, 64px, 0);
	transform-origin: 50% 100%;
	transition:
		opacity 760ms cubic-bezier(.22, 1, .36, 1),
		filter 900ms cubic-bezier(.22, 1, .36, 1),
		transform 900ms cubic-bezier(.22, 1, .36, 1);
	will-change: opacity, filter, transform;
}

.pharmavet-motion-enabled .pharmavet-reveal.pharmavet-reveal--left {
	transform: translate3d(-54px, 24px, 0);
}

.pharmavet-motion-enabled .pharmavet-reveal.pharmavet-reveal--right {
	transform: translate3d(54px, 24px, 0);
}

.pharmavet-motion-enabled .pharmavet-reveal.is-visible {
	opacity: 1;
	filter: blur(0);
	transform: translate3d(0, 0, 0);
	will-change: auto;
}

.pharmavet-motion-enabled .pharmavet-reveal-item {
	opacity: 0;
	transform: translate3d(0, 42px, 0);
	transition:
		opacity 650ms cubic-bezier(.22, 1, .36, 1),
		transform 780ms cubic-bezier(.22, 1, .36, 1);
	transition-delay: var(--pharmavet-reveal-delay, 100ms);
	will-change: opacity, transform;
}

.pharmavet-motion-enabled .pharmavet-reveal.is-visible .pharmavet-reveal-item {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	will-change: auto;
}

/* Estas dos tarjetas siguen directamente el scroll; no deben acumular
 * la transición temporal usada por las demás tarjetas. */
.pharmavet-motion-enabled .pharmavet-species-card--scroll-left,
.pharmavet-motion-enabled .pharmavet-species-card--scroll-right,
.pharmavet-motion-enabled .pharmavet-reveal.is-visible .pharmavet-species-card--scroll-left,
.pharmavet-motion-enabled .pharmavet-reveal.is-visible .pharmavet-species-card--scroll-right {
	transition: none;
	will-change: opacity, transform;
}

/* La sección permanece fija; solo los textos entran uno por uno. */
.pharmavet-motion-enabled .pharmavet-reveal.pharmavet-reveal--story,
.pharmavet-motion-enabled .pharmavet-reveal.pharmavet-reveal--story.is-visible {
	opacity: 1;
	filter: none;
	transform: none;
}

.pharmavet-motion-enabled .pharmavet-reveal--story .pharmavet-reveal-item--text {
	transform: translate3d(54px, 24px, 0);
}

.pharmavet-motion-enabled .pharmavet-reveal--story.is-visible .pharmavet-reveal-item--text {
	filter: none;
	transform: translate3d(0, 0, 0);
}

@media (max-width: 767px) {
	.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack {
		overflow: hidden;
	}

	.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack .wp-block-column:first-child > figure.wp-block-image,
	.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack .wp-block-columns.site-container > .wp-block-column:last-child {
		position: relative;
		top: auto;
		height: clamp(390px, 115vw, 620px);
		min-height: 0;
	}

	.entry-content > .wp-block-group.has-theme-palette-7-background-color.pharmavet-story-stack .wp-block-columns.site-container > .wp-block-column:first-child {
		height: auto;
	}

	.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container {
		flex-direction: column;
		min-height: 0;
	}

	.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container > .wp-block-column {
		width: 100%;
		flex-basis: auto !important;
	}

	.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container > .wp-block-column:first-child {
		height: clamp(390px, 115vw, 620px);
	}

	.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-columns.site-container > .wp-block-column:last-child {
		padding: 3.5rem var(--global-content-edge-padding, 1.5rem) 4rem !important;
	}

	.entry-content > .wp-block-group.has-theme-palette-7-background-color .wp-block-column:last-child h2 {
		font-size: clamp(2.2rem, 12vw, 3.4rem);
	}

	.pharmavet-motion-enabled .pharmavet-reveal,
	.pharmavet-motion-enabled .pharmavet-reveal.pharmavet-reveal--left,
	.pharmavet-motion-enabled .pharmavet-reveal.pharmavet-reveal--right {
		filter: blur(4px);
		transform: translate3d(0, 38px, 0);
	}

	.pharmavet-motion-enabled .pharmavet-reveal.is-visible {
		filter: blur(0);
		transform: translate3d(0, 0, 0);
	}

	.pharmavet-motion-enabled .pharmavet-reveal-item {
		transform: translate3d(0, 28px, 0);
	}

	.pharmavet-motion-enabled .pharmavet-reveal--story .pharmavet-reveal-item--text {
		transform: translate3d(0, 30px, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pharmavet-reveal,
	.pharmavet-reveal-item {
		opacity: 1 !important;
		filter: none !important;
		transform: none !important;
		transition: none !important;
	}
}
