/* ─────────────────────────────────────────────────────────────────────────────
   UNRT · Templates CPT Académicos
   Compatibles con Astra + Astra Child Theme
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Layout del single ───────────────────────────────────────────────────── */
.unrt-cpt-wrap {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 20px 60px;
}

/* Fila superior: badge escuela izquierda + etiqueta FICHA TÉCNICA derecha */
.unrt-single-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}

/* Pill con nombre de la escuela/unidad */
.unrt-school-badge {
	display: inline-block;
	background-color: rgba(0, 84, 108, 0.12);
	color: rgb(0, 84, 108);
	border-radius: 30px;
	padding: 5px 16px;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
}

/* Separación entre el título principal y las secciones siguientes */
.unrt-section-header {
	margin-top: 32px;
}

/* ── Título de sección sin pill (ej: Datos Generales) ───────────────────── */
.unrt-plain-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: rgb(0, 84, 108);
	margin: 28px 0 12px;
}

/* ── Tabla de Datos Generales ────────────────────────────────────────────── */
.unrt-datos-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 8px;
	border: none !important;
}

.unrt-datos-table th,
.unrt-datos-table td {
	border: none !important;
	border-bottom: 1px solid rgb(0, 168, 193) !important;
}

.unrt-datos-table th {
	text-align: left;
	padding: 10px 20px 10px 0;
	font-weight: 700;
	color: rgb(0, 84, 108);
	width: 50%;
	vertical-align: top;
	font-size: 0.9rem;
}

.unrt-datos-table td {
	padding: 10px 0;
	color: rgb(0, 84, 108);
	vertical-align: top;
	font-size: 0.9rem;
}

/* ── Botones de enlaces ──────────────────────────────────────────────────── */
.unrt-links-section {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 8px;
}

.unrt-link-btn {
	display: inline-block;
	background-color: #fff;
	color: rgb(0, 84, 108) !important;
	border: 1px solid rgb(0, 84, 108);
	padding: 15px 30px;
	border-radius: 15px;
	text-decoration: none !important;
	font-weight: 500;
	font-size: 18px;
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
}

.unrt-link-btn:hover {
	background-color: rgb(0, 84, 108);
	color: #fff !important;
}

.unrt-link-btn--cta {
	background-color: var(--unrt-accent, #f9ae00);
	color: rgb(0, 84, 108) !important;
	border-color: transparent;
}

.unrt-link-btn--cta:hover {
	background-color: rgb(0, 84, 108);
	color: #fff !important;
	border-color: transparent;
}

.unrt-contacto-link {
	font-size: 0.88rem;
	color: rgb(80, 80, 80);
	margin: 0;
}

.unrt-contacto-link a {
	color: rgb(0, 168, 193);
	text-decoration: none;
}

.unrt-contacto-link a:hover {
	text-decoration: underline;
}

/* ── Acordeón (detalles/resumen nativo HTML) ─────────────────────────────── */
.unrt-accordion {
	margin-bottom: 8px;
}

.unrt-accordion-item {
	border-bottom: 1px solid rgb(0, 168, 193);
}

.unrt-accordion-summary {
	padding: 14px 0;
	font-weight: 600;
	color: rgb(0, 84, 108);
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 1rem;
	user-select: none;
}

.unrt-accordion-summary::-webkit-details-marker {
	display: none;
}

.unrt-accordion-summary::before {
	content: '+';
	font-size: 1.4rem;
	font-weight: 400;
	color: rgb(0, 84, 108);
	line-height: 1;
	flex-shrink: 0;
	align-self: center;
}

details[open] > .unrt-accordion-summary::before {
	content: '−';
}

.unrt-accordion-body {
	padding: 4px 0 20px;
	color: rgb(0, 84, 108) !important;
}

/* ── Links dentro de acordeón (Cátedra Libre) ───────────────────────────── */
.unrt-cl-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

/* ── Contenido rich text ─────────────────────────────────────────────────── */
.unrt-rich-content {
	font-size: 0.95rem;
	line-height: 1.75;
	color: rgb(40, 40, 40);
	margin-bottom: 24px;
}

.unrt-rich-content p:last-child {
	margin-bottom: 0;
}

.unrt-rich-content ul,
.unrt-rich-content ol {
	padding-left: 20px;
}

.unrt-rich-content li {
	margin-bottom: 4px;
}

@media (max-width: 768px) {
	.unrt-datos-table th,
	.unrt-datos-table td {
		display: block;
		width: 100%;
		padding: 6px 0;
	}

	.unrt-datos-table tr {
		padding-bottom: 4px;
		margin-bottom: 4px;
	}

	.unrt-single-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ─────────────────────────────────────────────────────────────────────────────
   Archive / Listado CPT — replica del diseño Elementor
   ─────────────────────────────────────────────────────────────────────────── */

.unrt-archive-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px 60px;
}

/* ── Header de sección (pill + título + líneas) ───────────────────────────── */
.unrt-archive-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 28px;
}

