/**
 * Bloque 4 Feature Showcase
 * 
 * Grid 2x2 mostrando 4 características con título, subtítulo e imagen con fade.
 * 
 * @package Vitruve_Custom_Theme
 */

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

/**
 * CONTENEDOR PRINCIPAL
 */
.vitruve-four-feature-showcase {
	width: 100%;
	padding: var(--space-16) 0;
	background: transparent;
	position: relative;
}

@media (min-width: 768px) {
	.vitruve-four-feature-showcase {
		padding: var(--space-20) 0;
	}
}

/**
 * CONTAINER INTERNO
 */
.vitruve-four-feature-showcase__container {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 var(--container-padding);
}

@media (min-width: 1024px) {
	.vitruve-four-feature-showcase__container {
		padding: 0 var(--container-padding-lg);
	}
}

/**
 * TÍTULO DE SECCIÓN (ALINEADO A LA IZQUIERDA)
 */
.vitruve-four-feature-showcase__section-title {
	font-family: var(--font-heading);
	font-size: var(--text-5xl);
	font-weight: var(--font-bold);
	line-height: 1.2;
	color: var(--text-primary);
	text-align: left;
	margin: 0 0 var(--space-12);
}

@media (min-width: 768px) {
	.vitruve-four-feature-showcase__section-title {
		font-size: var(--text-4xl);
		margin-bottom: var(--space-16);
	}
}

@media (min-width: 1024px) {
	.vitruve-four-feature-showcase__section-title {
		font-size: var(--text-5xl);
	}
}

/**
 * GRID 2x2 (DESKTOP) - 1 COLUMNA (MOBILE)
 */
.vitruve-four-feature-showcase__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8);
	width: 100%;
}

@media (min-width: 768px) {
	.vitruve-four-feature-showcase__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0;
	}
}

/**
 * CELDA INDIVIDUAL
 */
.vitruve-four-feature-showcase__cell {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
	text-align: left;
}

/**
 * PADDING EN CELDAS (DESKTOP SOLAMENTE)
 */
@media (min-width: 768px) {
	.vitruve-four-feature-showcase__cell {
		padding: var(--space-10);
	}

	/**
	 * LÍNEAS SEPARATORIAS SUTILES
	 * Bordes derecho para columna izquierda (celdas 1 y 3)
	 */
	.vitruve-four-feature-showcase__cell:nth-child(odd) {
		border-right: 1px solid rgba(255, 255, 255, 0.1);
	}

	/**
	 * Bordes inferior para fila superior (celdas 1 y 2)
	 */
	.vitruve-four-feature-showcase__cell:nth-child(1),
	.vitruve-four-feature-showcase__cell:nth-child(2) {
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}
}

/**
 * TÍTULO DE LA CELDA (BLANCO, BOLD, ALINEADO IZQUIERDA)
 */
.vitruve-four-feature-showcase__title {
	font-family: var(--font-heading);
	font-size: var(--text-base);
	font-weight: var(--font-bold);
	line-height: 1.3;
	color: var(--text-primary);
	margin: 0;
	width: 100%;
}

@media (min-width: 768px) {
	.vitruve-four-feature-showcase__title {
		font-size: var(--text-base);
	}
}

/**
 * SUBTÍTULO DE LA CELDA (GRIS, ALINEADO IZQUIERDA)
 */
.vitruve-four-feature-showcase__subtitle {
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: 1.6;
	color: var(--text-muted);
	margin: 0;
	width: 100%;
}

@media (min-width: 768px) {
	.vitruve-four-feature-showcase__subtitle {
		font-size: var(--text-lg);
	}
}

/**
 * WRAPPER DE LA IMAGEN (CON FADE INFERIOR Y DERECHO)
 */
.vitruve-four-feature-showcase__image-wrapper {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius-xl);
	overflow: hidden;
	background-color: transparent;
	position: relative;
	margin: 10px;
}

/**
 * FADE A CHARCOAL - INFERIOR Y DERECHO
 * Gradientes superpuestos sin sombras
 */
.vitruve-four-feature-showcase__image-wrapper::after {
	content: '';
	position: absolute;
	inset: 0;
	background: 
		linear-gradient(
			to left,
			#100f11 0%,
			transparent 25%
		),
		linear-gradient(
			to top,
			#100f11 0%,
			transparent 25%
		);
	pointer-events: none;
	z-index: 1;
}

/**
 * IMAGEN (OCUPA TODO EL ANCHO, CENTRADA)
 * 
 * IMPORTANTE: Sobrescribir cualquier margen que venga de estilos globales
 * de WordPress o Tailwind Typography (margin-top/margin-bottom automáticos)
 */
