/* ==========================================================================
   VARIABLES GLOBALES PARA PUBLICACIONES
   ========================================================================== */
:root {
    /* Colores principales */
    --hnz-color-primary: #1a365d;
    --hnz-color-primary-light: #2d4a73;
    --hnz-color-secondary: #718096;
    --hnz-color-accent: #b8a26d;
    
    /* Fondos */
    --hnz-bg-white: #ffffff;
    --hnz-bg-light: #f5f8fc;
    --hnz-bg-lighter: #f8fafc;
    
    /* Textos */
    --hnz-text-dark: #1a365d;
    --hnz-text-gray: #4a5568;
    --hnz-text-light: #718096;
    --hnz-text-lighter: #a0aec0;
    
    /* Bordes */
    --hnz-border-light: #eaeaea;
    --hnz-border-medium: #e1e5eb;
    
    /* Sombras */
    --hnz-shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.08);
    --hnz-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hnz-shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.15);
    
    /* Espaciado */
    --hnz-space-xs: 8px;
    --hnz-space-sm: 15px;
    --hnz-space-md: 20px;
    --hnz-space-lg: 25px;
    --hnz-space-xl: 30px;
    --hnz-space-2xl: 40px;
    --hnz-space-3xl: 50px;
    --hnz-space-4xl: 60px;
    
    /* Radio de bordes */
    --hnz-radius-sm: 8px;
    --hnz-radius-md: 12px;
    --hnz-radius-lg: 16px;
    
    /* Transiciones */
    --hnz-transition-fast: 0.3s ease;
    --hnz-transition-base: 0.5s ease;
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */
.hnz-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--hnz-space-xl);
}

@media (max-width: 768px) {
    .hnz-container {
        padding: 0 var(--hnz-space-lg);
    }
}

@media (max-width: 576px) {
    .hnz-container {
        padding: 0 var(--hnz-space-md);
    }
}

/* ==========================================================================
   SECCIÓN PRINCIPAL
   ========================================================================== */
.hnz-espacio_blanco {
    padding: var(--hnz-space-3xl) 0 var(--hnz-space-4xl);
    background-color: var(--hnz-bg-light);
    min-height: calc(100vh - 200px);
}

/* ==========================================================================
   PUBLICACIÓN DESTACADA
   ========================================================================== */
.hnz-publicacion-destacada {
    background: var(--hnz-bg-white);
    border-radius: var(--hnz-radius-md);
    overflow: hidden;
    box-shadow: var(--hnz-shadow-md);
    margin-bottom: var(--hnz-space-3xl);
    display: flex;
    flex-direction: column;
    transition: transform var(--hnz-transition-base);
}

.hnz-publicacion-destacada:hover {
    transform: translateY(-5px);
    box-shadow: var(--hnz-shadow-lg);
}

@media (min-width: 992px) {
    .hnz-publicacion-destacada {
        flex-direction: row;
        height: 400px;
    }
}

.hnz-destacada-imagen {
    flex: 1;
    min-height: 250px;
    overflow: hidden;
}

@media (min-width: 992px) {
    .hnz-destacada-imagen {
        min-height: auto;
        height: 100%;
    }
}

.hnz-destacada-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--hnz-transition-base);
}

.hnz-publicacion-destacada:hover .hnz-destacada-imagen img {
    transform: scale(1.05);
}

