/* css/pages/publicaciones.css */

/* Layout principal de la página de publicaciones */
.publicaciones-layout {
    display: flex;
    flex-direction: column; /* Por defecto, en móvil, los elementos se apilan */
    gap: 30px; /* Espacio entre la barra lateral y el contenido principal */
    padding: 20px 0;
}

/* Estilos para la barra lateral de filtros */
.sidebar-filtros {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 25px;
    border: 1px solid #e0e0e0;
}

.filtro-bloque {
    margin-bottom: 30px;
}

.filtro-bloque:last-child {
    margin-bottom: 0; /* No hay margen inferior en el último bloque */
}

.filtro-bloque h4 {
    font-size: 1.3rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #005c97; /* Línea decorativa */
    padding-bottom: 8px;
}

/* Estilos para el formulario de búsqueda */
.filtro-bloque form {
    display: flex;
    gap: 10px;
}

.filtro-bloque input[type="search"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.filtro-bloque button[type="submit"] {
    padding: 10px 15px;
    background-color: #005c97;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.filtro-bloque button[type="submit"]:hover {
    background-color: #004a7a;
}

/* --- ¡NUEVO! Estilos para el Índice de Etiquetas A-Z --- */
.tag-index {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tag-index-letter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background-color: #f1f1f1;
    color: #555;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tag-index-letter:hover,
.tag-index-letter.active {
    background-color: #005c97;
    color: white;
}

/* Estilos para la lista de etiquetas */
.lista-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lista-tags a {
    background-color: #e9ecef;
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lista-tags a:hover {
    background-color: #005c97;
    color: white;
}

/* Estilos para la lista de meses */
.lista-meses {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-meses li {
    margin-bottom: 8px;
}

.lista-meses li a {
    color: #005c97;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.lista-meses li a:hover {
    color: #004a7a;
    text-decoration: underline;
}

/* Media Query para pantallas más grandes (escritorio) */
@media (min-width: 992px) {
    .publicaciones-layout {
        flex-direction: row; /* En escritorio, la barra lateral y el contenido van lado a lado */
    }
    .sidebar-filtros {
        flex: 0 0 280px; /* Ancho fijo para la barra lateral */
        align-self: flex-start; /* Alinea la barra lateral al inicio */
        position: sticky; /* La barra lateral se mantiene visible al hacer scroll */
        top: 20px; /* Distancia desde la parte superior */
        min-width: 0; /* Permite que el elemento se encoja si es necesario */
    }
    .resultados-publicaciones {
        flex-grow: 1; /* El contenido principal ocupa el espacio restante */
        min-width: 0; /* Permite que el elemento se encoja si es necesario */
    }
}