/**
 * Estilos de los bloques de inicio: hero con resplandores, tarjetas de datos, filosofía en 3 pasos,
 * proceso con línea de tiempo y subrayado animado en enlaces.
 * Paleta de la marca: marfil, piedra, tinta y cobre · Instrument Serif y DM Sans.
 *
 * Autora: Ana Camila García Domínguez
 */

/* =========================================================
   Hero: resplandores cálidos sutiles y acento en cursiva
   ========================================================= */
.cg-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.cg-hero::before,
.cg-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(70px);
}

.cg-hero::before {
	top: -18%;
	left: -10%;
	width: 52vw;
	max-width: 760px;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(217, 138, 99, 0.28), rgba(217, 138, 99, 0) 68%);
	animation: cg-resplandor 18s ease-in-out infinite alternate;
}

.cg-hero::after {
	right: -12%;
	bottom: -30%;
	width: 46vw;
	max-width: 680px;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(164, 83, 47, 0.18), rgba(164, 83, 47, 0) 70%);
	animation: cg-resplandor 22s ease-in-out infinite alternate-reverse;
}

@keyframes cg-resplandor {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to { transform: translate3d(4%, 6%, 0) scale(1.08); }
}

/* Acento en cursiva (palabra destacada en cobre). */
.cg-hero .elementor-heading-title em,
.cg-acento {
	font-style: italic;
	color: var(--cg-cobre, #a4532f);
}

/* =========================================================
   Tarjetas de datos del hero
   ========================================================= */
.cg-datos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cg-datos .cg-dato {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 16px 18px;
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid var(--cg-piedra, #e6dfd4);
	border-radius: 12px;
	backdrop-filter: blur(6px);
	transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.2, 1), box-shadow 0.5s cubic-bezier(0.22, 0.7, 0.2, 1), border-color 0.4s ease;
}

.cg-datos .cg-dato::before {
	content: none;
}

.cg-dato__rotulo {
	color: var(--cg-cobre, #a4532f);
	font-family: var(--cg-fuente-texto);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.cg-dato__valor {
	color: var(--cg-tinta, #1c1b19);
	font-family: var(--cg-fuente-titulos);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.15;
}

.cg-dato__nota {
	color: var(--cg-gris, #6b6359);
	font-family: var(--cg-fuente-texto);
	font-size: 13px;
	line-height: 1.4;
}

.cg-datos .cg-dato:hover {
	transform: translate3d(0, -4px, 0);
	box-shadow: 0 18px 36px -26px rgba(28, 27, 25, 0.4);
	border-color: var(--cg-cobre-claro, #d98a63);
}

/* =========================================================
   Encabezados de sección (mismo estilo que los de Elementor)
   ========================================================= */
.cg-encabezado-seccion {
	max-width: 720px;
	margin: 0 0 56px;
}

.cg-encabezado-seccion .cg-rotulo {
	margin: 0 0 18px;
	color: var(--cg-cobre, #a4532f);
	font-family: var(--cg-fuente-texto);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2.4px;
	text-transform: uppercase;
}

.cg-encabezado-seccion .cg-titulo-seccion {
	margin: 0 0 18px;
	color: var(--cg-tinta, #1c1b19);
	font-family: var(--cg-fuente-titulos);
	font-size: clamp(38px, 5vw, 56px);
	font-weight: 400;
	letter-spacing: -0.5px;
	line-height: 1.05;
}

.cg-encabezado-seccion .cg-titulo-seccion em {
	color: var(--cg-cobre, #a4532f);
	font-style: italic;
}

.cg-encabezado-seccion .cg-texto-seccion {
	margin: 0;
	color: var(--cg-gris, #6b6359);
	font-family: var(--cg-fuente-texto);
	font-size: 18px;
	line-height: 1.7;
}

.cg-encabezado-seccion--oscuro .cg-rotulo,
.cg-encabezado-seccion--oscuro .cg-titulo-seccion em {
	color: var(--cg-cobre-claro, #d98a63);
}

.cg-encabezado-seccion--oscuro .cg-titulo-seccion {
	color: var(--cg-marfil, #f6f2ec);
}

.cg-encabezado-seccion--oscuro .cg-texto-seccion {
	color: #c9c1b5;
}

/* =========================================================
   Filosofía en 3 pasos (sobre fondo tinta)
   ========================================================= */
.cg-filosofia__pasos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.cg-filosofia .cg-paso {
	position: relative;
	margin: 0;
	padding: 36px 32px 34px;
	background: rgba(246, 242, 236, 0.04);
	border: 1px solid rgba(246, 242, 236, 0.14);
	border-radius: 14px;
	transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.2, 1), border-color 0.4s ease, background-color 0.4s ease;
}

.cg-filosofia .cg-paso::before {
	content: none;
}

.cg-filosofia .cg-paso:hover {
	transform: translate3d(0, -6px, 0);
	border-color: var(--cg-cobre-claro, #d98a63);
	background: rgba(246, 242, 236, 0.07);
}

.cg-paso__numero {
	display: block;
	margin-bottom: 28px;
	color: var(--cg-cobre-claro, #d98a63);
	font-family: var(--cg-fuente-titulos);
	font-size: 64px;
	font-style: italic;
	line-height: 0.9;
}

.cg-filosofia .cg-paso__titulo {
	margin: 0 0 12px;
	color: var(--cg-marfil, #f6f2ec);
	font-family: var(--cg-fuente-titulos);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.15;
}

.cg-filosofia .cg-paso__texto {
	margin: 0;
	color: #c9c1b5;
	font-family: var(--cg-fuente-texto);
	font-size: 16px;
	line-height: 1.65;
}

/* =========================================================
   Proceso: línea de tiempo horizontal con nodos
   ========================================================= */
.cg-proceso__linea-tiempo {
	position: relative;
}

.cg-proceso__linea {
	position: absolute;
	top: 27px;
	left: 28px;
	/* Del centro del primer nodo al centro del último: 3 columnas + 3 espacios de 28 px. */
	width: calc(3 * ((100% - 84px) / 4 + 28px));
	height: 1px;
	background: linear-gradient(90deg, var(--cg-cobre, #a4532f), var(--cg-cobre-claro, #d98a63));
}

.cg-proceso__etapas {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cg-proceso .cg-etapa {
	margin: 0;
	padding: 0;
}

.cg-proceso .cg-etapa::before {
	content: none;
}

.cg-etapa__nodo {
	position: relative;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-bottom: 28px;
	background: var(--cg-marfil, #f6f2ec);
	border: 1px solid var(--cg-cobre, #a4532f);
	border-radius: 50%;
	color: var(--cg-cobre, #a4532f);
	font-family: var(--cg-fuente-titulos);
	font-size: 22px;
	font-style: italic;
	transition: background-color 0.4s ease, color 0.4s ease, transform 0.5s cubic-bezier(0.22, 0.7, 0.2, 1), box-shadow 0.5s ease;
}

/* Anillo exterior que marca el nodo. */
.cg-etapa__nodo::after {
	content: "";
	position: absolute;
	inset: -7px;
	border: 1px solid rgba(164, 83, 47, 0.25);
	border-radius: 50%;
	transition: inset 0.5s cubic-bezier(0.22, 0.7, 0.2, 1), border-color 0.4s ease;
}

.cg-etapa:hover .cg-etapa__nodo {
	background: var(--cg-cobre, #a4532f);
	color: var(--cg-marfil, #f6f2ec);
	transform: scale(1.06);
	box-shadow: 0 12px 26px -14px rgba(164, 83, 47, 0.7);
}

.cg-etapa:hover .cg-etapa__nodo::after {
	inset: -11px;
	border-color: rgba(164, 83, 47, 0.45);
}

.cg-proceso .cg-etapa__titulo {
	margin: 0 0 10px;
	color: var(--cg-tinta, #1c1b19);
	font-family: var(--cg-fuente-titulos);
	font-size: 26px;
	font-weight: 400;
	line-height: 1.15;
}

.cg-proceso .cg-etapa__texto {
	margin: 0;
	color: var(--cg-gris, #6b6359);
	font-family: var(--cg-fuente-texto);
	font-size: 16px;
	line-height: 1.65;
}

/* =========================================================
   Subrayado animado en enlaces de texto
   ========================================================= */
.elementor-widget-text-editor a,
.cg-pie__contenido a,
.cg-enlace {
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size 0.45s cubic-bezier(0.22, 0.7, 0.2, 1), color 0.3s ease;
}

.elementor-widget-text-editor a:hover,
.elementor-widget-text-editor a:focus-visible,
.cg-pie__contenido a:hover,
.cg-enlace:hover {
	background-size: 100% 1px;
}

/* =========================================================
   Celular y tableta
   ========================================================= */
@media (max-width: 1024px) {
	.cg-filosofia__pasos {
		grid-template-columns: 1fr;
	}

	/* La línea de tiempo pasa a vertical. */
	.cg-proceso__etapas {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.cg-proceso .cg-etapa {
		display: grid;
		grid-template-columns: 56px minmax(0, 1fr);
		column-gap: 22px;
	}

	.cg-etapa__nodo {
		grid-row: span 2;
		margin-bottom: 0;
	}

	.cg-proceso__linea {
		top: 28px;
		bottom: 28px;
		left: 27px;
		right: auto;
		width: 1px !important;
		height: auto;
		background: linear-gradient(180deg, var(--cg-cobre, #a4532f), var(--cg-cobre-claro, #d98a63));
	}
}

@media (max-width: 767px) {
	.cg-datos {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   Sin movimiento si la persona lo pidió en su sistema
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
	.cg-hero::before,
	.cg-hero::after {
		animation: none;
	}

	.cg-datos .cg-dato:hover,
	.cg-filosofia .cg-paso:hover,
	.cg-etapa:hover .cg-etapa__nodo {
		transform: none;
	}

	.cg-datos .cg-dato,
	.cg-filosofia .cg-paso,
	.cg-etapa__nodo,
	.cg-etapa__nodo::after,
	.elementor-widget-text-editor a {
		transition-duration: 0.01s;
	}
}

/* En celular la línea de tiempo es vertical: se «dibuja» de arriba hacia abajo. */
@media (max-width: 1024px) {
	.cg-anim .cg-proceso__linea.cg-revelar--linea {
		transform: scaleY(0);
		transform-origin: 50% 0;
	}

	.cg-anim .cg-proceso__linea.cg-revelar--linea.es-visible {
		transform: none;
	}
}
