/**
 * Bloque Hero Solutions
 * 
 * Hero section full-screen con imagen de fondo, overlay y contenido centrado.
 * Incluye título en Sofia Sans extrabold, subtítulo en DM Sans y CTAs.
 * 
 * @package Vitruve_Custom_Theme
 */

@import '../styles/design-tokens.css';

/**
 * CONTENEDOR PRINCIPAL
 * Full viewport height, position relative para los layers
 * Técnica: width 100vw + negative margin para salir del padding del contenedor padre
 */
.vitruve-hero-solutions {
	position: relative;
	width: 100vw;
	height: 100vh;
	min-height: 600px;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-top: 0 !important;
	margin-bottom: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--color-neutral-900);
}

/* Eliminar cualquier espacio adicional si es el primer elemento */
.vitruve-hero-solutions:first-child {
	margin-top: 0 !important;
}

/* Eliminar margin del contenedor padre si el hero es el primer hijo */
main .vitruve-hero-solutions:first-child,
.site-main .vitruve-hero-solutions:first-child,
.entry-content > .vitruve-hero-solutions:first-child {
	margin-top: 0 !important;
}

/* Eliminar padding superior de contenedores cuando el hero es el primer elemento */
.vb-container:has(> .vitruve-hero-solutions:first-child),
.entry-content:has(> .vitruve-hero-solutions:first-child) {
	padding-top: 0 !important;
}

/* Si el contenedor padre tiene padding, el hero lo compensa */
main:has(> .vb-container > .vitruve-hero-solutions:first-child),
.site-main:has(> .vb-container > .vitruve-hero-solutions:first-child) {
	padding-top: 0 !important;
}

/**
 * IMAGE BACKGROUND
 * z-index: 1 (capa más baja)
 * Ocupa todo el ancho de la pantalla (100vw)
 */
.vitruve-hero-solutions__image-wrapper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	overflow: hidden;
	margin: 0 !important;
	padding: 0 !important;
}

.vitruve-hero-solutions__image {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
	object-fit: cover;
	object-position: center;
	margin: 0 !important;
	padding: 0 !important;
	display: block;
}

/**
 * OVERLAY
 * z-index: 2 (capa intermedia, encima de la imagen)
 */
.vitruve-hero-solutions__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.55);
	z-index: 2;
	pointer-events: none;
	margin: 0 !important;
	padding: 0 !important;
}

/**
 * CONTENIDO
 * z-index: 3 (capa superior)
 */
.vitruve-hero-solutions__content {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: var(--container-max-width);
	padding: 0 var(--container-padding-lg);
	text-align: left;
}

.vitruve-hero-solutions__inner {
	max-width: 900px;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-8);
}

/**
 * BADGE
 * Icono + texto encima del título
 */
.vitruve-hero-solutions__badge {
	display: inline-flex;
	align-items: center;
	margin-bottom: var(--space-3);
	gap: var(--space-2);
}

.vitruve-hero-solutions__badge-icon {
	width: 20px;
	height: 20px;
	color: var(--text-secondary);
	opacity: 0.8;
	object-fit: contain;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0 !important;
}

.vitruve-hero-solutions__badge-text {
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/**
 * TÍTULO PRINCIPAL
 * Sofia Sans Extra Bold
 */
.vitruve-hero-solutions__title {
	font-family: var(--font-heading);
	font-size: clamp(2.75rem, 7vw, 5rem);
	font-weight: var(--font-extrabold);
	line-height: 1.1;
	color: var(--text-primary);
	margin: 0;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

/**
 * SUBTÍTULO / TAGLINE
 * DM Sans Regular/Medium
 */
.vitruve-hero-solutions__subtitle {
	font-family: var(--font-sans);
	font-size: clamp(1rem, 2.5vw, 1.375rem);
	font-weight: var(--font-normal);
	line-height: 1.6;
	color: var(--text-secondary);
	margin: 0;
	text-wrap: balance;
}

/**
 * ACCIONES (BOTONES CTA)
 */
.vitruve-hero-solutions__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	justify-content: flex-start;
	align-items: center;
}

.vitruve-hero-solutions__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-lg);
	padding: var(--space-2) var(--space-6);
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: var(--font-semibold);
	text-decoration: none;
	transition:
		transform 0.2s ease,
		background 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease;
	cursor: pointer;
	white-space: nowrap;
}

/**
 * CTA SECUNDARIO
 * Outline style, similar al header
 */
.vitruve-hero-solutions__cta--secondary {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: var(--text-primary);
}

