<!-- start Simple Custom CSS and JS -->
<style type="text/css">
/* ================================
   GRID de 3 columnas para #posts-results
=============================== */
#posts-results {
	display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 30px;
    row-gap: 60px;
    margin-top: 60px; /* separa del contador, ajusta si deseas */
}

/* ================================
   Tarjeta .post-item
=============================== */
.post-item {
    display: flex;           /* layout vertical */
    flex-direction: column;  /* imagen, luego filas */
}

/* Imagen: 380×240 */
.post-item img {
    width: 100%; 
	max-width: 100%;
    height: 240px;
    object-fit: cover;       /* recorta la imagen si no es 380×240 exacta */
    border-radius: 20px;
}

/* ================================
   Fila 1: Tipo (mayúscula) + Edición
=============================== */
.post-row-1 {
    margin-top: 16px; /* separa de la imagen */
    display: flex;
    align-items: center;
    gap: 16px; /* espacio horizontal entre “tipo” y “edicion” */
}

/* Tipo */
.post-type {
    font-family: Montserrat;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%;
    text-transform: uppercase;
    color: #042354; /* color si lo deseas en #042354 */
	display: flex;
	align-items: center;
}

/* Edición */
.post-edicion {
    font-family: Montserrat;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
    color: #667892;
}

/* ================================
   Título
=============================== */
.post-title {
    font-family: Montserrat;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 130%; /* ~23.4px */
    letter-spacing: -0.36px;
    color: #042354;
    margin-top: 13px; 
}

/* ================================
   Autor
=============================== */
.post-author {
    margin-top: 16px; /* separa del título */
}

/* ================================
   Fila 2: Fecha + Tema, centrados
=============================== */
.post-row-2 {
    margin-top: 16px; /* separa del autor */
    display: flex;
    align-items: center;
    justify-content: start; /* centrado horizontal */
    gap: 16px;               /* espacio entre fecha y tema */
}

/* Texto de Fecha y Tema */
.post-date,
.post-tema {
    display: inline-flex;      /* para alinear icono + texto */
    align-items: center;       /* centra verticalmente el icono */
    gap: 6px;                  /* espacio entre icono y texto */
    font-family: "TT Norms Pro";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    color: #667892;
}

/* Íconos a 18×18 */
.post-row-2 img {
    width: 18px;
    height: 18px;
}

/* ================================
   Filtrado, formulario, paginación, etc.
=============================== */
#posts-search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
}

#toggle-posts-filters,
#posts-clear-btn,
#posts-search-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
}

#posts-filters-dropdown {
    display: none;
    position: absolute;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ccc;
    border-radius: 0 0 30px 30px;
    padding: 16px;
    box-sizing: border-box;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: auto auto auto auto auto;
    gap: 16px;
	z-index: 100;
}

.filter-column h4 {
	display: flex;
	justify-content: space-between;
	align-items: center;
    margin-bottom: 20px;
	font-family: Montserrat;
	font-size: 16px;
	font-style: normal;
	font-weight: 600;
	line-height: 140%;
	color: #042354;
}


.filter-column label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    cursor: pointer;
}

#posts-results-counter {
	color: #3B485A;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 400;
	font-family: "TT Norms Pro";
    /* quita el grid si no deseas una distribución interna */
}

.posts-total-count {
    color: #3B485A;
	font-weight: 700;
}

.filter-column {
    height: 400px;
    overflow-y: auto;
}

/* ================================
   PASTILLAS (Filtros Activos)
=============================== */
#active-filters {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    background: #E5EDF6;
    color: #004EA8;
    border: 1px solid #E5EDF6;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14px;
}
.remove-pill {
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 6px;
    padding: 0;
}
.remove-pill img {
    width: 14px;
    height: 14px;
    display: block;
}
.clear-filters-btn {
    background: transparent;
    border: none;
    color: #042354;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.clear-filters-btn:hover {
    text-decoration: none;
}

.post-row-2 .post-date img {
	border-radius: 0;
}

.my-filter-svg{
	width: 24px;
	height: 24px;
	transition: color 0.3s ease;	
}

.my-filter-svg.active {
  fill: #042354;
}

/* ================
   TIPO (post-type-pill)
=============== */
.post-type-pill {
    padding: 2px 14px 2px 8px; /* top-right-bottom-left */
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
	font-weight: 700;
	font-family: 'Montserrat';
}
.post-type-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    /* background se pasa inline, para ser dinámico */
}

/* ================
   AUTOR
=============== */
/* Contenedor donde está la foto + info */
.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Imagen del autor: 48×48 circular */
.post-author-img {
    width: 48px !important;
    height: 48px !important;
    border-radius: 100% !important;
    object-fit: cover !important; /* recorta si no es exacta la foto */
}

