﻿/**
 * Encabezado premium — bloque servicios (#services, sumario en about, etc.)
 * Carga después de style.css. Requiere .acr-section-heading--premium en el .section-title.
 *
 * Gráfico “fantasma” del auto: mismo asset que .section-design (quality.png), reubicado en
 * .acr-section-heading__emblem; el fondo de la sección #services ya no lo repite.
 */

/* Quitar solo en la sección servicios el fondo de .section-design (quality.png arriba a la derecha) */
#services.theme-repair-services.section-design {
	background-image: none !important;
}

.acr-section-heading__emblem {
	display: block;
	width: min(72vw, 280px);
	height: clamp(4.5rem, 20vw, 7.5rem);
	margin: clamp(-5.75rem, -14vw, -2.5rem) auto clamp(1rem, 3vw, 1.65rem);
	background-image: url("../images/quality.png");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	opacity: 1;
	pointer-events: none;
	user-select: none;
}

@media screen and (max-width: 480px) {
	.acr-section-heading__emblem {
		width: min(78vw, 240px);
		height: clamp(4rem, 24vw, 6.5rem);
		opacity: 1;
	}
}

.acr-section-heading--premium.section-title {
	position: relative;
	text-align: center;
	max-width: 52rem;
	margin-left: auto;
	margin-right: auto;
	margin-top: clamp(-4.25rem, -8vw, -1.5rem);
	margin-bottom: clamp(3.25rem, 7vw, 5.5rem);
	padding: 0 clamp(1rem, 4vw, 2rem) 0;
	z-index: 0;
}

/* Bruma muy suave detrás del bloque (sin competir con el contenido) */
.acr-section-heading--premium.section-title::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 40%;
	transform: translate(-50%, -50%);
	width: min(100%, 36rem);
	height: clamp(7rem, 22vw, 11rem);
	background: radial-gradient(
		ellipse at center,
		rgba(192, 1, 19, 0.07) 0%,
		rgba(192, 1, 19, 0.02) 45%,
		transparent 70%
	);
	pointer-events: none;
	z-index: -1;
}

/* Kicker tipo pill / glass */
.acr-section-heading--premium h5.acr-section-heading__kicker {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto clamp(1.35rem, 3.2vw, 2rem);
	padding: 0.55rem 1.35rem;
	font-family: "Montserrat", "Poppins", sans-serif;
	font-size: clamp(0.68rem, 1.35vw, 0.78rem);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(30, 30, 34, 0.88);
	border: 1px solid rgba(192, 1, 19, 0.22);
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(12px) saturate(160%);
	-webkit-backdrop-filter: blur(12px) saturate(160%);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.65) inset,
		0 8px 28px rgba(0, 0, 0, 0.06),
		0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

/* Título principal (ancho al texto para que el subrayado coincida con “Nuestros servicios”) */
.acr-section-heading--premium .acr-section-heading__title {
	position: relative;
	display: block;
	width: max-content;
	max-width: 100%;
	margin: 0 auto;
	font-family: "Montserrat", "Poppins", sans-serif;
	font-weight: 800;
	font-size: clamp(1.85rem, 4.2vw + 1rem, 3.15rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #121218;
	text-transform: none;
	animation: acr-heading-title-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.acr-section-heading--premium .acr-section-heading__title-highlight {
	background: linear-gradient(105deg, #c00113 0%, #e0182e 45%, #8a0110 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/*
 * Subrayado fino: casi un punto al centro → al entrar bien en vista (JS + .acr-title-line--expanded)
 * crece hacia los costados (scaleX, transform-origin center).
 */
.acr-section-heading--premium .acr-section-heading__title::after {
	content: "";
	display: block;
	width: 100%;
	height: 2px;
	max-height: 2px;
	margin: clamp(1.1rem, 2.5vw, 1.5rem) auto 0;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		rgba(192, 1, 19, 0.15),
		rgba(192, 1, 19, 1) 42%,
		rgba(192, 1, 19, 1) 58%,
		rgba(192, 1, 19, 0.15)
	);
	box-shadow: 0 0 0 rgba(192, 1, 19, 0);
	transform: scaleX(0.06);
	transform-origin: center center;
	opacity: 0.65;
	/* Colapsar rápido al salir de vista; expandir lento al entrar (ver regla .acr-title-line--expanded) */
	transition:
		transform 0.42s ease,
		opacity 0.32s ease,
		box-shadow 0.32s ease;
	will-change: transform;
}

.acr-section-heading--premium .acr-section-heading__title.acr-title-line--expanded::after {
	transform: scaleX(1);
	opacity: 1;
	box-shadow: 0 0 14px rgba(192, 1, 19, 0.28);
	transition:
		transform 1.65s cubic-bezier(0.16, 1, 0.22, 1) 0.28s,
		opacity 1.1s ease 0.28s,
		box-shadow 1.4s ease 0.45s;
}

@keyframes acr-heading-kicker-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes acr-heading-title-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes acr-heading-emblem-in {
	from {
		transform: translateY(12px);
	}
	to {
		transform: translateY(0);
	}
}

.acr-section-heading--premium .acr-section-heading__emblem {
	animation: acr-heading-emblem-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.acr-section-heading--premium h5.acr-section-heading__kicker {
	animation: acr-heading-kicker-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
	.acr-section-heading--premium .acr-section-heading__emblem,
	.acr-section-heading--premium h5.acr-section-heading__kicker,
	.acr-section-heading--premium .acr-section-heading__title {
		animation: none !important;
	}

	.acr-section-heading--premium .acr-section-heading__title::after {
		animation: none !important;
		transition: none !important;
		transform: scaleX(1) !important;
		opacity: 1 !important;
		box-shadow: none !important;
	}
}

/* Por encima de .section-title h2 { font-size: 30px } en breakpoints de la plantilla */
@media screen and (max-width: 767px) {
	.acr-section-heading--premium h2.acr-section-heading__title {
		font-size: clamp(1.65rem, 5.5vw + 0.85rem, 2.35rem);
	}
}
