/**
 * plugins/themes/utpTheme/styles/utp.css
 * Universidad Tecnológica de Pereira - Proceso Editorial
 *
 * Estilos propios del tema (sin Bootstrap ni CDN). Las hojas de estilo que
 * cada revista y el sitio ya tienen cargadas en Ajustes > Sitio web >
 * Apariencia se siguen aplicando encima de estas, como en OJS 3.3.
 * --utp-base es el "color base" configurado en cada revista.
 */

/* --utp-base lo define UtpThemePlugin::init() con el color de cada revista */
:root {
	--utp-ink: #1a2332;
	--utp-link: #004278;
	--utp-menu-bg: #ffffff;
	--utp-menu-hover: #e4e4e4;
	--utp-alert: #bb0000;
}

/* ---------- 1. Barra superior ---------- */
.utp_topbar.pkp_structure_head {
	background: var(--utp-base, #1E4D8C);
	border-bottom: 0;
	height: auto;
	min-height: 90px;
	position: relative;
	z-index: 20;
}

.utp_topbar_inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 90px;
	padding: 0 2%;
	max-width: 1920px;
	margin: 0 auto;
}

.utp_brand {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 0 1 auto;
	min-width: 0;
}

.utp_brand .logo,
.utp_gov_logo .logo2 {
	display: block;
	max-height: 64px;
	width: auto;
	max-width: 100%;
}

.utp_brand .vl {
	display: block;
	height: 48px;
	border-right: 2px solid #fff;
}

.utp_brand_title,
.utp_brand_title:hover,
.utp_brand_title:focus {
	color: #fff;
	text-decoration: none;
}

.utp_brand_title .tituloSup {
	color: #fff;
	font-size: 16pt;
	white-space: nowrap;
}

.utp_gov_logo {
	flex: 0 0 auto;
}

/* Menú de usuario */
.utp_usernav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	position: relative;
}

