/*
 * Ficha de carrera (plantilla PHP). Replica la estructura que antes daba
 * WPBakery; los colores, fuentes e íconos siguen saliendo del CSS propio de
 * cada ficha («CSS de la ficha»), que usa las mismas clases.
 */

.dfc-ficha {
	flex: 1 1 100%;
	width: 100%;
	min-width: 0;
	font-family: 'Lato', sans-serif;
	color: #1a1a1a;
}

.dfc-ficha *,
.dfc-ficha *::before,
.dfc-ficha *::after {
	box-sizing: border-box;
}

/*
 * Filas a todo el ancho de la ventana, como las filas «estiradas» de WPBakery.
 * ficha-carrera.js calcula la distancia a cada borde (--dfc-izq / --dfc-der);
 * mientras tanto se usan 30px, que es lo correcto hasta 1440px de ancho.
 * El padding horizontal lo da .modo-mobile (CSS de la ficha).
 */
#dfc-ficha > .dfc-fila {
	width: auto !important;
	margin: 0 calc(-1 * var(--dfc-der, 30px)) 0 calc(-1 * var(--dfc-izq, 30px)) !important;
}

/* Columna (clase de la ficha) > contenedor interno (estilo del bloque), como en WPBakery. */
.dfc-col-inner {
	padding: 5px 15px 0;
}

.dfc-ficha h2,
.dfc-ficha h3,
.dfc-ficha h4 {
	margin-top: 0;
	text-align: left;
	text-transform: none;
}

.dfc-titulo {
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;
	color: #1a1a1a;
}

/*
 * Valores por defecto de WPBakery con especificidad mínima (:where), para que
 * el CSS propio de cada ficha los pueda anular igual que antes.
 */
:where(#dfc-ficha) .wpb_content_element {
	margin-bottom: 35px;
}

:where(#dfc-ficha) .wpb_text_column :last-child {
	margin-bottom: 0;
}

:where(#dfc-ficha) .vc_btn3-container {
	margin-bottom: 21.739px;
}

:where(#dfc-ficha) .vc_btn3-container.vc_btn3-inline {
	display: inline-block;
	vertical-align: top;
}

:where(#dfc-ficha) .vc_btn3-container.vc_btn3-center {
	text-align: center;
}

:where(#dfc-ficha) .vc_btn3-container.vc_btn3-right {
	text-align: right;
}

.carrera-detalles > :last-child {
	margin-bottom: 0;
}

/* Filas internas y columnas de bloques de contenido. */
.dfc-ficha .dfc-fila .dfc-fila {
	display: flex;
	flex-wrap: wrap;
	margin-left: -15px;
	margin-right: -15px;
}

.dfc-ficha .dfc-fila .dfc-fila > .dfc-col {
	flex: 1 1 100%;
	min-width: 0;
}

.dfc-ficha .dfc-fila .dfc-fila > .dfc-col-1-2 {
	flex-basis: 50%;
}

.dfc-ficha .dfc-fila .dfc-fila > .dfc-col-1-3 {
	flex-basis: 33.333%;
}

.dfc-ficha .dfc-fila .dfc-fila > .dfc-col-2-3 {
	flex-basis: 66.666%;
}

/* ---------- Tarjetas (La carrera / Campo laboral) ---------- */

