/**
 * Mosaico Licitaciones - estilos.
 */

.elementor-widget-mosaico_licitaciones,
.elementor-widget-mosaico_licitaciones > .elementor-widget-container {
	width: 100%;
	max-width: 100%;
}

.ml-wrapper,
.ml-wrapper *,
.ml-wrapper *::before,
.ml-wrapper *::after {
	box-sizing: border-box;
}

.ml-wrapper {
	width: 100%;
}

/* Encabezado */
.ml-header {
	margin-bottom: 32px;
}

.ml-section-title {
	margin: 0 0 12px;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	line-height: 1.1;
	color: inherit;
}

.ml-section-subtitle {
	margin: 0;
	max-width: 70ch;
	font-size: 1.0625rem;
	line-height: 1.6;
}

/* Mosaico */
.ml-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 28px;
	row-gap: 40px;
	align-items: stretch;
}

@media (max-width: 1024px) {
	.ml-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 20px;
		row-gap: 32px;
	}
}

@media (max-width: 767px) {
	.ml-grid {
		grid-template-columns: minmax(0, 1fr);
		column-gap: 16px;
		row-gap: 28px;
	}
}

.ml-item {
	display: flex;
	min-width: 0;
}

/* Tarjeta */
.ml-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	background-color: transparent;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Toda la tarjeta es clicable. */
.ml-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
}

.ml-card a,
.ml-card img {
	-webkit-user-drag: none;
}

.ml-image {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	margin-bottom: 20px;
	overflow: hidden;
	border-radius: 16px;
	text-decoration: none;
}

.ml-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ml-card:hover .ml-image img {
	transform: scale(1.05);
}

.ml-image--placeholder {
	background-color: rgba(128, 128, 128, 0.25);
}

/* Distintivo de estado (Publicada = verde, Adjudicada = rojo) */
.ml-badge {
	--ml-badge-off: 12px;
	position: absolute;
	top: var(--ml-badge-off);
	left: var(--ml-badge-off);
	z-index: 2;
	display: inline-block;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

.ml-badge--right {
	left: auto;
	right: var(--ml-badge-off);
}

.ml-badge--publicada {
	background-color: #1e9e4a;
}

.ml-badge--adjudicada {
	background-color: #d63638;
}

/* Sin imagen: el distintivo va dentro del flujo de la tarjeta. */
.ml-badge--inline {
	position: static;
	align-self: flex-start;
	margin-bottom: 12px;
	box-shadow: none;
}

/* ID de la licitación */
.ml-id {
	display: flex;
	flex-direction: column;
	align-self: flex-start;
	gap: 2px;
	margin-bottom: 12px;
	padding: 8px 12px;
	background-color: rgba(128, 128, 128, 0.14);
	border-radius: 8px;
}

.ml-id__label {
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

.ml-id__value {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	font-variant-numeric: tabular-nums;
	word-break: break-word;
}

.ml-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 0.5em;
	margin-bottom: 8px;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.ml-category + .ml-date::before {
	content: "\00B7";
	margin-right: 0.5em;
}

.ml-title {
	margin: 0 0 14px;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.25;
}

.ml-title a {
	position: relative;
	z-index: 2;
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease, opacity 0.25s ease;
}

.ml-card:hover .ml-title a,
.ml-title a:focus-visible {
	opacity: 0.8;
}

.ml-excerpt {
	margin: 0 0 16px;
	font-size: 1rem;
	line-height: 1.6;
}

/* Monto, cierre y financiamiento */
.ml-details {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	line-height: 1.45;
}

.ml-detail__label {
	font-weight: 600;
	opacity: 0.75;
}

.ml-button-wrap {
	position: relative;
	z-index: 2;
	margin-top: auto;
}

.ml-button {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
	text-decoration: none;
	background-color: transparent;
	transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.ml-button:hover,
.ml-button:focus-visible {
	opacity: 0.85;
}

/* Paginación */
.ml-pagination {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}

.ml-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ml-pagination li {
	margin: 0;
	padding: 0;
}

.ml-pagination li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	font-weight: 600;
	line-height: 1;
	color: inherit;
	text-decoration: none;
	background-color: rgba(128, 128, 128, 0.14);
	border-radius: 8px;
	transition: color 0.25s ease, background-color 0.25s ease;
}

.ml-pagination li .page-numbers.current,
.ml-pagination li a.page-numbers:hover,
.ml-pagination li a.page-numbers:focus-visible {
	color: #fff;
	background-color: #1e1e1e;
}

.ml-pagination li .page-numbers.dots {
	background: transparent;
}

.ml-empty {
	padding: 24px;
	text-align: center;
	border: 1px dashed currentColor;
	opacity: 0.7;
}

.ml-wrapper .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ml-wrapper *,
	.ml-wrapper *::before,
	.ml-wrapper *::after {
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Filtros ---------- */
.ml-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 12px 20px;
	margin-bottom: 28px;
}

.ml-filter-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ml-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	color: #1e1e1e;
	background-color: #f0f0f1;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.25s ease, background-color 0.25s ease;
}

.ml-filter.is-active,
.ml-filter:hover,
.ml-filter:focus-visible {
	color: #fff;
	background-color: #1e1e1e;
}

.ml-filter__count {
	font-size: 0.85em;
	font-weight: 500;
	opacity: 0.75;
}

.ml-year-form {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.ml-year-label {
	font-weight: 600;
	font-size: 0.95em;
}

.ml-year-select {
	min-width: 140px;
	padding: 8px 32px 8px 14px;
	font-size: 0.95em;
	color: #1e1e1e;
	background-color: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 999px;
}

@media (max-width: 767px) {
	.ml-filters {
		gap: 10px;
	}
	.ml-filter-tabs {
		width: 100%;
	}
	.ml-year-form {
		width: 100%;
	}
	.ml-year-select {
		flex: 1;
	}
}
