/* =========================================================
   Filtro Entradas AJAX v1.1
   Los selectores van prefijados con .fe-wrap y los botones
   usan !important para que el tema / Elementor no los pise.
   ========================================================= */

.fe-wrap {
	--fe-cols: 3;
	--fe-cols-t: 2;
	--fe-cols-m: 1;
	--fe-radius: 14px;
	--fe-color: #1c566c;
	--fe-color-hover: #144252;
	--fe-color-soft: #eef4f6;
	--fe-gap: 28px;
	--fe-sidebar: 260px;
	--fe-text: #1f2937;
	--fe-muted: #6b7280;
	--fe-border: #e5e7eb;
	--fe-font: "Montserrat", sans-serif;
	color: var(--fe-text);
	font-family: var(--fe-font);
	box-sizing: border-box;
}
.fe-wrap *,
.fe-wrap *::before,
.fe-wrap *::after { box-sizing: border-box; }

/* ---------- Layout ---------- */
.fe-wrap.fe-diseno-lateral.fe-con-lateral {
	display: grid;
	grid-template-columns: var(--fe-sidebar) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
}
.fe-wrap.fe-diseno-lateral .fe-sidebar {
	position: sticky;
	top: 100px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.fe-wrap.fe-diseno-superior .fe-sidebar {
	display: flex;
	flex-wrap: wrap-reverse;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
}
.fe-wrap .fe-main { min-width: 0; }

/* ---------- Widgets laterales ---------- */
.fe-wrap .fe-widget__title {
	margin: 0 0 14px !important;
	padding: 0 0 10px !important;
	border-bottom: 2px solid var(--fe-color-soft);
	font-family: var(--fe-font) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: .6px;
	line-height: 1.3 !important;
	color: var(--fe-color) !important;
}

/* ---------- Buscador ---------- */
.fe-wrap .fe-search { width: 100%; }
.fe-wrap.fe-diseno-superior .fe-search { flex: 1 1 240px; max-width: 320px; }
.fe-wrap .fe-search__input {
	width: 100% !important;
	height: auto !important;
	margin: 0 !important;
	padding: 12px 16px 12px 42px !important;
	border: 1px solid var(--fe-border) !important;
	border-radius: 500px !important;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center !important;
	font-family: var(--fe-font) !important;
	font-size: 13px !important;
	line-height: 16px !important;
	color: var(--fe-text) !important;
	box-shadow: none !important;
	outline: none !important;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.fe-wrap .fe-search__input:focus {
	border-color: var(--fe-color) !important;
	box-shadow: 0 0 0 3px rgba(28, 86, 108, .15) !important;
}

/* ---------- Estilo base de botones (según especificación) ---------- */
.fe-wrap .fe-filter,
.fe-wrap .fe-card__btn,
.fe-wrap .fe-more {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 !important;
	background-color: #1c566c !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 500px 500px 500px 500px !important;
	padding: 12px 16px 12px 16px !important;
	font-family: "Montserrat", sans-serif !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	text-transform: uppercase !important;
	line-height: 16px !important;
	letter-spacing: 0.3px !important;
	color: #ffffff !important;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.fe-wrap .fe-card__btn:hover,
.fe-wrap .fe-card__btn:focus,
.fe-wrap .fe-more:hover,
.fe-wrap .fe-more:focus {
	background-color: var(--fe-color-hover) !important;
	color: #ffffff !important;
}

/* ---------- Filtros ---------- */
.fe-wrap .fe-filters {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	gap: 8px;
}
.fe-wrap.fe-diseno-lateral .fe-filters { flex-direction: column; }
.fe-wrap.fe-diseno-superior .fe-filters { flex-wrap: wrap; }
.fe-wrap .fe-filters li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.fe-wrap .fe-filters li::before,
.fe-wrap .fe-filters li::marker { content: none !important; }

/* Filtro inactivo: misma forma y tipografía, en tono suave */
.fe-wrap .fe-filter {
	background-color: var(--fe-color-soft) !important;
	color: #1c566c !important;
}
.fe-wrap.fe-diseno-lateral .fe-filter {
	width: 100%;
	justify-content: space-between;
	text-align: left;
}
.fe-wrap .fe-filter:hover,
.fe-wrap .fe-filter:focus-visible {
	background-color: #dbe8ec !important;
	color: #1c566c !important;
}
/* Filtro activo: estilo exacto del botón */
.fe-wrap .fe-filter.is-active {
	background-color: #1c566c !important;
	color: #ffffff !important;
}

.fe-wrap .fe-count {
	min-width: 24px;
	padding: 2px 8px;
	border-radius: 500px;
	background: rgba(28, 86, 108, .12);
	font-size: 11px;
	line-height: 14px;
	text-align: center;
}
.fe-wrap .fe-filter.is-active .fe-count { background: rgba(255, 255, 255, .2); }

/* ---------- Grilla ---------- */
.fe-wrap .fe-grid {
	display: grid;
	grid-template-columns: repeat(var(--fe-cols), minmax(0, 1fr));
	gap: var(--fe-gap);
	transition: opacity .2s ease;
}
.fe-wrap.is-loading .fe-grid { opacity: .4; pointer-events: none; }

/* ---------- Tarjeta ---------- */
.fe-wrap .fe-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	background: #fff;
	border: 1px solid var(--fe-border);
	border-radius: var(--fe-radius);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}
.fe-wrap .fe-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(28, 86, 108, .12);
}
.fe-wrap .fe-card__img {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--fe-color-soft);
}
.fe-wrap .fe-card__img img,
.fe-wrap .fe-card__placeholder {
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0 !important;
	transition: transform .4s ease;
}
.fe-wrap .fe-card:hover .fe-card__img img { transform: scale(1.04); }