/* Contenedor textual (nombre + rol) */
.post-author-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

/* Nombre => “Por: …” */
.post-author-name {
    color: #667892;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%; /* ~19.6px */
}

/* Rol => uppercase */
.post-author-rol {
    color: #667892;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%; 
    text-transform: uppercase;
    margin-top: 2px;
}

@media (max-width: 768px) {
	#posts-results {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 576px) {
	#posts-results {
		grid-template-columns: repeat(1, 1fr);
	}
}



#posts-search-form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    gap: 12px;
    flex-wrap: wrap; /* para que los botones bajen si no hay espacio */
	transition: border-radius 0.1s ease-in-out;
}

#posts-search-form.open {
    /* solo esquinas superiores redondeadas */
    border-radius: 12px 12px 0 0;
}

#posts-search-input {
    flex: 1;
    border: none;
    outline: none;
    color: #667892;
    font-size: 16px;
    padding: 12px 16px 12px 40px;
    border-radius: 8px;
    background: #fff url('https://memoria.ludik.pe/wp-content/uploads/2025/04/Search.svg') no-repeat 14px center;
    font-family: 'Montserrat';
    background-size: 18px;
}

#toggle-posts-filters,
#posts-clear-btn,
#posts-search-btn {
    border: none;
    border-radius: 8px;
    padding: 0px 20px;
    height: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Montserrat';
}

#toggle-posts-filters {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    color: #042354;
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
    border: 1px solid #B3C6C6;
    border-radius: 12px;
    height: 50px;
    padding: 0 20px;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    font-family: 'Montserrat';
    gap: 12px;
}

#toggle-posts-filters:hover {
    background: rgba(0, 78, 168, 0.10);
}

#toggle-posts-filters .filter-icon {
    width: 24px;
    height: 24px;
}

#toggle-posts-filters .dropdown-arrow {
    width: 12px;
    height: auto;
    margin-left: 26px;
}

#posts-clear-btn {
    background: transparent;
    color: #042354;
    transition: background 0.3s ease-in-out;
}

#posts-clear-btn:hover {
    background: rgba(0, 78, 168, 0.10);
}

#posts-search-btn {
    background: #ADD754;
    color: #042354;
}


/* ================================
   Estilo de casilla para .posts-filter-edicion
   (Mismo que .ediciones-year-checkbox)
=============================== */
.posts-filter-edicion,
.posts-filter-tema,
.posts-filter-category,
.posts-filter-month,
.posts-filter-year {
    /* Quitar apariencia nativa del navegador */
    appearance: none;
    -webkit-appearance: none;

    width: 18px;
    height: 18px;
    border-radius: 4px;

    /* Estado inactivo (sin marcar) */
    border: 1px solid #667892;
    background: #fff;

    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

/* Estado activo (checked) */
.posts-filter-edicion:checked,
.posts-filter-tema:checked,
.posts-filter-category:checked,
.posts-filter-month:checked,
.posts-filter-year:checked {
    border: 1px solid #ADD754;
    background: #ADD754;
}

/* Dibujamos la palomita (check) */
.posts-filter-edicion:checked::after,
.posts-filter-tema:checked::after,
.posts-filter-category:checked::after,
.posts-filter-month:checked::after,
.posts-filter-year:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #042354;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Estilos para el texto de los labels */
.filter-column label {
    color: #042354;
    font-family: Montserrat;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}


.dropdown-arrow {
    transition: transform 0.3s ease;
}
.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

.filter-options {
    margin-top: 8px;
}

/* Al expandir el .filter-column con .open en h4, si quieres cambiar color, etc. */
.filter-column h4.open {
    color: #004EA8; 
}

.dropdown-arrow {
    transition: transform 0.3s;
}
.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

/* Contenedor principal */
#posts-pagination .pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

/* Botones numéricos */
#posts-pagination .pagination-page {
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 140%;
    text-align: center;
    color: #667892;

    width: 46px;
    height: 46px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #DFDFE1;
    background: #FFF;

    transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Hover en páginas inactivas */
#posts-pagination .pagination-page:not(.page-active):hover {
    background: #E5EDF6;
    border-color: #E5EDF6;
    color: #004EA8;
}

/* Página activa */
#posts-pagination .pagination-page.page-active {
    border: 1px solid #ADD754;
    background: #ADD754;
    color: #042354;
}

/* Botones de flechas (prev/next) */
#posts-pagination .pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #DFDFE1;
    background: #FFF;

    transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

/* Hover en flechas */
#posts-pagination .pagination-arrow:hover {
    background: #f2f2f2;
}

/* Íconos dentro de flechas */
#posts-pagination .pagination-arrow img {
    display: block;
    width: 24px;
    height: 24px;
}














