/* ==========================================================================
   ANATO Capacita: Home (page-home-anato.php). Requiere anato-base.css.

   1. Hero
   2. Video de bienvenida
   3. Beneficios
   4. Módulos
   5. Calificación en las tarjetas de módulos
   6. Aliados
   7. Responsive
   ========================================================================== */

/* 1. Hero
   ========================================================================== */
.ach-hero {
	position: relative;
	min-height: 720px;
	display: flex;
	align-items: center;
	background: linear-gradient(180deg, #f8fcfe 0%, #fff 100%);
	overflow: hidden;
}

.ach-hero::before {
	content: '';
	position: absolute;
	width: 520px;
	height: 520px;
	right: -180px;
	top: -120px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, rgba(67, 215, 203, .32), rgba(7, 92, 168, .06) 60%, transparent 72%);
}

.ach-hero::after {
	content: '';
	position: absolute;
	width: 360px;
	height: 360px;
	left: -200px;
	bottom: -180px;
	border-radius: 50%;
	background: rgba(7, 92, 168, .05);
}

.ach-hero__grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1.02fr .98fr;
	gap: 70px;
	align-items: center;
	padding: 78px 0;
}

.ach .ach-hero h1 {
	margin: 18px 0 24px;
	font-size: clamp(46px, 5vw, 64px);
	line-height: .98;
	letter-spacing: -.055em;
	color: var(--ach-navy);
}

.ach-hero h1 strong {
	color: var(--ach-teal);
	font-weight: 800;
}

.ach-hero__copy > p {
	max-width: 650px;
	margin: 0 0 30px;
	font-size: 18px;
	color: var(--ach-muted);
}

.ach-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.ach-microstats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 26px;
	margin-top: 36px;
	padding-top: 30px;
	border-top: 1px solid var(--ach-line);
}

.ach-stat {
	text-align: center;
}

.ach-stat strong {
	display: block;
	font-size: 25px;
	line-height: 1;
	color: var(--ach-navy);
}

.ach-stat span {
	font-size: 12px;
	font-weight: 700;
	color: var(--ach-muted);
}

/* Ilustración animada (GIF con fondo transparente) */
.ach-panel {
	position: relative;
	display: grid;
	place-items: end center;
	min-height: 520px;
}

.ach-panel::before {
	content: "";
	position: absolute;
	inset: 12% 8% 4%;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 45%, var(--ach-teal-soft) 0%, #e9f2fb 58%, transparent 72%);
}

.ach .ach-panel__art {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
}

/* 2. Video de bienvenida
   ========================================================================== */
.ach-video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 30px;
	overflow: hidden;
	background: #001d32;
	box-shadow: var(--ach-shadow);
}

.ach-video--solo {
	max-width: 500px;
	margin: 0 auto;
}

.ach-video iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* 3. Beneficios
   ========================================================================== */
.ach-benefits {
	background: var(--ach-soft);
}

.ach-benefit-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.ach-benefit {
	min-height: 300px;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--ach-line);
	border-radius: 24px;
	transition: transform .25s, box-shadow .25s;
}

.ach-benefit:hover {
	transform: translateY(-6px);
	box-shadow: var(--ach-shadow);
}

.ach .ach-benefit img {
	width: 88px;
	height: 88px;
	object-fit: contain;
	margin-bottom: 22px;
}

.ach .ach-benefit h3 {
	margin: 0 0 12px;
	font-size: 21px;
	line-height: 1.2;
}

.ach-benefit p {
	margin: 0;
	font-size: 14px;
	color: var(--ach-muted);
}

/* 4. Módulos
   ========================================================================== */
.ach-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
}

.ach .ach-tab {
	padding: 11px 17px;
	background: #fff;
	border: 1px solid var(--ach-line);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-transform: none;
	color: #456175;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}

.ach .ach-tab[aria-pressed="true"],
.ach .ach-tab:hover {
	background: var(--ach-navy);
	border-color: var(--ach-navy);
	color: #fff;
}

.ach-module-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}

.ach-module {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 330px;
	background: #fff;
	border: 1px solid var(--ach-line);
	border-radius: 24px;
	overflow: hidden;
	transition: transform .25s, box-shadow .25s, border-color .25s;
}

.ach-module[hidden] {
	display: none;
}

.ach-module:hover {
	transform: translateY(-7px);
	box-shadow: var(--ach-shadow);
	border-color: #c3dce8;
}

.ach-module:hover .ach-link-arrow span {
	transform: translateX(4px);
}

