/**
 * Sección Servicios (tabs + animación de entrada).
 */

.hec-services {
	padding: 5rem 1.5rem;
	background: #fff;
	color: #111;
}

.hec-services__inner {
	max-width: 1600px;
	margin: 0 auto;
}

.hec-services__header {
	margin-bottom: 2rem;
}

.hec-services__subtitle {
	margin: 0 0 0.65rem;
	color: var(--hec-section-subtitle, var(--hec-accent, #e07a2f));
	font-size: 0.95rem;
	font-weight: 600;
}

.hec-services__title {
	margin: 0;
	font-family: var(--hec-font-heading, var(--hec-font));
	font-size: clamp(2rem, 3.5vw, 2.85rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.hec-services__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 2.75rem;
}

.hec-services__tab {
	position: relative;
	overflow: hidden;
	appearance: none;
	-webkit-appearance: none;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 1.05rem 1.85rem !important;
	min-height: 58px;
	margin: 0 !important;
	cursor: pointer;
	color: #fff !important;
	font-family: var(--hec-font-heading, var(--hec-font));
	font-size: clamp(1rem, 1.15vw, 1.2rem) !important;
	font-weight: 700 !important;
	line-height: 1.2;
	/* Solo color sólido (sin imagen de fondo) */
	/*background-color: #2a2a2a !important;*/
	background-color: var(--hec-btn-dark-bg) !important;
	background-image: none !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0.01em;
	transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease, background-color 0.2s ease;
}

.hec-services__tab-label {
	position: relative;
	z-index: 1;
	white-space: nowrap;
}

/* Hover inactivo: NO degradado naranja */
.hec-services__tab:hover:not(.is-active),
.hec-services__tab:focus:not(.is-active),
.hec-services__tab:focus-visible:not(.is-active),
.hec-services__tab:active:not(.is-active) {
	transform: translateY(-1px);
	background-color: #3a3a3a !important;
	background-image: none !important;
	filter: none;
	box-shadow: none !important;
	color: #fff !important;
}

.hec-services__tab.is-active,
.hec-services__tab.is-active:hover,
.hec-services__tab.is-active:focus,
.hec-services__tab.is-active:active {
	background-color: var(--hec-grad-from, #e86a12) !important;
	/*background-image: linear-gradient(90deg, var(--hec-grad-from, #e86a12), var(--hec-grad-to, #c94a0a)) !important;*/
	background-size: auto !important;
	box-shadow: 0 10px 24px rgba(201, 74, 10, 0.28) !important;
	color: #fff !important;
	filter: none;
}

.hec-services__panels {
	position: relative;
}

.hec-services__panel {
	display: none;
	grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 1fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
}

.hec-services__panel.is-active {
	display: grid;
}

.hec-services__media {
	min-height: 280px;
}

.hec-services__media img {
	width: 100%;
	height: auto;
	max-height: 420px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.hec-services__media-placeholder {
	min-height: 280px;
	border-radius: 16px;
	background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.hec-services__heading {
	margin: 0 0 1.75rem;
	font-family: var(--hec-font-heading, var(--hec-font));
	font-size: clamp(1.55rem, 2.8vw, 2.35rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.03em;
	color: #111;
	max-width: none;
	width: 100%;
}

.hec-services__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem 1.75rem;
}

.hec-services .hec-btn--service,
.hec-services .hec-btn.hec-btn--accent {
	padding: 1.1rem 1.85rem;
	font-size: 1.05rem;
	font-weight: 700;
}

/* Botón acento (gradiente) — estilo unificado vía CSS vars */
.hec-btn--accent,
.hec-btn.hec-btn--accent {
	/*background: linear-gradient(90deg, var(--hec-grad-from, #e86a12), var(--hec-grad-to, #c94a0a)) !important;*/
	background: var(--hec-btn-dark-bg) !important;
	border-color: transparent !important;
	color: #fff !important;
}

.hec-btn--accent:hover,
.hec-btn--accent:focus,
.hec-btn.hec-btn--accent:hover,
.hec-btn.hec-btn--accent:focus {
	filter: brightness(1.05);
	color: #fff !important;
}

.hec-services__video {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	color: #6b7280;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

.hec-services__video:hover {
	color: var(--hec-accent, #e07a2f);
}

.hec-services__play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--hec-accent, #e07a2f);
	color: #fff;
	flex-shrink: 0;
}

/* Animación de entrada al cambiar tab */
.hec-services__panel.is-active .hec-services__media,
.hec-services__panel.is-active .hec-services__copy {
	animation: hecServicesIn 0.55s ease both;
}

.hec-services__panel.is-active .hec-services__copy {
	animation-delay: 0.08s;
}

.hec-services__panel.is-animating .hec-services__media,
.hec-services__panel.is-animating .hec-services__copy {
	animation: none;
	opacity: 0;
	transform: translateY(18px);
}

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

@media (max-width: 900px) {
	.hec-services {
		padding: 3.5rem 1rem;
	}

	.hec-services__header {
		margin-bottom: 1.75rem;
	}

	.hec-services__title {
		max-width: 12ch;
		font-size: clamp(1.85rem, 8vw, 2.45rem);
	}

	/* Pills en cluster (no scroll horizontal), más separados */
	.hec-services__tabs {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 1rem 0.95rem;
		overflow: visible;
		margin-bottom: 2.25rem;
		padding-bottom: 0;
		max-width: 420px;
	}

	.hec-services__tab {
		flex: 0 0 auto;
		padding: 0.95rem 1.45rem !important;
		min-height: 52px;
		font-size: 0.95rem !important;
	}

	.hec-services__tab-label {
		white-space: nowrap;
	}

	/* Escalera suave como el diseño, sin amontonar */
	.hec-services__tab:nth-child(even) {
		margin-left: 1.35rem;
	}

	.hec-services__tab:nth-child(3n) {
		margin-left: 0.35rem;
	}

	.hec-services__panel.is-active {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	/* En móvil: ilustración arriba del texto del panel */
	.hec-services__panel.is-active .hec-services__media {
		order: -1;
	}

	.hec-services__heading {
		max-width: none;
		font-size: clamp(1.35rem, 5.5vw, 1.75rem);
	}

	.hec-services__media img {
		max-height: 260px;
	}
}

@media (max-width: 480px) {
	.hec-services__tabs {
		gap: 0.9rem 0.75rem;
		max-width: 100%;
	}

	.hec-services__tab {
		padding: 0.85rem 1.25rem !important;
		min-height: 48px;
		font-size: 0.9rem !important;
	}

	.hec-services__tab:nth-child(even) {
		margin-left: 1rem;
	}
}
