/* =====================================================================
   LA NUEVA BARBERÍA · tarjetas.css
   Bloque «Cursos (tarjetas)»: cuadrícula de tarjetas con imagen, nivel,
   título, descripción, clases y duración, precio y avance.
   ===================================================================== */
.lnb-cc {
	--ac: var(--wp--preset--color--azul, #1E4C8A);
	--crema: var(--wp--preset--color--crema, #F5EBDA);
	--arena: var(--wp--preset--color--arena, #EDDFC4);
	--cafe: var(--wp--preset--color--cafe, #30211A);
	--cafe-2: var(--wp--preset--color--cafe-2, #6B5A4B);
	--linea: var(--wp--preset--color--linea, #D6C29A);
	--verde: var(--wp--preset--color--verde, #2E6B3F);
	--tit: var(--wp--preset--font-family--titulos, "Bebas Neue", Impact, sans-serif);
	display: grid;
	grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
	gap: 22px;
	box-sizing: border-box;
}
.lnb-cc-1 { --cols: 1; }
.lnb-cc-2 { --cols: 2; }
.lnb-cc-3 { --cols: 3; }
.lnb-cc-4 { --cols: 4; }
.lnb-cc * { box-sizing: border-box; }

.cc {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--papel, #FFFBF3);
	border: 1px solid var(--linea);
	border-radius: 14px;
	overflow: hidden;
	color: var(--cafe);
	transition: transform 180ms cubic-bezier(.2, 0, 0, 1), box-shadow 180ms;
}
.cc:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(48, 33, 26, .45); }

/* imagen */
.cc-img { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--cafe); overflow: hidden; }
.cc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms cubic-bezier(.2, 0, 0, 1); }
.cc:hover .cc-img img { transform: scale(1.03); }
.cc-sin-img { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--cafe), #4a3428); color: var(--linea); }
.cc-sin-img .ico { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; --ac: var(--wp--preset--color--azul-claro, #B7C7E0); opacity: .9; }
.cc-chip {
	position: absolute; left: 12px; top: 12px;
	font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	padding: 4px 9px; border-radius: 6px;
	background: var(--crema); color: var(--cafe);
}
.cc-chip.cc-verde { background: var(--verde); color: #fff; }
.cc-chip.cc-azul { background: var(--ac); color: var(--wp--preset--color--sobre-azul, #EEF3FB); }
.cc-chip.cc-gris { background: rgba(245, 235, 218, .92); color: var(--cafe); }

/* cuerpo */
.cc-cuerpo { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.cc-cuerpo p { margin: 0; }
.cc-nivel { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--cafe-2); }
.cc-nivel .ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cc-tit { margin: 0; font-family: var(--tit); font-weight: 400; font-size: 26px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.cc-tit a { color: inherit; text-decoration: none; }
.cc-tit a:hover { color: var(--ac); }
.cc-desc { font-size: 15.5px; line-height: 1.45; color: var(--cafe-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cc-meta { font-size: 13.5px; font-weight: 600; color: var(--cafe-2); }

/* avance de quien ya lo toma */
.cc-avance { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
.cc-barra { height: 6px; border-radius: 99px; background: var(--arena); overflow: hidden; }
.cc-barra i { display: block; height: 100%; background: var(--ac); border-radius: 99px; }
.cc-avance span { font-size: 13px; font-weight: 600; color: var(--ac); }

/* pie: precio y botón */
.cc-pie { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--arena); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cc-precio { display: flex; flex-direction: column; font-family: var(--tit); font-size: 28px; line-height: 1; text-transform: uppercase; }
.cc-precio small { font-family: var(--wp--preset--font-family--texto, Barlow, sans-serif); font-size: 12.5px; font-weight: 500; text-transform: none; color: var(--cafe-2); margin-top: 4px; }
.cc-precio .woocommerce-Price-currencySymbol { font-size: .8em; }
.cc-piden { font-family: var(--wp--preset--font-family--texto, Barlow, sans-serif); font-size: 13.5px; font-weight: 600; text-transform: none; color: var(--cafe-2); }
.cc-ir { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-weight: 700; font-size: 15px; color: var(--ac); text-decoration: none; white-space: nowrap; }
.cc-ir svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms; }
.cc-ir:hover svg { transform: translateX(3px); }
.cc-tomando .cc-ir { background: var(--ac); color: var(--wp--preset--color--sobre-azul, #EEF3FB); padding: 8px 14px; border-radius: 9px; }

/* próximos (todavía no se graban): misma tarjeta; sin imagen, una portada «en preparación» */
.cc-lista .cc-img { aspect-ratio: 16 / 9; }
.cc-lista .cc-img img { filter: saturate(.85); }
.cc-pronto {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
	background:
		repeating-linear-gradient(-45deg, rgba(214, 194, 154, .07) 0 14px, transparent 14px 28px),
		radial-gradient(120% 90% at 50% 40%, #4a3428 0%, var(--cafe) 70%);
}
.cc-pronto-ico {
	display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
	border: 1.5px dashed rgba(214, 194, 154, .55);
	background: rgba(48, 33, 26, .55);
}
.cc-pronto-ico .ico { width: 40px; height: 40px; }
.cc-pronto-ico .cc-poste { width: 16px; height: 50px; }
.cc-pronto-tx {
	font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	color: var(--linea); opacity: .9;
}
.cc-lista .cc-ir { border: 1.5px solid var(--ac); padding: 7px 13px; border-radius: 9px; }
.cc-lista .cc-ir:hover { background: var(--ac); color: var(--wp--preset--color--sobre-azul, #EEF3FB); }
.cc-lista .cc-desc { -webkit-line-clamp: 2; }
/* sin nivel: el poste del logo */
.cc-poste { display: block; width: 34px; height: 108px; background: var(--linea); -webkit-mask: url(/wp-content/themes/lnb-theme/assets/img/icono.svg) center / contain no-repeat; mask: url(/wp-content/themes/lnb-theme/assets/img/icono.svg) center / contain no-repeat; opacity: .85; }

/* filtros */
.lnb-cc-caja { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 96px; }
.cc-filtros { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.cc-filtros::-webkit-scrollbar { display: none; }
.cc-f {
	all: unset; box-sizing: border-box; cursor: pointer; flex: none;
	padding: 8px 14px; border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--linea, #D6C29A);
	font: 600 14.5px/1.2 var(--wp--preset--font-family--texto, Barlow, sans-serif);
	color: var(--wp--preset--color--cafe, #30211A);
	background: transparent;
	transition: background 140ms, color 140ms, border-color 140ms;
	-webkit-tap-highlight-color: transparent;
}
.cc-f:hover { border-color: var(--wp--preset--color--cafe-2, #6B5A4B); }
.cc-f[aria-pressed="true"] { background: var(--wp--preset--color--cafe, #30211A); border-color: var(--wp--preset--color--cafe, #30211A); color: var(--wp--preset--color--crema, #F5EBDA); }
.cc-f:focus-visible { outline: 3px solid var(--wp--preset--color--azul-claro, #B7C7E0); outline-offset: 2px; }
.cc[hidden] { display: none; }
.cc-vacio { grid-column: 1 / -1; margin: 0; padding: 22px; border: 2px dashed var(--linea); border-radius: 12px; color: var(--cafe-2); }

@media (max-width: 1000px) { .lnb-cc-3, .lnb-cc-4 { --cols: 2; } }
/* teléfono: la misma tarjeta que en escritorio, una por renglón y un poco más ajustada */
@media (max-width: 640px) {
	.lnb-cc { --cols: 1 !important; gap: 16px; }
	.cc:hover { transform: none; }
	.cc-cuerpo { padding: 14px 16px 16px; gap: 7px; min-width: 0; }
	.cc-tit { font-size: 24px; }
	.cc-desc { font-size: 15px; }
	.cc-precio:not(.cc-piden) { font-size: 26px; }
	.cc-pronto-ico { width: 64px; height: 64px; }
	.cc-pronto-ico .ico { width: 34px; height: 34px; }
}
/* la barra de filtros se desliza dentro de la página, sin ensancharla */
.lnb-cc-caja, .lnb-cc { min-width: 0; max-width: 100%; }
.cc-filtros { max-width: 100%; }

/* /cursos/ armado con el editor: los títulos con ancla no quedan debajo del encabezado */
.lnb-cat-editor [id] { scroll-margin-top: 96px; }
.lnb-cat-editor .lnb-sec > * { margin-block-start: 0; }
