
/* IMPORTAR Y FORZAR FUENTE MONTSERRAT */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Aplicar Montserrat a todos los elementos */
* {
    font-family: 'Montserrat', sans-serif !important;
}

body {
    font-family: 'Montserrat', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif !important;
}

p, span, div, a, button, input, textarea, select {
    font-family: 'Montserrat', sans-serif !important;
}

/* Estilos para la página de publicaciones */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 3px solid #691B31;
    background: linear-gradient(135deg, rgba(105, 27, 49, 0.05) 0%, rgba(105, 27, 49, 0.1) 100%);
    border-radius: 8px;
}

.page-header h1 {
    color: #691B31;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header h1 i {
    margin-right: 0.5rem;
    color: #DDC9A3;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.publicaciones-content {
    margin-bottom: 3rem;
}

.publicaciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.publicacion-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(105, 27, 49, 0.1);
    position: relative;
}

.publicacion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(105, 27, 49, 0.2);
}

.card-header {
    background: linear-gradient(135deg, #691B31 0%, #8B2538 100%);
    padding: 1.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-meta {
    text-align: right;
}

.fecha {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #DDC9A3;
}

.tipo {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.2rem;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: #691B31;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(105, 27, 49, 0.1);
    color: #691B31;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(105, 27, 49, 0.2);
}

.card-actions {
    padding: 0 1.5rem 1.5rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #691B31 0%, #8B2538 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
}

.btn-download:hover {
    background: linear-gradient(135deg, #8B2538 0%, #691B31 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(105, 27, 49, 0.3);
    color: white;
    text-decoration: none;
}

.btn-download.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-download.disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

.btn-download i {
    font-size: 1rem;
}

/* Sección de información */
.info-section {
    margin-top: 3rem;
}

.info-box {
    background: linear-gradient(135deg, rgba(221, 201, 163, 0.1) 0%, rgba(221, 201, 163, 0.2) 100%);
    border: 2px solid #DDC9A3;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.info-box h3 {
    color: #691B31;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.info-box h3 i {
    margin-right: 0.5rem;
    color: #DDC9A3;
}

.info-box p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .publicaciones-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .publicacion-card {
        margin: 0 1rem;
    }
    
    .card-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .card-meta {
        text-align: center;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-content h3 {
        font-size: 1.2rem;
    }
    
    .card-actions {
        padding: 0 1rem 1rem;
    }
    
    .info-box {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .info-box h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .publicacion-card {
        margin: 0 0.5rem;
    }
    
    .card-header {
        padding: 0.8rem;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .card-content {
        padding: 0.8rem;
    }
    
    .card-content h3 {
        font-size: 1.1rem;
    }
    
    .card-content p {
        font-size: 0.9rem;
    }
    
    .btn-download {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .info-box {
        margin: 0 0.5rem;
        padding: 1rem;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.publicacion-card {
    animation: fadeInUp 0.6s ease-out;
}

.publicacion-card:nth-child(1) { animation-delay: 0.1s; }
.publicacion-card:nth-child(2) { animation-delay: 0.2s; }
.publicacion-card:nth-child(3) { animation-delay: 0.3s; }
.publicacion-card:nth-child(4) { animation-delay: 0.4s; }

/* Efectos adicionales */
.publicacion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #691B31, #DDC9A3, #691B31);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.publicacion-card:hover::before {
    opacity: 1;
}

/* Estilos para el estado de carga */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: #691B31;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #691B31;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para enlaces de descarga específicos */
.btn-download[href$=".pdf"] {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
}

.btn-download[href$=".pdf"]:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}


.btn-download[href*="reporte"] {
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
}

.btn-download[href*="reporte"]:hover {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

/* Estilos para botones deshabilitados */
.btn-download.disabled {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.btn-download.disabled:hover {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Efectos de hover para las tarjetas */
.publicacion-card:hover .card-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.publicacion-card:hover .tag {
    background: rgba(105, 27, 49, 0.15);
    border-color: rgba(105, 27, 49, 0.3);
}

/* Estilos para impresión */
@media print {
    .page-header {
        background: none !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .publicacion-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .card-header {
        background: #f5f5f5 !important;
        color: #000 !important;
    }
    
    .btn-download {
        display: none !important;
    }
}

/* Accesibilidad */
.btn-download:focus {
    outline: 3px solid #DDC9A3;
    outline-offset: 2px;
}

.publicacion-card:focus-within {
    outline: 2px solid #691B31;
    outline-offset: 2px;
}

/* Mejoras para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}