.dfc-cards {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.dfc-card {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 17.5px;
}

.dfc-card-head {
	padding-top: 10px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.dfc-card-overlay {
	padding: 0 15px;
}

.dfc-ficha .dfc-card-head h3 {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}

.dfc-card-body {
	flex: 1 1 auto;
}

.dfc-card-body > .dfc-texto {
	padding-top: 5px;
	margin-bottom: 0;
}

/* ---------- Detalles ---------- */

.dfc-detalles {
	display: flex;
	flex-wrap: wrap;
}

.dfc-detalles-col {
	flex: 1 1 0;
	min-width: 0;
	padding: 17px 10px 18px;
}

/* margin-top: el padding-top de 5px de las columnas internas de WPBakery. */
.dfc-detalles .carrera-detalles {
	height: calc(100% - 5px);
	margin-top: 5px;
	padding: 37.5px;
}

.dfc-ficha .carrera-detalles-titulo {
	margin: 0;
	font-size: 20px;
}

.dfc-detalles .lista-detalles {
	margin-bottom: 0;
}

.dfc-detalles .lista-detalles ul {
	margin: 0;
	list-style: none;
}

/* ---------- Malla ---------- */

/* El padding sale del estilo guardado de la caja y de .cont-gris (CSS de la ficha). */
.dfc-ficha .dfc-malla {
	width: auto;
	margin: 20px 0;
}

.dfc-malla--2 {
	display: flex;
}

.dfc-malla-col {
	flex: 1 1 0;
	min-width: 0;
	padding: 5px 15px 0;
}

.dfc-ficha .texto-malla {
	margin: 0;
	padding-bottom: 30px;
	font-size: 20px;
	font-weight: 300;
	line-height: 1.2;
	color: #1a1a1a;
}

/* En la malla, un título que sigue a un botón inline baja a su propia línea. */
.dfc-malla .texto-malla {
	display: block;
}

/* Botones: valores de WPBakery con especificidad mínima (el tema y la ficha los ajustan). */
:where(#dfc-ficha) .vc_btn3 {
	display: inline-block;
	margin-bottom: 0;
	padding: 14px 20px;
	border: 1px solid transparent;
	border-radius: 5px;
	background: transparent;
	font-size: 14px;
	line-height: normal;
	text-align: center;
	vertical-align: middle;
	text-decoration: none;
	cursor: pointer;
}

:where(#dfc-ficha) .vc_btn3.vc_btn3-size-xs {
	padding: 8px 12px;
	font-size: 12px;
}

:where(#dfc-ficha) .vc_btn3.vc_btn3-size-sm {
	padding: 11px 16px;
	font-size: 12px;
}

:where(#dfc-ficha) .vc_btn3.vc_btn3-size-lg {
	padding: 18px 25px;
	font-size: 18px;
}

:where(#dfc-ficha) .vc_btn3.vc_btn3-shape-round {
	border-radius: 2em;
}

:where(#dfc-ficha) .vc_btn3.vc_btn3-shape-square {
	border-radius: 0;
}

:where(#dfc-ficha) .vc_btn3.vc_btn3-style-outline-custom {
	border-width: 2px;
	border-style: solid;
	background: transparent;
}

.dfc-ficha .dfc-btn:hover,
.dfc-ficha .dfc-btn:focus {
	background: #fff;
	text-decoration: none;
}

.dfc-ficha .icon-descarga {
	width: 30px;
	height: 30px;
}

/* ---------- Sedes (respaldo sin mantenedor) ---------- */

/* Fila interna de WPBakery: margen de -15px más el padding guardado en el bloque. */
.dfc-sedes {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}

.dfc-sede-inner {
	padding: 20px;
}

.dfc-ficha .dfc-sede h4 {
	margin: 0;
	font-size: 20px;
	font-weight: 400;
}

/* En escritorio el botón no se ve, pero su fila deja el mismo espacio que en WPBakery. */
.dfc-ficha .dfc-ver-todo {
	height: 0;
	margin: 20px 0 0;
	overflow: hidden;
	visibility: hidden;
}

.dfc-ficha .dfc-ver-todo .vc_btn3 {
	border-width: 1px;
	border-color: #307fe2;
	color: #307fe2;
	background: transparent;
}

.dfc-ficha .dfc-ver-todo .vc_btn3:hover,
.dfc-ficha .dfc-ver-todo .vc_btn3:focus {
	border-color: #fff;
	background: #fff;
}

@media (max-width: 500px) {
	.dfc-ficha .dfc-ver-todo {
		height: auto;
		margin: 30px 0 20px;
		visibility: visible;
	}

	.dfc-sedes--plegada .dfc-sede:nth-child(n+4) {
		display: none;
	}
}

/* ---------- Video ---------- */

.dfc-video {
	width: 50%;
	margin-left: auto;
	margin-right: auto;
}

.dfc-video iframe {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.dfc-detalles .carrera-detalles {
		margin-left: -7.5px;
		margin-right: -7.5px;
	}

	.dfc-card,
	.dfc-detalles-col,
	.dfc-ficha .dfc-fila .dfc-fila > .dfc-col {
		flex-basis: 100%;
	}

	.dfc-malla--2 {
		flex-direction: column;
		gap: 0;
	}

	.dfc-video {
		width: 100%;
	}
}


/* Sedes desde el mantenedor de aranceles (antes iba dentro de una columna de WPBakery). */
.dfc-ficha .dma-sa-row {
	padding-top: 5px;
}

/* ---------- Video emergente ---------- */

.dfc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483646;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
}

.dfc-modal[hidden] {
	display: none;
}

.dfc-modal-caja {
	position: relative;
	width: 70%;
	max-width: 1800px;
	height: 70vh;
	overflow: hidden;
	border-radius: 12px;
	background: #000;
}

.dfc-modal-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.dfc-modal-video--movil {
	display: none;
}

.dfc-modal-cerrar {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 2;
	padding: 6px 10px;
	border: 0;
	border-radius: 2px;
	background: #000;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.dfc-modal-cerrar:focus-visible {
	outline: 2px solid #ffb800;
	outline-offset: 2px;
}

@media (max-width: 768px) {
	.dfc-modal-caja {
		width: 90%;
	}

	.dfc-modal-video--escritorio {
		display: none;
	}

	.dfc-modal-video--movil {
		display: block;
	}
}