.hnz-destacada-contenido {
    flex: 1;
    padding: var(--hnz-space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hnz-destacada-categoria {
    display: inline-block;
    background: var(--hnz-color-primary);
    color: white;
    padding: var(--hnz-space-xs) var(--hnz-space-lg);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--hnz-space-md);
    align-self: flex-start;
}

.hnz-destacada-titulo {
    font-size: 1.8rem;
    color: var(--hnz-text-dark);
    margin-bottom: var(--hnz-space-sm);
    line-height: 1.3;
    font-weight: 700;
}

@media (min-width: 768px) {
    .hnz-destacada-titulo {
        font-size: 2.2rem;
    }
}

.hnz-destacada-extracto {
    color: var(--hnz-text-gray);
    margin-bottom: var(--hnz-space-lg);
    line-height: 1.7;
    font-size: 1.05rem;
}

.hnz-destacada-meta {
    display: flex;
    align-items: center;
    gap: var(--hnz-space-lg);
    margin-bottom: var(--hnz-space-lg);
    color: var(--hnz-text-light);
    font-size: 0.9rem;
}

.hnz-destacada-fecha,
.hnz-destacada-autor {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hnz-destacada-fecha i,
.hnz-destacada-autor i {
    color: var(--hnz-color-primary-light);
}

.hnz-destacada-leer-mas {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--hnz-color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--hnz-transition-fast);
    padding: var(--hnz-space-sm) 0;
    align-self: flex-start;
}

.hnz-destacada-leer-mas:hover {
    gap: 15px;
    color: var(--hnz-color-primary-light);
}

.hnz-destacada-leer-mas i {
    font-size: 0.9rem;
    transition: transform var(--hnz-transition-fast);
}

.hnz-destacada-leer-mas:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   GRID DE PUBLICACIONES
   ========================================================================== */
.hnz-grid-publicaciones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--hnz-space-xl);
    margin-bottom: var(--hnz-space-3xl);
}

/* ==========================================================================
   CARD DE PUBLICACIÓN
   ========================================================================== */
.hnz-card-publicacion {
    background: var(--hnz-bg-white);
    border-radius: var(--hnz-radius-md);
    overflow: hidden;
    box-shadow: var(--hnz-shadow-sm);
    transition: all var(--hnz-transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hnz-card-publicacion:hover {
    transform: translateY(-8px);
    box-shadow: var(--hnz-shadow-lg);
}

.hnz-card-imagen {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.hnz-card-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--hnz-transition-base);
}

.hnz-card-publicacion:hover .hnz-card-imagen img {
    transform: scale(1.08);
}

.hnz-card-categoria {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--hnz-color-primary);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.hnz-card-contenido {
    padding: var(--hnz-space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.hnz-card-meta {
    display: flex;
    align-items: center;
    gap: var(--hnz-space-md);
    margin-bottom: var(--hnz-space-sm);
    color: var(--hnz-text-light);
    font-size: 0.85rem;
}

.hnz-card-fecha,
.hnz-card-autor {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hnz-card-fecha i,
.hnz-card-autor i {
    color: var(--hnz-color-primary-light);
    font-size: 0.9rem;
}

.hnz-card-titulo {
    font-size: 1.3rem;
    color: var(--hnz-text-dark);
    margin-bottom: var(--hnz-space-sm);
    line-height: 1.4;
    font-weight: 700;
    flex-grow: 1;
}

.hnz-card-extracto {
    color: var(--hnz-text-gray);
    margin-bottom: var(--hnz-space-md);
    line-height: 1.6;
    font-size: 0.95rem;
}

.hnz-card-leer-mas {
    color: var(--hnz-color-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: var(--hnz-space-sm);
    border-top: 1px solid var(--hnz-border-light);
    text-decoration: none;
    transition: all var(--hnz-transition-fast);
    margin-top: auto;
}

.hnz-card-leer-mas:hover {
    gap: 12px;
    color: var(--hnz-color-primary-light);
}

.hnz-card-leer-mas i {
    font-size: 0.9rem;
    transition: transform var(--hnz-transition-fast);
}

.hnz-card-leer-mas:hover i {
    transform: translateX(5px);
}

/* ==========================================================================
   PAGINACIÓN
   ========================================================================== */
.hnz-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: var(--hnz-space-3xl);
    padding: var(--hnz-space-md) 0;
}

.hnz-paginacion .page-numbers {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hnz-border-medium);
    border-radius: var(--hnz-radius-sm);
    background: var(--hnz-bg-white);
    color: var(--hnz-text-gray);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--hnz-transition-fast);
    font-size: 0.95rem;
}

.hnz-paginacion .page-numbers:hover:not(.current) {
    border-color: var(--hnz-color-primary);
    color: var(--hnz-color-primary);
    background: var(--hnz-bg-light);
}

.hnz-paginacion .current {
    background: var(--hnz-color-primary);
    color: var(--hnz-bg-white);
    border-color: var(--hnz-color-primary);
}

.hnz-paginacion .dots {
    border: none;
    background: transparent;
    min-width: auto;
}

/* ==========================================================================
   ESTADOS
   ========================================================================== */
.hnz-estado-vacio,
.hnz-estado-unico {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--hnz-space-3xl) var(--hnz-space-lg);
    background: var(--hnz-bg-lighter);
    border-radius: var(--hnz-radius-md);
    margin: var(--hnz-space-xl) 0;
    border: 2px dashed var(--hnz-border-light);
}

.hnz-estado-vacio i,
.hnz-estado-unico i {
    font-size: 3.5rem;
    color: var(--hnz-text-lighter);
    margin-bottom: var(--hnz-space-lg);
}

.hnz-estado-vacio h3,
.hnz-estado-unico h3 {
    color: var(--hnz-text-gray);
    margin-bottom: var(--hnz-space-sm);
    font-size: 1.5rem;
}

.hnz-estado-vacio p,
.hnz-estado-unico p {
    color: var(--hnz-text-light);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
    .hnz-container {
        max-width: 1000px;
    }
    
    .hnz-grid-publicaciones {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    .hnz-espacio_blanco {
        padding: var(--hnz-space-2xl) 0 var(--hnz-space-3xl);
    }
    
    .hnz-grid-publicaciones {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--hnz-space-lg);
    }
    
    .hnz-destacada-contenido {
        padding: var(--hnz-space-xl);
    }
}

@media (max-width: 768px) {
    .hnz-grid-publicaciones {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hnz-destacada-titulo {
        font-size: 1.6rem;
    }
    
    .hnz-destacada-contenido {
        padding: var(--hnz-space-lg);
    }
    
    .hnz-destacada-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--hnz-space-sm);
    }
}