/*************************************************************
  SOLO ESTILOS PARA MÓVIL
*************************************************************/

/* Ocultamos en escritorio y mostramos en móvil */
.mobile-filters-trigger {
  display: none; /* en escritorio */
  margin: 16px 0;
}

/* BOTÓN “Filtrar por” y SELECT “Más reciente/antiguo” */
.mobile-filters-trigger button {
  border: 1px solid #B3C6C6;
  background: #fff;
  color: #042354;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
	font-size: 16px;
	font-family: Montserrat;


}
.mobile-filters-trigger select {
  border: 1px solid #B3C6C6;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 600;
  color: #042354;
}

/* Solo se muestran en pantallas <= 768px */
@media (max-width: 768px) {
  .mobile-filters-trigger {
    display: grid;
	grid-template-columns: 1fr 1fr; /* dos columnas iguales */
	gap: 0;                         /* sin espacio entre columnas */
	width: 100%;                    /* ocupa todo el ancho padre */
	margin: 0;                      /* por si había margen */
	padding: 0;
  }

  /* Si quieres ocultar el formulario de escritorio en móvil */
  #posts-search-form {
    display: none !important;
  }
	
  #open-mobile-filters,
  #mobile-order-select {
  	width: 100%;
	  border-radius: 0px !important;
  	margin: 0;     /* quita margen extra */
  	padding: 0;    /* quita padding extra */
  	box-sizing: border-box; /* aseguramos que no exceda el ancho */
 }
	#posts-results, #active-filters, #posts-results-counter{
		padding: 0 20px;
	}
}

/*************************************************************
  PANEL DESLIZANTE (OFFCANVAS)
*************************************************************/
.mobile-filters {
  /* Oculto por defecto (desplazado a la derecha) */
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100%;
  background: #fff;
  z-index: 2000;
  transition: right 0.3s ease-in-out;
  overflow-y: auto;
  padding: 20px;
}

/* Cuando se abra, right:0 */
.mobile-filters.open {
  right: 0;
}

/* HEADER del panel (Volver, título, Limpiar) */
.mobile-filters-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background: #fff;
    position: relative;
}

/* Botón "Volver" arriba a la derecha */
#close-mobile-filters {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 13px 20px;
    border-radius: 10px;
    background: #EFF0F1;
    color: #878B96;
    font-family: Montserrat;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
    border: none;
    cursor: pointer;
}
.mobile-filters-heading {
    display: flex;
    justify-content: space-between;
    align-items: center
    width: 100%;
	align-items: center;
}

#mobile-active-filters{
	margin-top: 16px;
}

.mobile-filters-title {
    color: #252525;
    font-family: Montserrat;
    font-size: 28px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    margin: 0; /* elimina espacio extra */
}

.mobile-clear-filters {
    color: #878B96;
    font-family: Montserrat;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    cursor: pointer;
    display: none; /* se mostrará vía JS solo si hay filtros activos */
}

#clear-mobile-filters {
    background: transparent;
    border: none;
    color: #878B96;
    font-family: Montserrat;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: none; /* Se muestra dinámicamente si hay filtros activos */
}

/* Línea divisoria */
.mobile-filters-header-line {
    width: 100%;
    height: 1px;
    background: #6D758F;
}

.mobile-filters-header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 16px;
}



.mobile-filters-header button {
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: #042354;
}

/* Las chips (pastillas) cuando hay filtros activos */
.mobile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* Grupo de secciones (acordeón para Edición, Tema, etc.) */
.mobile-filter-group .accordion {
  margin-bottom: 12px;
}

/* Títulos del acordeón con flecha */
.accordion-title {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Título a la izq, flecha a la der */
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  cursor: pointer;
  color: #042354;
  position: relative;
}

/* Si usas un icono de flecha, por ejemplo un pseudo o img */
.accordion-title::after {
  content: url("https://memoria.ludik.pe/wp-content/uploads/2025/04/Vector-drop-down.svg");
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px; /* ajusta si quieres */
  height: auto;
  transition: transform 0.3s ease;
}

/* Rotar flecha cuando esté abierto (añade una clase .open en JS) */
.accordion-title.open::after {
  transform: translateY(-50%) rotate(180deg);
}

/* El contenido del acordeón */
.accordion-content {
  display: none; /* inicia oculto */
  padding-left: 8px;	
    max-height: 400px;
    overflow-y: auto;
}

/* Botón para “Aplicar filtros” */
.mobile-apply {
  display: block;
  width: 100%;
  background: #ADD754;
  color: #042354;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-top: 16px;
  cursor: pointer;
}

