/**
 * CTA "Blindamos tu auto" — maqueta "CAMBIOS DE DIRECCIÓN".
 *
 * Clases con prefijo tg- para no chocar con el resto del tema.
 */

.tg-cta {
	--tg-accent: #295bcc;
	--tg-glow: #002f9a;
	--tg-section: #121212;
	--tg-display: 'Michroma', sans-serif;
	--tg-ui: 'Inter', -apple-system, Helvetica, Arial, sans-serif;
	--tg-easing: cubic-bezier(.22, 1, .36, 1);
	--tg-duration: 320ms;
	--tg-gutter: clamp(24px, 8.833vw, 159.3px);

	position: relative;
	box-sizing: border-box;
	margin-top: clamp(56px, 7vw, 110px);
	padding: 51px 192px;
	background:
		radial-gradient(24.08% 54.74% at 75.92% 12.46%, rgba(66, 66, 66, .2) 0%, rgba(18, 18, 18, .2) 100%),
		var(--tg-section);
	color: #fff;
	font-family: var(--tg-ui);
}

.tg-cta *,
.tg-cta *::before,
.tg-cta *::after {
	box-sizing: border-box;
}

.tg-cta__glow {
	position: absolute;
	z-index: 2;
	left: -194px;
	top: -268px;
	width: 250px;
	height: 254px;
	border-radius: 50%;
	background: var(--tg-glow);
	filter: blur(97.55px);
	pointer-events: none;
}

.tg-cta__box {
	position: relative;
	display: grid;
	grid-template-columns: 874px minmax(0, 1fr);
	gap: 51px;
	padding: 68px 67px 45px 72px;
	border-radius: 12px 12px 0 0;
}

.tg-cta__figure {
	position: relative;
	height: 347px;
	margin: 0;
}

.tg-cta__shadow {
	position: absolute;
	left: 36px;
	top: 267px;
	width: 838px;
	height: 64px;
	border-radius: 50%;
	background: #000;
	filter: blur(18.35px);
}

.tg-cta__image {
	position: absolute;
	left: 0;
	top: 0;
	display: block;
	width: 861px;
	height: 347px;
	object-fit: contain;
}

.tg-cta__copy {
	width: 411px;
	padding-top: 5px;
}

.tg-cta__title {
	margin: 0;
	font-family: var(--tg-display);
	font-weight: 400;
	font-size: 28px;
	line-height: 70px;
	color: #fff;
}

.tg-cta__text {
	margin: 0;
	max-width: 352px;
	font-weight: 400;
	font-size: 18px;
	line-height: 35px;
}

.tg-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 220px;
	height: 60px;
	margin-top: 50px;
	padding: 0;
	border: 2px solid var(--tg-accent);
	border-radius: 30px;
	background: var(--tg-accent);
	color: #fff;
	font-family: inherit;
	font-weight: 500;
	font-size: 20px;
	line-height: 30px;
	text-decoration: none;
	white-space: nowrap;
	position: relative;
	top: 0;
	transition: background var(--tg-duration) var(--tg-easing), border-color var(--tg-duration) var(--tg-easing), top var(--tg-duration) var(--tg-easing);
}

.tg-cta__button:hover,
.tg-cta__button:focus-visible {
	background: #3366db;
	border-color: #3366db;
	color: #fff;
	top: -2px;
}

.tg-cta__button:active {
	top: 0;
}

@media (max-width: 1560px) {
	.tg-cta {
		padding: 51px var(--tg-gutter);
	}

	.tg-cta__box {
		grid-template-columns: minmax(0, 1.1fr) minmax(300px, .65fr);
		padding: 60px 48px;
	}

	.tg-cta__figure {
		height: auto;
		aspect-ratio: 861 / 347;
	}

	.tg-cta__image {
		width: 100%;
		height: 100%;
	}

	.tg-cta__shadow {
		width: 90%;
		left: 5%;
		top: auto;
		bottom: -14px;
	}

	.tg-cta__copy {
		width: auto;
	}
}