@media (max-width: 576px) {
    .hnz-espacio_blanco {
        padding: var(--hnz-space-xl) 0 var(--hnz-space-2xl);
    }
    
    .hnz-container {
        padding: 0 var(--hnz-space-md);
    }
    
    .hnz-card-contenido {
        padding: var(--hnz-space-md);
    }
    
    .hnz-paginacion {
        flex-wrap: wrap;
    }
    
    .hnz-card-titulo {
        font-size: 1.2rem;
    }
    
    .hnz-destacada-titulo {
        font-size: 1.4rem;
    }
    
    .hnz-estado-vacio,
    .hnz-estado-unico {
        padding: var(--hnz-space-xl) var(--hnz-space-md);
    }
}

@media (max-width: 480px) {
    .hnz-destacada-imagen {
        min-height: 200px;
    }
    
    .hnz-card-imagen {
        height: 180px;
    }
    
    .hnz-paginacion .page-numbers {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes hnz-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hnz-card-publicacion {
    animation: hnz-fadeIn 0.6s ease-out;
}

.hnz-publicacion-destacada {
    animation: hnz-fadeIn 0.8s ease-out;
}

/* Retraso para las cards del grid */
.hnz-card-publicacion:nth-child(2) { animation-delay: 0.1s; }
.hnz-card-publicacion:nth-child(3) { animation-delay: 0.2s; }
.hnz-card-publicacion:nth-child(4) { animation-delay: 0.3s; }
.hnz-card-publicacion:nth-child(5) { animation-delay: 0.4s; }
.hnz-card-publicacion:nth-child(6) { animation-delay: 0.5s; }
.hnz-card-publicacion:nth-child(7) { animation-delay: 0.6s; }
.hnz-card-publicacion:nth-child(8) { animation-delay: 0.7s; }
.hnz-card-publicacion:nth-child(9) { animation-delay: 0.8s; }