/* ============================================
   ESTILOS PARA PÁGINAS DE TIPOS DE PUBLICACIONES
   Versión MEJORADA - Solo portadas
   Hereda variables de style.css
   ============================================ */

/* Encabezado de página - USANDO VARIABLES DE STYLE.CSS */
.page-header {
    text-align: center;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2rem; /* Mismo tamaño que h2 en style.css */
    font-weight: 700; /* Mismo peso que h2 en style.css */
    color: var(--color-secondary); /* Mismo color que h2 en style.css */
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
    line-height: 1.2; /* Mismo line-height que h2 en style.css */
}

/* Línea decorativa opcional (la podemos quitar si no se desea) */
.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Subtítulo para páginas de publicaciones */
.page-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    text-align: center;
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
    line-height: 1.5;
}

/* Grid de publicaciones - COMPACTO */
.publicaciones-grid-compacto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Cada item de publicación - COMPACTO */
.publicacion-item-compacto {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.publicacion-item-compacto:hover {
    transform: translateY(-3px);
}

/* Enlace completo */
.publicacion-enlace-compacto {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Contenedor de portada */
.portada-contenedor-compacto {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-gray-ultralight), #f8f9fa);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-lighter);
}

.portada-imagen-compacto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.publicacion-item-compacto:hover .portada-imagen-compacto {
    transform: scale(1.02);
}

/* Overlay que aparece en hover - CON COLOR PRIMARY */
.portada-overlay-compacto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    border-radius: 8px;
    pointer-events: none;
}

.publicacion-item-compacto:hover .portada-overlay-compacto {
    opacity: 0.9;
}

.portada-overlay-compacto svg {
    width: 36px;
    height: 36px;
    stroke: white;
    stroke-width: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Título pequeño debajo de la portada */
.publicacion-titulo-compacto {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.4;
    text-align: center;
    padding: 0;
}

.publicacion-item-compacto:hover .publicacion-titulo-compacto {
    color: var(--color-primary);
}

/* ========== ESTILO PARA CUANDO NO HAY IMAGEN ========= */
.portada-contenedor-compacto.sin-imagen {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

.portada-contenedor-compacto.sin-imagen svg {
    width: 48px;
    height: 48px;
    stroke: white;
    stroke-width: 1.5;
}

/* ========== RESPONSIVE - USANDO MEDIA QUERIES DE STYLE.CSS ========= */

/* Tablet y dispositivos medianos (hasta 1024px) */
@media (max-width: 1024px) {
    .page-title {
        font-size: 1.75rem; /* Ajustado de h2 en style.css para tablet */
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
}

/* Dispositivos móviles (hasta 768px) */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem; /* Mismo que h2 en móvil de style.css */
        padding: 0 1rem;
    }
    
    .page-title::after {
        width: 60px;
        height: 3px;
        bottom: -8px;
    }
    
    .page-subtitle {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
    
    .publicaciones-grid-compacto {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }
}

/* Teléfonos pequeños (hasta 480px) */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem; /* Un poco más pequeño que h2 en móvil pequeño */
        padding: 0 0.5rem;
    }
    
    .page-title::after {
        width: 50px;
        height: 3px;
        bottom: -6px;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    .publicaciones-grid-compacto {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .publicacion-titulo-compacto {
        font-size: 0.85rem;
    }
}

@media (max-width: 375px) {
    .publicaciones-grid-compacto {
        grid-template-columns: 1fr;
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
}