/* SATA - la cabecera de categoria.
   El color lo pone cada categoria en la variable --ac (ver vistas.php); el
   verde de la marca es solo el valor por defecto. */

.sata-cathead {
	--ac: #00d68f;
	position: relative;
	margin: 0 0 1.6em;
	border-radius: 14px;
	overflow: hidden;
	background: #f4f7fb;
	border: 1px solid #e2e8f1;
}

.sata-cathead__cuerpo {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 22px;
}

/* ------------------------------- el icono -------------------------------- */

.sata-cathead__icono {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 13px;
	color: var(--ac);
	background: color-mix(in srgb, var(--ac) 14%, transparent);
	border: 1px solid color-mix(in srgb, var(--ac) 34%, transparent);
}

/* respaldo para navegadores sin color-mix */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
	.sata-cathead__icono { background: rgba(0, 0, 0, .05); border-color: rgba(0, 0, 0, .12); }
}

/* ------------------------------- el texto -------------------------------- */

.sata-cathead__texto { flex: 1 1 auto; min-width: 0; }

.sata-cathead__padre {
	display: inline-block;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #6b7d99 !important;
	text-decoration: none !important;
	margin-bottom: 2px;
}

.sata-cathead__padre:hover { color: var(--ac) !important; }

.sata-cathead__titulo {
	margin: 0;
	font-size: 1.75rem;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: #16233a;
}

.sata-cathead__desc {
	margin: .45em 0 0;
	font-size: .93rem;
	color: #55637b;
	max-width: 62ch;
}

/* ------------------------------- la cuenta ------------------------------- */

.sata-cathead__cuenta {
	flex: 0 0 auto;
	align-self: flex-start;
	font-size: .8rem;
	color: #64748b;
	white-space: nowrap;
}

.sata-cathead__cuenta b {
	display: block;
	font: 800 1.5rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--ac);
	text-align: right;
}

/* ------------------------- botones de subcategoria ------------------------ */

.sata-cathead__subs {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 22px 20px;
}

.sata-sub {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid #d6dfeb;
	background: #fff;
	color: #2f3d55 !important;
	text-decoration: none !important;
	font-size: .86rem;
	font-weight: 600;
	transition: border-color .16s, color .16s, background .16s;
}

.sata-sub em {
	font: 600 .72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-style: normal;
	color: #8b9bb3;
}

.sata-sub:hover {
	border-color: var(--ac);
	color: var(--ac) !important;
}

.sata-sub:hover em { color: var(--ac); }

.sata-sub.es-actual {
	background: var(--ac);
	border-color: var(--ac);
	color: #04241a !important;
}

.sata-sub.es-actual em { color: #04241a; opacity: .7; }

/* ============================ variante: banda ============================ */

.sata-cathead--banda {
	background: linear-gradient(120deg,
		color-mix(in srgb, var(--ac) 13%, #f4f7fb),
		#f4f7fb 62%);
	border-color: color-mix(in srgb, var(--ac) 26%, #e2e8f1);
	border-left: 4px solid var(--ac);
}

/* ============================ variante: foto ============================= */

.sata-cathead--foto.tiene-foto { border: 0; }

.sata-cathead__foto {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}

/* el velo: sin el, el titulo blanco sobre una foto clara no se lee */
.sata-cathead--foto.tiene-foto::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(7, 11, 20, .93) 0%, rgba(7, 11, 20, .78) 46%, rgba(7, 11, 20, .42) 100%);
}

.sata-cathead--foto.tiene-foto .sata-cathead__cuerpo,
.sata-cathead--foto.tiene-foto .sata-cathead__subs { z-index: 1; }

.sata-cathead--foto.tiene-foto .sata-cathead__titulo { color: #fff; }
.sata-cathead--foto.tiene-foto .sata-cathead__desc { color: #c6d3e6; }
.sata-cathead--foto.tiene-foto .sata-cathead__cuenta { color: #9fb0cb; }
.sata-cathead--foto.tiene-foto .sata-cathead__padre { color: #9fb0cb !important; }

.sata-cathead--foto.tiene-foto .sata-sub {
	background: rgba(255, 255, 255, .09);
	border-color: rgba(255, 255, 255, .22);
	color: #e8edf7 !important;
}

.sata-cathead--foto.tiene-foto .sata-sub em { color: #9fb0cb; }
.sata-cathead--foto.tiene-foto .sata-sub:hover { border-color: var(--ac); color: var(--ac) !important; }
.sata-cathead--foto.tiene-foto .sata-sub.es-actual { background: var(--ac); border-color: var(--ac); color: #04241a !important; }

/* =========================== variante: simple ============================ */

.sata-cathead--simple {
	background: none;
	border: 0;
	border-bottom: 1px solid #e2e8f1;
	border-radius: 0;
}

.sata-cathead--simple .sata-cathead__cuerpo { padding-left: 0; padding-right: 0; }
.sata-cathead--simple .sata-cathead__subs { padding-left: 0; padding-right: 0; }

/* ====================== tarjetas de subcategoria ========================= */

.sata-subcards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 14px;
	margin: 0 0 1.8em;
}

.sata-subcard {
	display: block;
	border: 1px solid #e2e8f1;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	text-decoration: none !important;
	transition: border-color .18s, transform .18s, box-shadow .18s;
}

.sata-subcard:hover {
	border-color: var(--ac, #00d68f);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -18px rgba(7, 11, 20, .5);
}

.sata-subcard__foto {
	display: block;
	aspect-ratio: 1 / 1;
	background: #f4f7fb;
	overflow: hidden;
}

.sata-subcard__foto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}

.sata-subcard:hover .sata-subcard__foto img { transform: scale(1.05); }

.sata-subcard__pie {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
}

.sata-subcard__pie b { font-size: .88rem; color: #16233a; font-weight: 600; }

.sata-subcard__pie em {
	font: 600 .72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-style: normal;
	color: #8b9bb3;
}

/* ------------------------------- móvil ----------------------------------- */

@media (max-width: 700px) {
	.sata-cathead__cuerpo { flex-wrap: wrap; gap: 12px; padding: 16px; }
	.sata-cathead__titulo { font-size: 1.4rem; }
	.sata-cathead__cuenta { order: 3; align-self: center; }
	.sata-cathead__cuenta b { display: inline; font-size: 1rem; }
	.sata-cathead__subs { padding: 0 16px 16px; }
	.sata-cathead__icono { width: 44px; height: 44px; }
}