/*************************************************************
  ESTILOS CHECKBOX (verde #ADD754) EXACTO AL MARCAR
*************************************************************/
.posts-filter-edicion,
.posts-filter-tema,
.posts-filter-category,
.posts-filter-month,
.posts-filter-year {
  appearance: none;
  -webkit-appearance: none;
  
  width: 18px;
  height: 18px;
  border-radius: 4px;
  
  border: 1px solid #667892;
  background: #fff;
  
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 6px; /* espacio con el label */
}

/* Activo */
.posts-filter-edicion:checked,
.posts-filter-tema:checked,
.posts-filter-category:checked,
.posts-filter-month:checked,
.posts-filter-year:checked {
  border: 1px solid #ADD754;
  background: #ADD754;
}
.posts-filter-edicion:checked::after,
.posts-filter-tema:checked::after,
.posts-filter-category:checked::after,
.posts-filter-month:checked::after,
.posts-filter-year:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #042354;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* label en el acordeón */
.accordion-content label {
  font-family: Montserrat;
  font-size: 14px;
  font-weight: 600;
  color: #042354;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}


#posts-results-toolbar {
  display: flex;
  justify-content: space-between;
	margin-top: 70px;
  align-items: center;        /* Centra verticalmente */
  flex-wrap: wrap;
  margin-bottom: 16px;
  gap: 12px;
  width: 100%;
}

/* Aseguramos que el texto y botones no colapsen */
#posts-results-counter,
#desktop-order-buttons {
  display: flex;
  align-items: center;
	gap: 4px;
	font-family: 'Montserrat';
}

#desktop-order-buttons{
	padding: 4px;
	border: 1px solid #004591;
	border-radius: 14px;
}

/* Botones */
#desktop-order-buttons .order-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  background: #fff;
  color: #042354;
  transition: background 0.3s ease;
}

#desktop-order-buttons .order-btn:hover {
  background: #E5EDF6;
}

#desktop-order-buttons .order-btn.active {
  background: #004591;
  color: #FFF;
}

/* Responsive: ocultamos en móvil */
@media (max-width: 768px) {
  #desktop-order-buttons {
    display: none;
  }
}

/* Ocultar formulario desktop en móvil */
@media (max-width: 768px) {
  #posts-search-form {
    display: none !important;
  }
}

/* Por defecto, oculta en escritorio */
#mobile-search-form {
  display: none !important; 
  width: 100%;
  box-sizing: border-box;
  gap: 12px; 
  /* Ajusta si deseas un layout flex/column */
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}

/* Muestra en móvil, esconde #posts-search-form */
@media (max-width: 768px) {
  #posts-search-form {
    display: none !important;
  }
  #mobile-search-form {
    display: flex !important;
	  padding: 20px 0 !important;
  }
}

/* Estilo del input */
#mobile-posts-search-input {
  flex: 1;
    border: none;
    outline: none;
    color: #667892;
    font-size: 16px;
    padding: 12px 16px 12px 40px;
    border-radius: 8px;
    background: #fff url(https://memoria.ludik.pe/wp-content/uploads/2025/04/Search.svg) no-repeat 14px center;
    font-family: 'Montserrat';
}

/* Estilo del contenedor de Filtrar/Select */
.mobile-filters-trigger {
  display: flex;
  width: 100%;
}

/* Botón “Filtrar por” */
#open-mobile-filters {
  flex: 1;
  border: 1px solid #B3C6C6;
  border-radius: 8px;
  background: #fff;
  color: #042354;
  font-weight: 600;
  cursor: pointer;
	display: flex;
	justify-content: start;
	padding-left: 20px;
	align-items: center;
	gap: 10px;
}

/* Select “Más reciente/antiguo” */
#mobile-order-select {
  flex: 1;
  border: 1px solid #B3C6C6;
  border-radius: 8px;
  font-size: 16px;
  color: #042354;
  font-weight: 600;
  padding: 8px;
}

/* Botón “Buscar” */
#mobile-posts-search-btn {
  width: 100%;
  height: 50px;
  margin-top: 8px; /* separa del row anterior */
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  color: #042354;
  background: #ADD754;
  cursor: pointer;
}









.post-img-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
	aspect-ratio: 16/9;
	background-color: #000;
}

.post-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease-in-out;
}

.post-item:hover .post-img {
  transform: scale(1.1);
}

.post-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 130%;
  color: #042354;
  display: inline-block; /* ✅ Esto asegura que la línea solo se dibuje bajo el texto */
  position: relative;
  transition: all 0.3s ease-in-out;
	width: fit-content; 
}

.post-item:hover .post-title {
  text-decoration: underline #042354;
}

.pagination-ellipsis-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.pagination-ellipsis-dots .dot-pagination {
  width: 4px;
  height: 4px;
  background-color: #000000;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.6;
}

</style>
<!-- end Simple Custom CSS and JS -->