.vitruve-four-feature-showcase__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: relative;
	z-index: 0;
	margin: 0 !important; /* Forzar sin márgenes - sobrescribe estilos globales */
	padding: 0 !important; /* Por si acaso también viene padding */
}

/**
 * ========================================
 * RESPONSIVE - TABLETS (max-width: 1024px)
 * ========================================
 */
@media (max-width: 1024px) {
	.vitruve-four-feature-showcase {
		padding: var(--space-14) 0;
	}

	.vitruve-four-feature-showcase__section-title {
		font-size: var(--text-3xl);
		margin-bottom: var(--space-10);
	}

	.vitruve-four-feature-showcase__title {
		font-size: var(--text-base);
	}

	.vitruve-four-feature-showcase__subtitle {
		font-size: var(--text-base);
	}
}

/**
 * ========================================
 * RESPONSIVE - MOBILE (max-width: 768px)
 * ========================================
 */
@media (max-width: 768px) {
	.vitruve-four-feature-showcase {
		padding: var(--space-12) 0;
	}

	.vitruve-four-feature-showcase__section-title {
		font-size: var(--text-2xl);
		margin-bottom: var(--space-8);
	}

	.vitruve-four-feature-showcase__grid {
		gap: var(--space-6);
	}

	.vitruve-four-feature-showcase__cell {
		gap: var(--space-3);
	}

	.vitruve-four-feature-showcase__title {
		font-size: var(--text-base);
	}

	.vitruve-four-feature-showcase__subtitle {
		font-size: var(--text-sm);
	}

	.vitruve-four-feature-showcase__image-wrapper {
		border-radius: var(--radius-lg);
	}
}

/**
 * ========================================
 * ACCESIBILIDAD
 * ========================================
 */
@media (prefers-reduced-motion: reduce) {
	.vitruve-four-feature-showcase__image {
		transition: none;
	}
}

/**
 * ========================================
 * ALINEACIÓN DEL BLOQUE (GUTENBERG)
 * ========================================
 */
.vitruve-four-feature-showcase.alignwide {
	width: 100%;
	max-width: var(--container-max-width);
}

.vitruve-four-feature-showcase.alignfull {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.vitruve-four-feature-showcase.alignfull .vitruve-four-feature-showcase__container {
	max-width: var(--container-max-width);
	margin: 0 auto;
}

/**
 * ========================================
 * ACCIONES (BOTONES CTA)
 * ========================================
 */
.vitruve-four-feature-showcase__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	justify-content: center;
	align-items: center;
	margin-top: var(--space-12);
}

.vitruve-four-feature-showcase__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-lg);
	padding: var(--space-3) 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
 */
.vitruve-four-feature-showcase__cta--secondary {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: var(--text-primary);
}

.vitruve-four-feature-showcase__cta--secondary:hover,
.vitruve-four-feature-showcase__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-four-feature-showcase__cta--primary {
	background: var(--color-primary);
	border: 2px solid var(--color-primary);
	color: var(--color-white);
}

.vitruve-four-feature-showcase__cta--primary:hover,
.vitruve-four-feature-showcase__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-four-feature-showcase__cta:focus-visible {
	outline: 3px solid rgba(102, 68, 255, 0.5);
	outline-offset: 3px;
}/**
 * RESPONSIVE - TABLETS (CTAs)
 */
@media (max-width: 1024px) {
	.vitruve-four-feature-showcase__actions {
		margin-top: var(--space-10);
	}

	.vitruve-four-feature-showcase__cta {
		padding: var(--space-3) var(--space-5);
		font-size: var(--text-sm);
	}
}

/**
 * RESPONSIVE - MOBILE (CTAs)
 */
@media (max-width: 640px) {
	.vitruve-four-feature-showcase__actions {
		flex-direction: column;
		width: 100%;
		gap: var(--space-3);
		margin-top: var(--space-8);
	}

	.vitruve-four-feature-showcase__cta {
		width: 100%;
		max-width: 300px;
		padding: var(--space-3) var(--space-5);
		font-size: var(--text-sm);
	}
}/**
 * REDUCCIÓN DE MOVIMIENTO (ACCESIBILIDAD - CTAs)
 */
@media (prefers-reduced-motion: reduce) {
	.vitruve-four-feature-showcase__cta {
		transition: none;
	}

	.vitruve-four-feature-showcase__cta:hover,
	.vitruve-four-feature-showcase__cta:focus-visible {
		transform: none;
	}
}