/**
 * Deditos Hero Manager - CSS Frontend Critical Ultra-Optimizado (v1.6.0)
 *
 * Reserva inmediata de geometría en layout (0.000 CLS guaranteed),
 * separación superior crítica nativa e inmunidad a reflows de imágenes,
 * y sistema de transición de diapositivas por opacidad (fade).
 *
 * @package Deditos_Hero
 * @version 1.6.0
 */

.deditos-hero-wrapper {
	width: min(96vw, 1900px);
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	margin-top: var(--dh-margin-top-desktop, 27px);
	aspect-ratio: var(--dh-ratio-desktop, 1920 / 850);
	display: block;
}

@media (max-width: 767px) {
	.deditos-hero-wrapper {
		margin-top: var(--dh-margin-top-mobile, 16px) !important;
		aspect-ratio: var(--dh-ratio-mobile, 800 / 900) !important;
	}
}

.deditos-hero {
	position: relative;
	width: 100%;
	height: 100%;
	aspect-ratio: var(--dh-ratio-desktop, 1920 / 850);
	border-radius: var(--dh-hero-border-radius, 24px);
	overflow: hidden;
}

@media (max-width: 767px) {
	.deditos-hero {
		aspect-ratio: var(--dh-ratio-mobile, 800 / 900) !important;
	}
}

.deditos-hero__slides {
	position: relative;
	width: 100%;
	height: 100%;
}

/* DIAPOSITIVAS: Posicionamiento superpuesto con transición de opacidad (Fade) */
.deditos-hero__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.5s ease, visibility 0.5s ease;
	z-index: 1;
}

.deditos-hero__slide--active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 2;
}

.deditos-hero__picture {
	display: block;
	width: 100%;
	height: 100%;
}

.deditos-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.deditos-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: var(--dh-overlay-bg, transparent);
	pointer-events: none;
}

/* Capa de Posicionamiento con 9 Anclajes CSS Grid */
.deditos-hero__content-layer {
	position: absolute;
	inset: 0;
	display: grid;
	box-sizing: border-box;
	z-index: 3;
	pointer-events: none;
	padding: clamp(20px, 2.5vw, 48px);
}

@media (max-width: 767px) {
	.deditos-hero__content-layer {
		padding: 16px !important;
	}
}

/* Bloque Único del Contenido (H1 + CTA) */
.deditos-hero__content {
	position: relative;
	box-sizing: border-box;
	pointer-events: auto;
	max-width: min(var(--dh-title-max-width, 520px), 100%);
	text-align: var(--dh-title-align, left);
	translate: var(--dh-offset-x-desktop, 0px) var(--dh-offset-y-desktop, 0px);
}

@media (max-width: 767px) {
	.deditos-hero__content {
		max-width: 100% !important;
		translate: var(--dh-offset-x-mobile, 0px) var(--dh-offset-y-mobile, 0px) !important;
	}

	.deditos-hero__title {
		font-size: var(--dh-title-mobile-size, 26px) !important;
	}
}

/* MAPEO DE LOS 9 ANCLAJES CSS GRID (DESKTOP) */
.deditos-hero__content-layer[data-anchor-desktop="top-left"] .deditos-hero__content { align-self: start; justify-self: start; }
.deditos-hero__content-layer[data-anchor-desktop="top-center"] .deditos-hero__content { align-self: start; justify-self: center; }
.deditos-hero__content-layer[data-anchor-desktop="top-right"] .deditos-hero__content { align-self: start; justify-self: end; }

.deditos-hero__content-layer[data-anchor-desktop="center-left"] .deditos-hero__content { align-self: center; justify-self: start; }
.deditos-hero__content-layer[data-anchor-desktop="center"] .deditos-hero__content { align-self: center; justify-self: center; }
.deditos-hero__content-layer[data-anchor-desktop="center-right"] .deditos-hero__content { align-self: center; justify-self: end; }