.fe-wrap .fe-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px;
}
.fe-wrap .fe-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-family: var(--fe-font);
	font-size: 12px;
	color: var(--fe-muted);
}
.fe-wrap .fe-card__cat {
	color: var(--fe-color);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.fe-wrap .fe-card__cat + .fe-card__date::before {
	content: "•";
	margin-right: 10px;
	color: var(--fe-border);
}
.fe-wrap .fe-card__title {
	margin: 0 0 10px !important;
	padding: 0 !important;
	font-family: var(--fe-font) !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
.fe-wrap .fe-card__title a { color: var(--fe-text) !important; text-decoration: none !important; }
.fe-wrap .fe-card__title a:hover { color: var(--fe-color) !important; }
.fe-wrap .fe-card__excerpt {
	flex: 1;
	margin: 0 0 20px !important;
	font-family: var(--fe-font);
	font-size: 14px;
	line-height: 1.65;
	color: var(--fe-muted);
}
.fe-wrap .fe-card__btn { align-self: flex-start; }

/* ---------- Vacío y cargar más ---------- */
.fe-wrap .fe-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 48px 0;
	text-align: center;
	color: var(--fe-muted);
}
.fe-wrap .fe-more-wrap { text-align: center; margin-top: 36px; }
.fe-wrap .fe-more[hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.fe-wrap .fe-grid { grid-template-columns: repeat(var(--fe-cols-t), minmax(0, 1fr)); }
	.fe-wrap.fe-diseno-lateral.fe-con-lateral { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 767px) {
	.fe-wrap .fe-grid { grid-template-columns: repeat(var(--fe-cols-m), minmax(0, 1fr)); }
	/* En móvil la barra lateral pasa arriba y los filtros quedan en fila deslizable */
	.fe-wrap.fe-diseno-lateral.fe-con-lateral { display: block; }
	.fe-wrap.fe-diseno-lateral .fe-sidebar { position: static; gap: 16px; margin-bottom: 24px; }
	.fe-wrap.fe-diseno-lateral .fe-widget--filters .fe-widget__title { display: none; }
	.fe-wrap.fe-diseno-lateral .fe-filters {
		flex-direction: row;
		overflow-x: auto;
		padding-bottom: 4px !important;
		scrollbar-width: none;
	}
	.fe-wrap.fe-diseno-lateral .fe-filters::-webkit-scrollbar { display: none; }
	.fe-wrap.fe-diseno-lateral .fe-filter { width: auto; white-space: nowrap; }
	.fe-wrap.fe-diseno-superior .fe-search { max-width: none; }
}