.ach-module__cover {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 3 / 2;
	background: linear-gradient(135deg, #ebf8fa, #e9f2fb);
	overflow: hidden;
}

.ach .ach-module__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.ach-module:hover .ach-module__cover img {
	transform: scale(1.04);
}

.ach-module__icon {
	width: 58px;
	height: 58px;
	display: grid;
	place-items: center;
	border-radius: 18px;
	background: #fff;
	color: var(--ach-blue);
	box-shadow: 0 10px 25px rgba(7, 54, 95, .12);
}

.ach-module__icon svg {
	width: 30px;
	height: 30px;
}

.ach-module__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 21px;
}

.ach .ach-module h3 {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.35;
	letter-spacing: -.01em;
}

/* El enlace del título cubre toda la tarjeta */
.ach-module__link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.ach .ach-module:hover .ach-module__link {
	color: var(--ach-blue);
}

.ach .ach-module__link:focus-visible {
	outline: none;
}

.ach-module:focus-within {
	outline: 3px solid var(--ach-teal);
	outline-offset: 3px;
}

.ach-module .ach-link-arrow {
	margin-top: auto;
}

.ach-module-cta {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

/* 5. Calificación en las tarjetas de módulos
   ========================================================================== */
.ach .ach-module h3 + .ach-rating {
	margin-top: -10px;
}

/* 6. Aliados
   ========================================================================== */
.ach-partners {
	padding: 72px 0;
	border-top: 1px solid var(--ach-line);
}

.ach-partner-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: center;
}

.ach-partner {
	height: 160px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	background: #fff;
	border: 1px solid var(--ach-line);
	border-radius: 24px;
}

.ach-partner span {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--ach-muted);
}

.ach .ach-partner--anato img { width: 260px; }
.ach .ach-partner--ext img { width: 250px; }

/* 7. Responsive
   ========================================================================== */
@media (max-width: 1050px) {
	.ach-hero { min-height: auto; }
	.ach-hero__grid { grid-template-columns: 1fr; }
	.ach-panel { width: 100%; max-width: 700px; margin: auto; }

	.ach-module-grid { grid-template-columns: repeat(2, 1fr); }

	.ach-benefit-grid { grid-template-columns: 1fr 1fr; }
	.ach-benefit-grid .ach-benefit:last-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
	/* Hero */
	.ach-hero__grid { padding: 44px 0 52px; gap: 32px; }
	.ach .ach-hero h1 { font-size: clamp(40px, 12.5vw, 49px); }
	.ach-hero__copy > p { font-size: 15px; }
	.ach-hero__actions .ach-btn { width: 100%; }
	.ach-microstats { gap: 20px; margin-top: 28px; padding-top: 24px; }

	/* Ilustración */
	.ach-panel { min-height: 0; }
	.ach .ach-panel__art { max-width: 380px; }

	/* Video */
	.ach-video { border-radius: 22px; }

	/* Beneficios: ícono a la izquierda */
	.ach-benefit-grid { grid-template-columns: 1fr; gap: 14px; }
	.ach-benefit-grid .ach-benefit:last-child { grid-column: auto; }
	.ach-benefit {
		display: grid;
		grid-template-columns: 60px 1fr;
		column-gap: 16px;
		align-items: start;
		min-height: 0;
		padding: 22px 20px;
	}
	.ach .ach-benefit img { grid-row: span 2; width: 60px; height: 60px; margin: 0; }
	.ach .ach-benefit h3 { font-size: 18px; margin-bottom: 8px; }

	/* Pestañas en una sola línea con scroll */
	.ach-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin: 0 calc(var(--ach-gutter) * -1) 22px;
		padding: 2px var(--ach-gutter);
		scrollbar-width: none;
	}
	.ach-tabs::-webkit-scrollbar { display: none; }
	.ach .ach-tab { flex: none; min-height: 44px; padding: 10px 15px; font-size: 13px; }

	/* Módulos: carrusel horizontal */
	.ach-module-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 82%;
		gap: 14px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--ach-gutter);
		margin: 0 calc(var(--ach-gutter) * -1);
		padding: 6px var(--ach-gutter) 14px;
		scrollbar-width: none;
	}
	.ach-module-grid::-webkit-scrollbar { display: none; }
	.ach-module { scroll-snap-align: start; min-height: 0; }
	.ach-module:hover { transform: none; }
	.ach-module__body { padding: 18px; }
	.ach-module-cta { margin-top: 20px; }
	.ach-module-cta .ach-btn { width: 100%; }

	/* Aliados */
	.ach-partners { padding: 52px 0; }
	.ach-partner-grid { grid-template-columns: 1fr; gap: 14px; }
	.ach-partner { height: 124px; gap: 12px; }
	.ach .ach-partner--anato img { width: 200px; }
	.ach .ach-partner--ext img { width: 190px; }

}
