/**
 * Hero Video Block Styles
 * Estilos para el bloque hero con video
 */

.block-hero-video {
	position: relative;
	min-height: 100dvh !important;
	height: 100dvh !important;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #0f0f0f; /* $theme-background */
	overflow: hidden;
}

.hero-video-background {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	transition: opacity 0.5s ease-out;
}

.hero-video-player {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: opacity 0.5s ease-out;
}

.hero-video--original {
	z-index: 1;
}

.hero-video--project {
	transition: opacity 0.5s ease-out;
	z-index: 3; /* Por encima del overlay (z-index: 2) */
}

.hero-video-fallback {
	width: 100%;
	height: 100%;
	background: #0f0f0f; /* $theme-background */
}

.hero-video-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #0f0f0f; /* $theme-background */
	z-index: 2;
}

.block-hero-video .container {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem;
}

/* .hero-video-content {
	animation: fadeInUp 1s ease-out;
} */

.hero-video-title {
	font-size: clamp(2.5rem, 8vw, 4.5rem);
	font-weight: 700;
	line-height: 1.1;
	margin: 0 0 1rem 0;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-video-subtitle {
	font-size: clamp(1.1rem, 3vw, 1.5rem);
	font-weight: 300;
	line-height: 1.4;
	margin: 0 0 2rem 0;
	opacity: 0.9;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-video-actions {
	margin-top: 2rem;
}

.hero-video-button {
	display: inline-block;
	padding: 1rem 2.5rem;
	background: linear-gradient(45deg, #ff6b6b, #ee5a24);
	color: white;
	text-decoration: none;
	border-radius: 50px;
	font-weight: 600;
	font-size: 1.1rem;
	text-transform: uppercase;
	/* letter-spacing: 0.5px; */
	transition: all 0.3s ease;
	border: 2px solid transparent;
	box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
	cursor: pointer;
}

.hero-video-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
	color: white;
	text-decoration: none;
}

.hero-video-button:focus {
	outline: 2px solid #fff;
	outline-offset: 4px;
}

.hero-video-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	transition: opacity 0.3s ease;
}

.hero-video-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top: 3px solid #fff;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.hero-video--loaded .hero-video-loading {
	opacity: 0;
	pointer-events: none;
}

.hero-video--error .hero-video-loading {
	display: none;
}

/* Animaciones */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.block-hero-video {
		min-height: 100dvh;
		height: 100dvh;
	}

	.block-hero-video .container {
		padding: 1.5rem;
	}

	.hero-video-title {
		margin-bottom: 0.75rem;
	}

	.hero-video-subtitle {
		margin-bottom: 1.5rem;
	}

	.hero-video-button {
		padding: 0.875rem 2rem;
		font-size: 1rem;
	}

	/* Ocultar animación de video en mobile */
	.hero-video-background {
		display: none;
	}
}

@media (max-width: 480px) {
	.block-hero-video {
		min-height: 100dvh;
		height: 100dvh;
	}

	.block-hero-video .container {
		padding: 1rem;
	}

	.hero-video-button {
		padding: 0.75rem 1.5rem;
		font-size: 0.9rem;
	}
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
	.hero-video-content {
		animation: none;
	}

	.hero-video-button:hover {
		transform: none;
	}

	.hero-video-spinner {
		animation: none;
	}
}

/* Alto contraste */
@media (prefers-contrast: high) {
	.hero-video-overlay {
		background-color: #0f0f0f; /* $theme-background */
	}

	.hero-video-button {
		border: 2px solid #fff;
	}
}

/* Estilos específicos del editor */
.libertacreative-hero-video-editor .block-hero-video {
	min-height: 400px;
	border: 2px dashed rgba(0, 0, 0, 0.1);
}

.libertacreative-hero-video-editor .block-hero-video:hover {
	border-color: rgba(0, 0, 0, 0.3);
}

/* Estilos para la lista de proyectos recientes */
.hero-video-projects {
	/* position: absolute; */
	bottom: 2rem;
	left: 2rem;
	z-index: 4;
	/* animation: fadeInLeft 1s ease-out 0.5s both; */
	mix-blend-mode: difference;
}

.hero-video-projects-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hero-video-project-item {
	transition: opacity 0.3s ease;
}

.hero-video-project-link {
	display: inline;
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	font-size: 32px; /* Mismo tamaño que título de proyecto individual */
	font-weight: 400;
	transition: all 0.3s ease;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-video-project-link:hover {
	color: rgba(255, 255, 255, 1);
	text-decoration: none;
	transform: translateY(-1px);
}

.hero-video-project-name {
	font-weight: 400;
	text-transform: uppercase;
	/* letter-spacing: 0.02em; */
}

.hero-video-project-tag {
	font-size: 8px;
	color: rgba(255, 255, 255, 0.7);
	font-weight: 300;
	text-transform: uppercase;
	/* letter-spacing: 0.5px; */
}

/* Animación de aparición desde la izquierda */
@keyframes fadeInLeft {
	from {
		opacity: 0;
		transform: translateX(-30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Responsive para proyectos */
@media (min-width: 768px) {
	.hero-video-project-link {
		font-size: 48px; /* Mismo tamaño que título de proyecto individual en desktop */
	}

	.hero-video-project-tag {
		font-size: 12px; /* Tamaño proporcional para desktop */
	}
}

@media (max-width: 768px) {
	.hero-video-projects {
		bottom: 1.5rem;
		left: 1.5rem;
	}

	.hero-video-project-link {
		padding: 0.4rem 0;
	}

	.hero-video-project-tag {
		font-size: 6px;
	}
}

@media (max-width: 480px) {
	.hero-video-projects {
		bottom: 1rem;
		left: 1rem;
	}

	.hero-video-project-link {
		padding: 0.3rem 0;
	}

	.hero-video-project-tag {
		font-size: 5px;
	}
}

/* Ocultar proyectos en pantallas muy pequeñas o en modo landscape móvil */
@media (max-width: 480px) and (orientation: landscape) {
	.hero-video-projects {
		display: none;
	}
}

/* Accesibilidad para proyectos */
@media (prefers-reduced-motion: reduce) {
	.hero-video-projects {
		animation: none;
	}

	.hero-video-project-link:hover {
		transform: none;
	}
}

/* Alto contraste para proyectos */
@media (prefers-contrast: high) {
	.hero-video-project-link {
		color: #fff;
	}

	.hero-video-project-link:hover {
		color: #fff;
	}

	.hero-video-project-tag {
		color: rgba(255, 255, 255, 0.8);
	}
}