@media (max-width: 899px) {
	.tg-cta {
		margin-top: 12px;
		padding: 40px 15px;
	}

	.tg-cta__box {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 22px;
		padding: 43px 4px 39px 2px;
		background: linear-gradient(180deg, #010101 2.98%, #0e0e0e 24.26%);
	}

	.tg-cta__figure {
		width: min(352px, 100%);
		aspect-ratio: 861 / 347;
		height: auto;
	}

	.tg-cta__copy {
		max-width: none;
		padding: 0 44px;
	}

	.tg-cta__title {
		font-size: 27px;
		white-space: nowrap;
	}

	.tg-cta__text {
		width: min(352px, calc(100% + 36px));
	}

	.tg-cta__button {
		width: calc(100% + 40px);
		margin: 48px 0 0 -20px;
	}
}

@media (max-width: 399px) {
	.tg-cta__title {
		font-size: 23px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tg-cta__button {
		transition-duration: .01ms;
	}
}


/* ==================== SERVICIOS ==================== */

.tg-servicios {
	--tg-accent: #295bcc;
	--tg-section: #121212;
	--tg-display: 'Michroma', sans-serif;
	--tg-ui: 'Inter', -apple-system, Helvetica, Arial, sans-serif;
	--tg-easing: cubic-bezier(.22, 1, .36, 1);
	--tg-gutter: clamp(24px, 8.833vw, 159.3px);

	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(36px, 5vw, 70px);
	/*
	 * Mismo fondo que el CTA (--tg-section) y no el del body: con dos tonos
	 * distintos se veía una línea horizontal donde cambiaban las secciones.
	 */
	padding: clamp(72px, 9vw, 120px) 0;
	background: var(--tg-section);
	color: #fff;
	font-family: var(--tg-ui);
}

.tg-servicios *,
.tg-servicios *::before,
.tg-servicios *::after {
	box-sizing: border-box;
}

.tg-servicios__marcas {
	position: relative;
	display: flex;
	align-items: center;
	gap: 24px;
}

.tg-servicios__logo {
	display: block;
	width: 190.8px;
	height: 27px;
}

.tg-servicios__by {
	font-weight: 200;
	font-size: 15.6px;
	line-height: 19px;
	letter-spacing: .745665px;
}

.tg-servicios__partner {
	display: flex;
	align-items: center;
	height: 20.71px;
	font-weight: 800;
	font-size: 19px;
	line-height: 20px;
	letter-spacing: -.2px;
}

.tg-servicios__partner i {
	font-style: normal;
	color: #e6322e;
}

.tg-servicios__bloque {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 76px;
}

.tg-servicios__titulo {
	margin: 0;
	font-family: var(--tg-display);
	font-weight: 400;
	font-size: 47px;
	line-height: 58px;
	text-align: center;
	color: #fff;
}

.tg-servicios__fila {
	position: relative;
	display: flex;
	gap: 45px;
	z-index: 1;
}

/*
 * El h3 solo envuelve al enlace para el esquema de encabezados: no debe pintar
 * nada ni cambiar el reparto de la fila, así que se queda sin márgenes y pasa
 * el flex al botón, que sigue siendo quien tiene la forma de pastilla.
 */
.tg-servicios__item {
	display: flex;
	flex: none;
	margin: 0;
	font: inherit;
}

.tg-servicios__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	height: 64px;
	padding: 0 33px;
	border: 2px solid rgba(255, 255, 255, .3);
	border-radius: 30px;
	color: #fff;
	font-weight: 200;
	font-size: 20px;
	line-height: 24px;
	letter-spacing: 1.24278px;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 500ms var(--tg-easing), transform 500ms var(--tg-easing);
}

.tg-servicios__btn:hover,
.tg-servicios__btn:focus-visible {
	border-color: var(--tg-accent);
	color: #fff;
	outline: none;
	transform: translateY(-2px);
}

@media (max-width: 1180px) {
	.tg-servicios {
		padding: 120px var(--tg-gutter);
	}

	.tg-servicios__fila {
		flex-wrap: wrap;
		justify-content: center;
		gap: 20px;
	}
}

@media (max-width: 899px) {
	.tg-servicios {
		gap: 40px;
		padding: 64px 25px 72px;
	}

	.tg-servicios__logo {
		width: 140px;
		height: 20px;
	}

	.tg-servicios__bloque {
		gap: 36px;
	}

	.tg-servicios__titulo {
		font-size: 24px;
		line-height: 32px;
	}

	.tg-servicios__fila {
		flex-direction: column;
		width: 100%;
		gap: 24px;
		margin-top: 22px;
	}

	.tg-servicios__btn {
		width: 100%;
		height: 56px;
		font-size: 17px;
		white-space: normal;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tg-servicios__btn {
		transition-duration: .01ms;
	}
}

/* -------------------------------------------------------------------------
 * Alineación con el resto de la página
 *
 * La sección se pinta a sangre, pero su contenido tiene que caer sobre la misma
 * retícula que lo de arriba. Traía dos desfases que se sumaban:
 *
 *   1. El gutter propio era 192px fijo, mientras el sitio usa --page-x
 *      (159.3px a 1800px de ancho).                            → 33px
 *   2. La caja añadía su propio padding lateral de 72px.       → 72px
 *
 * Total: el coche entraba 105px más que la tarjeta de la ficha. Aquí se
 * adopta el gutter del sitio y se retira el aire lateral de la caja, que en
 * escritorio no tiene fondo visible y por tanto no lo necesita.
 *
 * Por debajo de 900px no se toca: ahí la caja SÍ es un panel con degradado
 * propio, y su padding es lo que separa el contenido de ese borde.
 * ---------------------------------------------------------------------- */

@media ( min-width: 900px ) {
	.tg-cta {
		padding-inline: var( --page-x, var( --tg-gutter ) );
	}

	.tg-cta__box {
		padding-inline: 0;
	}
}
