/*
 * Liquid Glass — Plantilla de página Home (page-templates/template-home.php)
 *
 * Reescrito para la plantilla PHP propia: ya NO depende de clases de
 * Elementor (.elementor-169, etc.) porque esta página dejó de construirse
 * con Elementor. Todo el markup (.dp-hero, .dp-why-card, .dp-scam-banner,
 * etc.) es propio, definido en template-home.php.
 *
 * ".dp-stat" y ".dp-visit" (compartidos con Nosotros) viven en
 * page-templates-base.css, no aquí.
 *
 * Depende de: liquid-glass.css (tokens/colores/tipografía) y
 * page-templates-base.css (contenedor, secciones, grillas, scroll-reveal,
 * dp-stat, dp-visit).
 * Breakpoints: móvil ≤544px, tablet ≤976px.
 */

/* --- Hero --- */
.dp-hero__inner {
	text-align: center;
	padding: 40px 24px 56px;
	/* Necesario para pintar el texto POR ENCIMA del video de fondo
	   (".dp-hero-video" es position:absolute con z-index:0 — un elemento en
	   flujo normal sin position pintaría DEBAJO de él, no encima). */
	position: relative;
	z-index: 1;
}

/*
 * --- Video de YouTube en bucle (2026-07, opcional — campo
 * "hero_video_youtube") ---
 * ".dp-hero" ya tiene position:relative (viene de ".liquid-glass-blob-bg" /
 * ".dp-pattern-*", siempre presente en el Hero) así que esta capa se ancla
 * bien. El iframe se sobredimensiona con el truco de vw/vh para cubrir todo
 * el alto/ancho del Hero sin franjas negras (aproximado — no es un recorte
 * "cover" perfecto en todas las proporciones de pantalla, pero es la técnica
 * estándar para fondos de video con YouTube).
 */
.dp-hero-video {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.dp-hero-video__frame {
	position: absolute;
	inset: 0;
}

/*
 * BUG corregido (2026-07): la API de YouTube pone su propio "width"/"height"
 * como ESTILO EN LÍNEA sobre el iframe que genera — un estilo en línea gana
 * siempre sobre cualquier regla de una hoja de estilos externa, sin importar
 * la especificidad. Por eso el video se veía chico (640×390, el tamaño por
 * defecto) en vez de cubrir todo el Hero. "!important" fuerza que ESTAS
 * reglas ganen de todas formas (además, hero-video.js ahora también pide un
 * tamaño base grande al crear el reproductor, para que dependa menos de
 * esto).
 */
.dp-hero-video__frame iframe {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 177.78vh !important;
	min-height: 56.25vw !important;
	max-width: none !important;
	transform: translate(-50%, -50%) !important;
	pointer-events: none;
}

.dp-hero-video__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55));
}

.dp-hero-video__controls {
	position: absolute;
	bottom: 16px;
	right: 16px;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--glass-border);
	box-shadow: var(--glass-shadow);
	pointer-events: auto;
}

.dp-hero-video__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: #1e293b;
	cursor: pointer;
	padding: 0;
}

.dp-hero-video__btn .dp-icon {
	width: 1rem;
	height: 1rem;
}

@media (hover: hover) and (pointer: fine) {
	.dp-hero-video__btn:hover {
		background: rgba(0, 0, 0, 0.08);
	}
}

.dp-hero-video__volume {
	width: 70px;
	accent-color: var(--brand-blue-deep, #004d93);
}

@media (max-width: 544px) {
	.dp-hero-video__controls {
		bottom: 10px;
		right: 10px;
		padding: 6px 10px;
	}

	.dp-hero-video__volume {
		width: 50px;
	}
}

.dp-hero__title {
	font-size: clamp(2rem, 5vw, 3rem);
	max-width: 18ch;
	margin: 0 auto 18px;
	line-height: 1.08;
}

.dp-hero__subtitle {
	max-width: 56ch;
	margin: 0 auto;
	font-size: 1.05rem;
	color: rgba(30, 41, 59, 0.72);
	line-height: 1.6;
}

/* --- Badges de confianza bajo los botones del hero --- */
.dp-hero__badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 20px;
	list-style: none;
	margin: 24px 0 0;
	padding: 0;
}

.dp-hero__badges li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: rgba(30, 41, 59, 0.8);
}

.dp-hero__badges .dp-icon {
	width: 1rem;
	height: 1rem;
	color: var(--brand-blue-deep, #004d93);
	flex: none;
}

/* --- Prueba social: la tarjeta del RUC lleva texto en vez de número --- */
.dp-stat--text .dp-stat__number {
	font-size: 1.1rem;
	letter-spacing: 0.01em;
}

/* --- "Por qué comprar en DiiPhone": tarjetas con ícono + título + texto --- */
.dp-why-card {
	padding: 28px 24px;
	text-align: left;
}

.dp-why-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(82, 113, 255, 0.1);
	color: var(--brand-blue-deep, #004d93);
	margin-bottom: 14px;
}

.dp-why-card__icon .dp-icon {
	width: 1.4rem;
	height: 1.4rem;
}

.dp-why-card h3 {
	font-size: 1.05rem;
	margin: 0 0 8px;
}

.dp-why-card p {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(30, 41, 59, 0.72);
	line-height: 1.55;
}

/* --- "Lo que ofrecemos": 3 bloques dp-feature apilados bajo un solo título --- */
.dp-offer-stack {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* --- "iPhones destacados" (productos reales, ver template-home.php) --- */
.dp-featured-cta {
	text-align: center;
	margin: 28px 0 0;
}

/* --- Franja de seguridad anti-estafa --- */
.dp-scam-banner {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	padding: 32px;
}

.dp-scam-banner__icon {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 138, 0, 0.12);
	color: #ff8a00;
}

.dp-scam-banner__icon .dp-icon {
	width: 1.6rem;
	height: 1.6rem;
}

.dp-scam-banner__body p {
	margin: 0 0 14px;
	color: rgba(30, 41, 59, 0.8);
	line-height: 1.6;
	max-width: 68ch;
}

.dp-scam-banner__phones {
	font-size: 0.9rem;
}

/* --- Sección 7: dos botones bajo el texto de "Visítanos" --- */
.dp-visit__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 4px;
}

/* --- Móvil --- */
@media (max-width: 544px) {
	.dp-hero__inner {
		padding: 24px 16px 40px;
	}

	.dp-scam-banner {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 24px;
	}

	.dp-visit__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.dp-visit__actions .liquid-glass-btn-pill,
	.dp-visit__actions .liquid-glass-btn-lime {
		width: 100%;
		text-align: center;
	}
}