.deditos-hero__content-layer[data-anchor-desktop="bottom-left"] .deditos-hero__content { align-self: end; justify-self: start; }
.deditos-hero__content-layer[data-anchor-desktop="bottom-center"] .deditos-hero__content { align-self: end; justify-self: center; }
.deditos-hero__content-layer[data-anchor-desktop="bottom-right"] .deditos-hero__content { align-self: end; justify-self: end; }

/* MAPEO DE LOS 9 ANCLAJES CSS GRID (MOBILE) */
@media (max-width: 767px) {
	.deditos-hero__content-layer[data-anchor-mobile="top-left"] .deditos-hero__content { align-self: start !important; justify-self: start !important; }
	.deditos-hero__content-layer[data-anchor-mobile="top-center"] .deditos-hero__content { align-self: start !important; justify-self: center !important; }
	.deditos-hero__content-layer[data-anchor-mobile="top-right"] .deditos-hero__content { align-self: start !important; justify-self: end !important; }

	.deditos-hero__content-layer[data-anchor-mobile="center-left"] .deditos-hero__content { align-self: center !important; justify-self: start !important; }
	.deditos-hero__content-layer[data-anchor-mobile="center"] .deditos-hero__content { align-self: center !important; justify-self: center !important; }
	.deditos-hero__content-layer[data-anchor-mobile="center-right"] .deditos-hero__content { align-self: center !important; justify-self: end !important; }

	.deditos-hero__content-layer[data-anchor-mobile="bottom-left"] .deditos-hero__content { align-self: end !important; justify-self: start !important; }
	.deditos-hero__content-layer[data-anchor-mobile="bottom-center"] .deditos-hero__content { align-self: end !important; justify-self: center !important; }
	.deditos-hero__content-layer[data-anchor-mobile="bottom-right"] .deditos-hero__content { align-self: end !important; justify-self: end !important; }
}

.deditos-hero__title {
	font-family: inherit;
	font-size: var(--dh-title-desktop-size, 35px);
	font-weight: var(--dh-title-weight, 800);
	color: var(--dh-title-color, #ffffff);
	line-height: var(--dh-title-line-height, 1.2);
	text-shadow: var(--dh-title-shadow, none);
	margin: 0 0 14px 0;
	word-break: break-word;
}

/* BOTÓN CTA CON ALTA ESPECIFICIDAD PROTEGIDO ANTE REGLAS DE TEMA/GENERATEPRESS */
.deditos-hero .deditos-hero__btn,
.deditos-hero .deditos-hero__btn:link,
.deditos-hero .deditos-hero__btn:visited,
.deditos-hero .deditos-hero__btn:hover,
.deditos-hero .deditos-hero__btn:focus,
.deditos-hero .deditos-hero__btn:active {
	display: inline-block;
	width: auto;
	max-width: 100%;
	white-space: nowrap;
	box-sizing: border-box;
	background-color: var(--dh-cta-bg, #fb8e48);
	color: var(--dh-cta-color, #ffffff) !important;
	font-size: var(--dh-cta-font-size, 16px);
	font-weight: var(--dh-cta-font-weight, 700);
	padding-block: var(--dh-cta-padding-v, 14px);
	padding-inline: clamp(14px, 4vw, var(--dh-cta-padding-h, 35px));
	border-radius: var(--dh-cta-border-radius, 999px);
	text-decoration: none !important;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.deditos-hero .deditos-hero__btn:hover,
.deditos-hero .deditos-hero__btn:focus {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

/* Controles de Slider en Frontend */
.deditos-hero__controls {
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: none;
}

.deditos-hero__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.4);
	color: #ffffff;
	border: none;
	cursor: pointer;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.deditos-hero__arrow:hover {
	background: rgba(0, 0, 0, 0.7);
}

.deditos-hero__arrow--prev { left: 16px; }
.deditos-hero__arrow--next { right: 16px; }

.deditos-hero__playpause-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 5;
	pointer-events: auto;
	background: rgba(0, 0, 0, 0.4);
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 4px 10px;
	font-size: 11px;
	cursor: pointer;
}

.deditos-hero__dots {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 5;
	pointer-events: auto;
}

.deditos-hero__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.deditos-hero__dot--active {
	background: #ffffff;
	transform: scale(1.2);
}