.vitruve-hero-solutions__cta--secondary:hover,
.vitruve-hero-solutions__cta--secondary:focus-visible {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/**
 * CTA PRIMARIO
 * Filled style con color primary
 */
.vitruve-hero-solutions__cta--primary {
	background: var(--color-primary);
	border: 2px solid var(--color-primary);
	color: var(--color-white);
}

.vitruve-hero-solutions__cta--primary:hover,
.vitruve-hero-solutions__cta--primary:focus-visible {
	transform: translateY(-2px);
	background: var(--color-primary-600);
	border-color: var(--color-primary-600);
	box-shadow: 0 4px 20px rgba(102, 68, 255, 0.4);
}

/**
 * FOCUS VISIBLE (ACCESIBILIDAD)
 */
.vitruve-hero-solutions__cta:focus-visible {
	outline: 3px solid rgba(102, 68, 255, 0.5);
	outline-offset: 3px;
}

/**
 * TEXTO CON GRADIENTE
 * Clase para aplicar gradiente a palabras específicas del título
 * Uso: <span class="gradient-text">palabra</span>
 * 
 * COLORES VITRUVE:
 * - Purple: #6644FF (var(--color-primary))
 * - Turquoise: #00FFE5 (var(--color-secondary))
 * - Yellow: #FFE500
 * - Lila: #909FFF (var(--color-primary-400))
 * - Charcoal: #100F11 (var(--color-neutral-800))
 * - White: #FFFFFF (var(--color-white))
 */

/* Gradiente Signature Vitruve: Purple → Turquoise */
.vitruve-hero-solutions__title .gradient-text {
	background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	display: inline;
}

/* Variante primary: Purple → Lila */
.vitruve-hero-solutions__title .gradient-text--primary {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-400));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	display: inline;
}

/* Variante secondary: Turquoise → Yellow */
.vitruve-hero-solutions__title .gradient-text--secondary {
	background: linear-gradient(135deg, var(--color-secondary), #FFE500);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	display: inline;
}

/* Variante accent: Yellow → Purple */
.vitruve-hero-solutions__title .gradient-text--accent {
	background: linear-gradient(135deg, #FFE500, var(--color-primary));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	display: inline;
}

/* Variante white: White → Turquoise */
.vitruve-hero-solutions__title .gradient-text--white {
	background: linear-gradient(135deg, var(--color-white), var(--color-secondary));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	display: inline;
}

/**
 * RESPONSIVE - TABLETS
 */
@media (max-width: 1024px) {
	.vitruve-hero-solutions {
		min-height: 500px;
	}

	.vitruve-hero-solutions__content {
		padding: 0 var(--container-padding-lg);
	}

	.vitruve-hero-solutions__inner {
		gap: var(--space-6);
	}

	.vitruve-hero-solutions__title {
		font-size: clamp(2rem, 5vw, 3.5rem);
	}

	.vitruve-hero-solutions__subtitle {
		font-size: clamp(0.95rem, 2vw, 1.25rem);
	}

	.vitruve-hero-solutions__cta {
		padding: var(--space-3) var(--space-6);
		font-size: var(--text-sm);
	}
}

/**
 * RESPONSIVE - MOBILE
 */
@media (max-width: 640px) {
	.vitruve-hero-solutions {
		min-height: 500px;
		height: 100svh; /* Safari mobile viewport fix */
	}

	.vitruve-hero-solutions__content {
		padding: 0 var(--space-5);
	}

	.vitruve-hero-solutions__inner {
		gap: var(--space-5);
	}

	.vitruve-hero-solutions__title {
		font-size: clamp(1.75rem, 8vw, 2.5rem);
		letter-spacing: -0.01em;
	}

	.vitruve-hero-solutions__subtitle {
		font-size: clamp(0.9rem, 4vw, 1.125rem);
		line-height: 1.5;
	}

	.vitruve-hero-solutions__actions {
		flex-direction: column;
		width: 100%;
		gap: var(--space-3);
	}

	.vitruve-hero-solutions__cta {
		width: 100%;
		max-width: 300px;
		padding: var(--space-3) var(--space-5);
		font-size: var(--text-sm);
	}

	/* Ajuste del overlay para mejor legibilidad en mobile */
	.vitruve-hero-solutions__overlay {
		background-color: rgba(0, 0, 0, 0.65);
	}
}

/**
 * ANIMACIÓN DE ENTRADA (OPCIONAL)
 * Se puede activar con JS o CSS animation
 */
@media (prefers-reduced-motion: no-preference) {
	.vitruve-hero-solutions__badge {
		animation: fadeInUp 0.6s ease-out backwards;
	}

	.vitruve-hero-solutions__title {
		animation: fadeInUp 0.8s ease-out 0.1s backwards;
	}

	.vitruve-hero-solutions__subtitle {
		animation-delay: 0.2s;
		animation: fadeInUp 0.8s ease-out 0.2s backwards;
	}

	.vitruve-hero-solutions__actions {
		animation-delay: 0.4s;
		animation: fadeInUp 0.8s ease-out 0.3s backwards;
	}

	@keyframes fadeInUp {
		from {
			opacity: 0;
			transform: translateY(20px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

/**
 * REDUCCIÓN DE MOVIMIENTO (ACCESIBILIDAD)
 */
@media (prefers-reduced-motion: reduce) {
	.vitruve-hero-solutions__cta {
		transition: none;
	}

	.vitruve-hero-solutions__cta:hover,
	.vitruve-hero-solutions__cta:focus-visible {
		transform: none;
	}
}