.unrt-archive-pill {
	width: 40px;
	height: 20px;
	border-radius: 30px;
	flex-shrink: 0;
}

.unrt-archive-pill {
	background-color: var(--unrt-accent, #00a8c1);
}

.unrt-archive-title {
	font-size: 24px;
	font-weight: 700;
	color: rgb(0, 84, 108);
	line-height: 1.4;
	white-space: nowrap;
	flex-shrink: 0;
	margin: 0;
}

.unrt-archive-lines {
	display: flex;
	align-items: center;
	gap: 8px;
	/* Ocupa todo el espacio restante después del pill y el título */
	flex: 1;
	min-width: 0;
}

.unrt-archive-line {
	height: 8px !important;
	border-radius: 30px;
	display: block;
	background-color: var(--unrt-accent, #00a8c1);
}

/* Proporciones flex: el espacio disponible se reparte 1:3:7 */
.unrt-archive-line-sm  { flex: 1; }
.unrt-archive-line-md  { flex: 3; }
.unrt-archive-line-lg  { flex: 7; }

/* ── Diplomatura + Curso: barras de encabezado en rojo (estilo diplomatura) ──
   El texto del título NO se colorea de rojo (queda en el teal oscuro de
   .unrt-archive-title). El botón CTA mantiene un color fijo propio,
   para no heredar el rojo a través de --unrt-accent. ─────────────────── */
.unrt-cpt-diplomatura .unrt-archive-pill,
.unrt-cpt-diplomatura .unrt-archive-line,
.unrt-cpt-curso .unrt-archive-pill,
.unrt-cpt-curso .unrt-archive-line {
	background-color: #e83f40;
}

.unrt-cpt-diplomatura .unrt-link-btn--cta,
.unrt-cpt-curso .unrt-link-btn--cta {
	background-color: #00a8c1;
	color: #fff !important;
	font-weight: normal;
	border-color: transparent;
}

.unrt-cpt-diplomatura .unrt-link-btn--cta:hover,
.unrt-cpt-curso .unrt-link-btn--cta:hover {
	background-color: rgb(0, 84, 108);
	color: #fff !important;
}

/* Texto de contenido libre (ej. Fundamentación) no va en negro */
.unrt-cpt-diplomatura .unrt-rich-content,
.unrt-cpt-curso .unrt-rich-content {
	color: rgb(0, 84, 108);
}

/* ── Grid de cards ────────────────────────────────────────────────────────── */
.unrt-cards-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.unrt-cards-grid.unrt-col-1 {
	grid-template-columns: 1fr;
	max-width: 620px;
}

@media (max-width: 768px) {
	.unrt-cards-grid,
	.unrt-cards-grid.unrt-col-1 {
		grid-template-columns: 1fr;
		max-width: none;
	}
}

/* ── Card individual ──────────────────────────────────────────────────────── */
.unrt-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background-color: rgb(175, 198, 205);
	border-radius: 30px;
	padding: 20px;
	text-decoration: none !important;
	min-height: 180px;
	transition: filter 0.2s, transform 0.2s;
}

.unrt-card:hover {
	filter: brightness(0.94);
	transform: translateY(-2px);
}

.unrt-card-title {
	color: rgb(0, 84, 108);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
	text-decoration: none;
}

.unrt-card-icon {
	align-self: flex-end;
	color: rgb(0, 84, 108);
	font-size: 42px;
	font-weight: 300;
	line-height: 1;
	margin-top: 16px;
}

/* ── Sub-sección (ej: "Escuela de Gestión") ──────────────────────────────── */
.unrt-subsection-title {
	font-size: 20px;
	font-weight: 700;
	color: rgb(0, 84, 108);
	margin: 32px 0 16px;
}

/* ── Estado vacío ─────────────────────────────────────────────────────────── */
.unrt-archive-empty {
	padding: 40px;
	text-align: center;
	color: #777;
	background: #f5f5f5;
	border-radius: 12px;
}

/* ── Paginación ───────────────────────────────────────────────────────────── */
.unrt-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.unrt-pagination a,
.unrt-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	color: rgb(0, 84, 108);
	border: 2px solid rgb(0, 168, 193);
}

.unrt-pagination .current {
	background: rgb(0, 168, 193);
	color: #fff;
}
