/* ===================================
   MODAL DE ARTÍCULOS - PALABRA VIVA
   =================================== */

.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.blog-modal.activo {
    opacity: 1;
    visibility: visible;
}

.blog-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.blog-modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-modal.activo .blog-modal-container {
    transform: scale(1) translateY(0);
}

.blog-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-modal-close:hover {
    background: #481F71;
    color: white;
    transform: rotate(90deg);
}

.blog-modal-close svg {
    width: 20px;
    height: 20px;
}

.blog-modal-content {
    height: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar personalizado */
.blog-modal-content::-webkit-scrollbar {
    width: 10px;
}

.blog-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.blog-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #481F71, #6EC6D2);
    border-radius: 10px;
}

.blog-modal-content::-webkit-scrollbar-thumb:hover {
    background: #481F71;
}

/* Header del modal */
.blog-modal-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(72, 31, 113, 0.1);
}

.blog-modal-categoria {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, rgba(72, 31, 113, 0.1), rgba(110, 198, 210, 0.1));
    color: #481F71;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}

.blog-modal-titulo {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #000000;
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
}

.blog-modal-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: #666666;
    flex-wrap: wrap;
}

.blog-modal-autor {
    font-weight: 600;
    color: #481F71;
}

.blog-modal-fecha {
    color: #999999;
}

/* Contenido del artículo */
.blog-modal-articulo {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333333;
}

.blog-modal-articulo p {
    margin-bottom: 1.5rem;
}

.blog-modal-articulo h2 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #481F71;
    margin: 2.5rem 0 1.25rem;
    line-height: 1.4;
}

.blog-modal-articulo h3 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #000000;
    margin: 2rem 0 1rem;
}

.blog-modal-articulo strong {
    font-weight: 600;
    color: #000000;
}

.blog-modal-articulo blockquote {
    margin: 2rem 0;
    padding-left: 1.5rem;
    font-style: italic;
    font-size: 1.125rem;
}

.blog-modal-articulo ul,
.blog-modal-articulo ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-modal-articulo li {
    margin-bottom: 0.75rem;
}

.blog-modal-articulo a {
    color: #481F71;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-modal-articulo a:hover {
    color: #6EC6D2;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .blog-modal-content {
        padding: 2.5rem 1.5rem;
    }
    
    .blog-modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .blog-modal-titulo {
        font-size: 1.75rem;
    }
    
    .blog-modal-articulo {
        font-size: 1rem;
    }
    
    .blog-modal-articulo h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
    }
}

@media (max-width: 480px) {
    .blog-modal-container {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .blog-modal-content {
        padding: 2rem 1.25rem;
        max-height: 100vh;
    }
    
    .blog-modal-close {
        width: 36px;
        height: 36px;
    }
    
    .blog-modal-titulo {
        font-size: 1.5rem;
    }
    
    .blog-modal-articulo {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .blog-modal-articulo h2 {
        font-size: 1.3rem;
    }
    
    .blog-modal-categoria {
        font-size: 0.8rem;
        padding: 0.5rem 1.25rem;
    }
}

/* Animación de entrada */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.blog-modal.activo .blog-modal-container {
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