.utp_usernav .pkp_navigation_user {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.utp_usernav .pkp_navigation_user > li {
	position: relative;
}

.utp_usernav .pkp_navigation_user > li > a {
	color: #fff;
	text-decoration: none;
	display: inline-block;
	padding: .5rem 0;
}

.utp_usernav .pkp_navigation_user > li > a:hover,
.utp_usernav .pkp_navigation_user > li > a:focus {
	text-decoration: underline;
}

.utp_usernav .task_count {
	background: var(--utp-alert);
	color: #fff;
	border-radius: 999px;
	font-size: 12px;
	padding: 1px 6px;
	margin-left: .25rem;
}

/* ---------- 2. Banner ---------- */
.utp_banner {
	position: relative;
	line-height: 0;
	background: var(--utp-base, #1E4D8C);
}

.utp_banner .imagen-banner {
	display: block;
}

.utp_banner .imagen-banner > img {
	width: 100%;
	height: auto;
	display: block;
}

.utp_banner .utp_banner_text {
	display: block;
	line-height: 1.3;
	color: #fff;
	font-size: 2rem;
	padding: 1.5rem 10%;
	text-decoration: none;
}

/* ---------- 3. Menú principal ---------- */
.utp_primarynav {
	background: var(--utp-base, #1E4D8C);
	position: relative;
	z-index: 15;
}

.utp_primarynav_inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0 1rem;
	padding: 0 10%;
	min-height: 58px;
	max-width: 1920px;
	margin: 0 auto;
}

.utp_primarynav .pkp_navigation_primary {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.utp_primarynav .pkp_navigation_primary > li {
	position: relative;
}

.utp_primarynav .pkp_navigation_primary > li > a {
	display: inline-block;
	color: #fff;
	padding: 1rem 1rem;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.utp_primarynav .pkp_navigation_primary > li > a:hover,
.utp_primarynav .pkp_navigation_primary > li > a:focus {
	color: #fff;
	border-bottom-color: #fff;
}

/* Submenús */
.utp_primarynav .pkp_navigation_primary ul,
.utp_usernav .pkp_navigation_user ul {
	position: absolute;
	top: 100%;
	left: -9999px;
	min-width: 14rem;
	margin: 0;
	padding: .35rem 0;
	list-style: none;
	background: var(--utp-menu-bg);
	border: 1px solid #d3d3d3;
	border-radius: 3px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	z-index: 1000;
}

.utp_usernav .pkp_navigation_user ul {
	min-width: 12rem;
}

.utp_primarynav .pkp_navigation_primary li:hover > ul,
.utp_primarynav .pkp_navigation_primary li:focus-within > ul,
.utp_usernav .pkp_navigation_user li:hover > ul,
.utp_usernav .pkp_navigation_user li:focus-within > ul {
	left: 0;
}

.utp_usernav .pkp_navigation_user > li:last-child:hover > ul,
.utp_usernav .pkp_navigation_user > li:last-child:focus-within > ul {
	left: auto;
	right: 0;
}

.utp_primarynav .pkp_navigation_primary ul a,
.utp_usernav .pkp_navigation_user ul a {
	display: block;
	padding: .5rem 1rem;
	color: var(--utp-link);
	text-decoration: none;
	white-space: normal;
}

.utp_primarynav .pkp_navigation_primary ul a:hover,
.utp_primarynav .pkp_navigation_primary ul a:focus,
.utp_usernav .pkp_navigation_user ul a:hover,
.utp_usernav .pkp_navigation_user ul a:focus {
	background: var(--utp-menu-hover);
	color: #484848;
}

.utp_search,
.utp_search:hover,
.utp_search:focus {
	color: #fff;
	text-decoration: none;
	padding: 1rem 0;
	white-space: nowrap;
}

.utp_search:hover,
.utp_search:focus {
	font-weight: bold;
}

/* Botones de menú: solo en pantallas pequeñas */
.utp_menu_toggle {
	display: none;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 4px;
	color: #fff;
	padding: .45rem .8rem;
	font: inherit;
	cursor: pointer;
}

.utp_menu_toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------- 4. Pie de página ---------- */
.utp_theme .pkp_structure_footer_wrapper {
	margin-top: 2rem;
}

.utp_theme .pkp_footer_content {
	padding: 0;
}

/* ---------- 5. Contador de vistas y descargas ---------- */
.utp_article_stats .value {
	list-style: none;
	margin: 0;
	padding: 0;
}

.utp_article_stats li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: .3rem 0;
	border-bottom: 1px solid #eee;
}

.utp_article_stats .utp_stat_value {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.utp_summary_stats {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1.25rem;
	margin-top: .4rem;
	font-size: .85rem;
	color: #5a5a5a;
}

/* ---------- 6. Pantallas medianas y pequeñas ---------- */
@media (max-width: 991px) {
	.utp_primarynav_inner {
		padding: 0 4%;
	}

	.utp_menu_toggle--primary {
		display: inline-flex;
		align-items: center;
		gap: .5rem;
		margin: .6rem 0;
	}

	.utp_primarynav .pkp_navigation_primary {
		display: none;
		order: 3;
		flex: 1 0 100%;
		flex-direction: column;
		padding-bottom: .75rem;
	}

	.utp_primarynav .pkp_navigation_primary.utp_is_open {
		display: flex;
	}

	.utp_primarynav .pkp_navigation_primary > li > a {
		padding: .6rem 0;
	}

	.utp_primarynav .pkp_navigation_primary ul {
		position: static;
		left: auto;
		box-shadow: none;
		border: 0;
		background: transparent;
		padding: 0 0 0 1rem;
	}

	.utp_primarynav .pkp_navigation_primary ul a {
		color: #fff;
		padding: .4rem 0;
	}

	.utp_primarynav .pkp_navigation_primary ul a:hover,
	.utp_primarynav .pkp_navigation_primary ul a:focus {
		background: transparent;
		color: #fff;
		text-decoration: underline;
	}
}

@media (max-width: 767px) {
	.utp_topbar_inner {
		padding: .5rem 4%;
		min-height: 74px;
	}

	.utp_brand .vl,
	.utp_brand_title {
		display: none;
	}

	.utp_brand .logo,
	.utp_gov_logo .logo2 {
		max-height: 50px;
	}

	.utp_usernav {
		order: 3;
		flex: 0 0 auto;
	}

	.utp_menu_toggle--user {
		display: inline-flex;
	}

	.utp_usernav .pkp_navigation_user {
		display: none;
		position: absolute;
		top: 100%;
		right: 0;
		flex-direction: column;
		gap: 0;
		min-width: 13rem;
		background: var(--utp-menu-bg);
		border: 1px solid #d3d3d3;
		box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
		padding: .35rem 0;
		z-index: 1000;
	}

	.utp_usernav .pkp_navigation_user.utp_is_open {
		display: flex;
	}

	.utp_usernav .pkp_navigation_user > li > a,
	.utp_usernav .pkp_navigation_user ul a {
		color: var(--utp-link);
		padding: .5rem 1rem;
	}

	.utp_usernav .pkp_navigation_user ul {
		position: static;
		box-shadow: none;
		border: 0;
		padding: 0 0 0 .75rem;
	}
}

/* ---------- 7. Contenido del "Pie de página" configurado en el panel ----------
 * El HTML del pie (sitio y revistas) se escribió con clases de Bootstrap 5.
 * Aquí se reproducen solo las que usa, limitadas al pie para no chocar con
 * las clases propias de OJS (por ejemplo, .row en la página del artículo).
 */
.pkp_footer_content .row {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
}
.pkp_footer_content .row > * {
	flex-shrink: 0;
	width: 100%;
	max-width: 100%;
	padding-left: .75rem;
	padding-right: .75rem;
	box-sizing: border-box;
}
.pkp_footer_content .col-12 { flex: 0 0 auto; width: 100%; }
.pkp_footer_content .align-items-center { align-items: center; }
.pkp_footer_content .text-center { text-align: center; }
.pkp_footer_content .text-white,
.pkp_footer_content a.text-white { color: #fff; }
.pkp_footer_content .d-none { display: none; }
.pkp_footer_content .lh-lg { line-height: 2; }
.pkp_footer_content .mb-0 { margin-bottom: 0; }
.pkp_footer_content .mb-3 { margin-bottom: 1rem; }
.pkp_footer_content .mb-4 { margin-bottom: 1.5rem; }
.pkp_footer_content .pt-3 { padding-top: 1rem; }
.pkp_footer_content .pb-3 { padding-bottom: 1rem; }
.pkp_footer_content .p-2 { padding: .5rem; }

@media (min-width: 992px) {
	.pkp_footer_content .col-lg-5 { flex: 0 0 auto; width: 41.66666667%; }
	.pkp_footer_content .col-lg-7 { flex: 0 0 auto; width: 58.33333333%; }
	.pkp_footer_content .text-lg-start { text-align: left; }
	.pkp_footer_content .text-lg-end { text-align: right; }
	.pkp_footer_content .mb-lg-0 { margin-bottom: 0; }
	.pkp_footer_content .mb-lg-4 { margin-bottom: 1.5rem; }
}

@media (min-width: 1200px) {
	.pkp_footer_content .d-xl-none { display: none; }
	.pkp_footer_content .d-xl-inline { display: inline; }
}

/* Íconos de redes sociales: 30 px, como en el sitio actual */
.pkp_footer_content .social-icon-blue {
	display: inline-block;
	margin: 0 .35rem;
	line-height: 0;
}
.pkp_footer_content .social-icon-blue img {
	width: 30px !important;
	height: 30px !important;
	max-width: none;
}

/* Pie a todo el ancho, con el fondo institucional */
.pkp_footer_content .footer-main {
	background-color: #BCBDC0;
	color: #313030;
	padding: 20px;
	margin: 0;
}
.pkp_footer_content .footer-main__title {
	font-size: 1.2rem;
	margin-top: 0;
}
.pkp_footer_content .footer-main a {
	color: #004278;
}
.pkp_footer_content .correo-documentos {
	display: inline-block;
	background: #003D6C;
	color: #fff;
	padding: 5px;
}
