/* ======================================
   Memphis Documents Library - Post Pages Style
   NextLevel Theme Integration - Versão Corrigida
   ====================================== */

/* Estilos específicos para páginas de posts mdocs-posts */
.single-mdocs-posts,
.mdocs-post-single {
    /* Cores corretas do tema NextLevel */
    --nextlevel-primary: #053ea1;
    --nextlevel-primary-hover: #0056b3;
    --nextlevel-secondary: #ffc107;
    --nextlevel-secondary-hover: #e0a800;
    --nextlevel-text: #212529;
    --nextlevel-text-light: #ffffff;
    --nextlevel-text-muted: #6c757d;
    --nextlevel-bg: #ffffff;
    --nextlevel-bg-alt: #f8f9fa;
    --nextlevel-border: #dee2e6;
    --nextlevel-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --nextlevel-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
    --nextlevel-shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Fonte correta do tema NextLevel */
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Forçar fonte normal (remover itálico) em todos os elementos */
.single-mdocs-posts *,
.mdocs-post-single * {
    font-style: normal !important;
}

/* Remove completamente imagens destacadas */
.single-mdocs-posts .post-thumbnail,
.single-mdocs-posts .entry-thumbnail,
.single-mdocs-posts .featured-image,
.single-mdocs-posts .wp-post-image,
.single-mdocs-posts .attachment-post-thumbnail,
.single-mdocs-posts .hero-image,
.single-mdocs-posts .post-header-image,
.single-mdocs-posts .featured-media,
.single-mdocs-posts .entry-media,
.mdocs-post-single .post-thumbnail,
.mdocs-post-single .entry-thumbnail,
.mdocs-post-single .featured-image,
.mdocs-post-single .wp-post-image,
.mdocs-post-single .attachment-post-thumbnail,
.mdocs-post-single .hero-image,
.mdocs-post-single .post-header-image,
.mdocs-post-single .featured-media,
.mdocs-post-single .entry-media {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Container principal do post */
.single-mdocs-posts .site-main,
.single-mdocs-posts article,
.mdocs-post-single .site-main,
.mdocs-post-single article {
    background: var(--nextlevel-bg) !important;
    border-radius: 8px !important;
    box-shadow: var(--nextlevel-shadow) !important;
    overflow: hidden !important;
    margin: 1rem 0 !important;
    border: 1px solid var(--nextlevel-border) !important;
}

/* Header da página do documento */
.single-mdocs-posts .entry-header,
.single-mdocs-posts .post-header,
.mdocs-post-single .entry-header,
.mdocs-post-single .post-header {
    background: linear-gradient(135deg, var(--nextlevel-primary) 0%, var(--nextlevel-primary-hover) 100%) !important;
    color: var(--nextlevel-text-light) !important;
    padding: 2rem 1.5rem !important;
    margin: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Efeito decorativo no header */
.single-mdocs-posts .entry-header::before,
.single-mdocs-posts .post-header::before,
.mdocs-post-single .entry-header::before,
.mdocs-post-single .post-header::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 200px !important;
    height: 200px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    transform: translate(50px, -50px) !important;
    pointer-events: none !important;
}

/* Título do documento */
.single-mdocs-posts .entry-title,
.single-mdocs-posts .post-title,
.mdocs-post-single .entry-title,
.mdocs-post-single .post-title {
    color: var(--nextlevel-text-light) !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 2rem !important;
    line-height: 1.2 !important;
    margin: 0 0 1rem 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Badge de documento - REMOVIDO para evitar sobreposição no título */
.single-mdocs-posts .entry-header::after,
.single-mdocs-posts .post-header::after,
.mdocs-post-single .entry-header::after,
.mdocs-post-single .post-header::after {
    display: none !important;
}

/* Meta informações */
.single-mdocs-posts .entry-meta,
.single-mdocs-posts .post-meta,
.mdocs-post-single .entry-meta,
.mdocs-post-single .post-meta {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    font-family: 'Poppins', sans-serif !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Ícones nas meta informações */
.single-mdocs-posts .entry-meta > *::before,
.single-mdocs-posts .post-meta > *::before,
.mdocs-post-single .entry-meta > *::before,
.mdocs-post-single .post-meta > *::before {
    content: "" !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 0.5rem !important;
    opacity: 0.8 !important;
}

/* Tags meta modernas */
.single-mdocs-posts .entry-meta span,
.single-mdocs-posts .post-meta span,
.mdocs-post-single .entry-meta span,
.mdocs-post-single .post-meta span {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 8px !important;
    font-family: 'Poppins', sans-serif !important;
}

.single-mdocs-posts .entry-meta a,
.single-mdocs-posts .post-meta a,
.mdocs-post-single .entry-meta a,
.mdocs-post-single .post-meta a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.single-mdocs-posts .entry-meta a:hover,
.single-mdocs-posts .post-meta a:hover,
.mdocs-post-single .entry-meta a:hover,
.mdocs-post-single .post-meta a:hover {
    color: #ffffff !important;
}

/* Conteúdo do post */
.single-mdocs-posts .entry-content,
.single-mdocs-posts .post-content,
.mdocs-post-single .entry-content,
.mdocs-post-single .post-content {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: var(--nextlevel-text) !important;
    max-width: none !important;
    padding: 2rem 1.5rem !important;
    position: relative !important;
}

/* Separador visual entre header e conteúdo */
.single-mdocs-posts .entry-content::before,
.single-mdocs-posts .post-content::before,
.mdocs-post-single .entry-content::before,
.mdocs-post-single .post-content::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    width: 50px !important;
    height: 3px !important;
    background: var(--nextlevel-secondary) !important;
    border-radius: 2px !important;
    transform: translateX(-50%) !important;
}

/* Parágrafos */
.single-mdocs-posts .entry-content p,
.single-mdocs-posts .post-content p,
.mdocs-post-single .entry-content p,
.mdocs-post-single .post-content p {
    margin: 0 0 1.5rem 0 !important;
    line-height: 1.6 !important;
    color: var(--nextlevel-text) !important;
    text-align: left !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Primeiro parágrafo com destaque */
.single-mdocs-posts .entry-content p:first-of-type,
.single-mdocs-posts .post-content p:first-of-type,
.mdocs-post-single .entry-content p:first-of-type,
.mdocs-post-single .post-content p:first-of-type {
    font-size: 1.1rem !important;
    font-weight: 400 !important;
    color: var(--nextlevel-text) !important;
    margin-bottom: 2rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid var(--nextlevel-border) !important;
}

/* Listas */
.single-mdocs-posts .entry-content ul,
.single-mdocs-posts .entry-content ol,
.single-mdocs-posts .post-content ul,
.single-mdocs-posts .post-content ol,
.mdocs-post-single .entry-content ul,
.mdocs-post-single .entry-content ol,
.mdocs-post-single .post-content ul,
.mdocs-post-single .post-content ol {
    margin: 0 0 1.5rem 0 !important;
    padding-left: 2rem !important;
    color: var(--nextlevel-text) !important;
}

.single-mdocs-posts .entry-content li,
.single-mdocs-posts .post-content li,
.mdocs-post-single .entry-content li,
.mdocs-post-single .post-content li {
    margin: 0 0 0.5rem 0 !important;
    color: var(--nextlevel-text) !important;
}

/* Links no conteúdo */
.single-mdocs-posts .entry-content a,
.single-mdocs-posts .post-content a,
.mdocs-post-single .entry-content a,
.mdocs-post-single .post-content a {
    color: var(--nextlevel-primary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    padding: 0.125rem 0.25rem !important;
    border-radius: 4px !important;
}

.single-mdocs-posts .entry-content a:hover,
.single-mdocs-posts .post-content a:hover,
.mdocs-post-single .entry-content a:hover,
.mdocs-post-single .post-content a:hover {
    color: var(--nextlevel-white) !important;
    background: var(--nextlevel-primary) !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3) !important;
}

/* Links externos com ícone */
.single-mdocs-posts .entry-content a[href^="http"]:not([href*="localhost"]):not([href*="127.0.0.1"])::after,
.single-mdocs-posts .post-content a[href^="http"]:not([href*="localhost"]):not([href*="127.0.0.1"])::after,
.mdocs-post-single .entry-content a[href^="http"]:not([href*="localhost"]):not([href*="127.0.0.1"])::after,
.mdocs-post-single .post-content a[href^="http"]:not([href*="localhost"]):not([href*="127.0.0.1"])::after {
    content: " ↗" !important;
    font-size: 0.875rem !important;
    opacity: 0.7 !important;
}

/* Títulos no conteúdo */
.single-mdocs-posts .entry-content h1,
.single-mdocs-posts .entry-content h2,
.single-mdocs-posts .entry-content h3,
.single-mdocs-posts .entry-content h4,
.single-mdocs-posts .entry-content h5,
.single-mdocs-posts .entry-content h6,
.single-mdocs-posts .post-content h1,
.single-mdocs-posts .post-content h2,
.single-mdocs-posts .post-content h3,
.single-mdocs-posts .post-content h4,
.single-mdocs-posts .post-content h5,
.single-mdocs-posts .post-content h6,
.mdocs-post-single .entry-content h1,
.mdocs-post-single .entry-content h2,
.mdocs-post-single .entry-content h3,
.mdocs-post-single .entry-content h4,
.mdocs-post-single .entry-content h5,
.mdocs-post-single .entry-content h6,
.mdocs-post-single .post-content h1,
.mdocs-post-single .post-content h2,
.mdocs-post-single .post-content h3,
.mdocs-post-single .post-content h4,
.mdocs-post-single .post-content h5,
.mdocs-post-single .post-content h6 {
    color: var(--nextlevel-text) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 3rem 0 1.5rem 0 !important;
    position: relative !important;
}

.single-mdocs-posts .entry-content h2,
.single-mdocs-posts .post-content h2,
.mdocs-post-single .entry-content h2,
.mdocs-post-single .post-content h2 {
    font-size: 2rem !important;
    padding-left: 1.5rem !important;
    border-left: 4px solid var(--nextlevel-primary) !important;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%) !important;
    padding: 1rem 1rem 1rem 1.5rem !important;
    border-radius: 0 8px 8px 0 !important;
    margin: 3rem 0 2rem 0 !important;
}

.single-mdocs-posts .entry-content h3,
.single-mdocs-posts .post-content h3,
.mdocs-post-single .entry-content h3,
.mdocs-post-single .post-content h3 {
    font-size: 1.625rem !important;
    color: var(--nextlevel-primary) !important;
    position: relative !important;
}

.single-mdocs-posts .entry-content h3::before,
.single-mdocs-posts .post-content h3::before,
.mdocs-post-single .entry-content h3::before,
.mdocs-post-single .post-content h3::before {
    content: "▶" !important;
    color: var(--nextlevel-secondary) !important;
    margin-right: 0.5rem !important;
    font-size: 0.875rem !important;
}

.single-mdocs-posts .entry-content h4,
.single-mdocs-posts .post-content h4,
.mdocs-post-single .entry-content h4,
.mdocs-post-single .post-content h4 {
    font-size: 1.375rem !important;
    color: var(--nextlevel-text-muted) !important;
}

/* Código */
.single-mdocs-posts .entry-content code,
.single-mdocs-posts .post-content code,
.mdocs-post-single .entry-content code,
.mdocs-post-single .post-content code {
    background: var(--nextlevel-light) !important;
    color: var(--nextlevel-text) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.875rem !important;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace !important;
}

.single-mdocs-posts .entry-content pre,
.single-mdocs-posts .post-content pre,
.mdocs-post-single .entry-content pre,
.mdocs-post-single .post-content pre {
    background: var(--nextlevel-light) !important;
    color: var(--nextlevel-text) !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    margin: 1.5rem 0 !important;
    border: 1px solid var(--nextlevel-border) !important;
}

/* Blockquotes */
.single-mdocs-posts .entry-content blockquote,
.single-mdocs-posts .post-content blockquote,
.mdocs-post-single .entry-content blockquote,
.mdocs-post-single .post-content blockquote {
    border-left: 4px solid var(--nextlevel-primary) !important;
    margin: 1.5rem 0 !important;
    padding: 1rem 1.5rem !important;
    background: var(--nextlevel-light) !important;
    font-style: normal !important;
    color: var(--nextlevel-text-muted) !important;
    border-radius: 0 8px 8px 0 !important;
}

/* Tabelas */
.single-mdocs-posts .entry-content table,
.single-mdocs-posts .post-content table,
.mdocs-post-single .entry-content table,
.mdocs-post-single .post-content table {
    width: 100% !important;
    margin: 1.5rem 0 !important;
    border-collapse: collapse !important;
    border: 1px solid var(--nextlevel-border) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: var(--nextlevel-shadow) !important;
}

.single-mdocs-posts .entry-content th,
.single-mdocs-posts .post-content th,
.mdocs-post-single .entry-content th,
.mdocs-post-single .post-content th {
    background: var(--nextlevel-light) !important;
    color: var(--nextlevel-text) !important;
    font-weight: 600 !important;
    padding: 1rem !important;
    text-align: left !important;
    border-bottom: 1px solid var(--nextlevel-border) !important;
}

.single-mdocs-posts .entry-content td,
.single-mdocs-posts .post-content td,
.mdocs-post-single .entry-content td,
.mdocs-post-single .post-content td {
    padding: 1rem !important;
    border-bottom: 1px solid var(--nextlevel-border) !important;
    color: var(--nextlevel-text) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .single-mdocs-posts .entry-header,
    .single-mdocs-posts .post-header,
    .mdocs-post-single .entry-header,
    .mdocs-post-single .post-header {
        padding: 1.5rem 1rem !important;
    }
    
    .single-mdocs-posts .entry-title,
    .single-mdocs-posts .post-title,
    .mdocs-post-single .entry-title,
    .mdocs-post-single .post-title {
        font-size: 1.5rem !important;
    }
    
    .single-mdocs-posts .entry-content,
    .single-mdocs-posts .post-content,
    .mdocs-post-single .entry-content,
    .mdocs-post-single .post-content {
        font-size: 0.9rem !important;
        padding: 1.5rem 1rem !important;
    }
    
    .single-mdocs-posts .entry-content h2,
    .single-mdocs-posts .post-content h2,
    .mdocs-post-single .entry-content h2,
    .mdocs-post-single .post-content h2 {
        font-size: 1.75rem !important;
        padding: 0.75rem 0.75rem 0.75rem 1rem !important;
    }
    
    .single-mdocs-posts .entry-content h3,
    .single-mdocs-posts .post-content h3,
    .mdocs-post-single .entry-content h3,
    .mdocs-post-single .post-content h3 {
        font-size: 1.375rem !important;
    }
}

/* Animações */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.single-mdocs-posts .entry-content,
.single-mdocs-posts .post-content,
.mdocs-post-single .entry-content,
.mdocs-post-single .post-content {
    animation: slideInUp 0.8s ease-out 0.2s both !important;
}

.single-mdocs-posts article,
.mdocs-post-single article {
    animation: fadeInScale 0.6s ease-out !important;
}

.single-mdocs-posts .entry-title,
.single-mdocs-posts .post-title,
.mdocs-post-single .entry-title,
.mdocs-post-single .post-title {
    animation: slideInLeft 0.8s ease-out 0.1s both !important;
}

.single-mdocs-posts .entry-meta,
.single-mdocs-posts .post-meta,
.mdocs-post-single .entry-meta,
.mdocs-post-single .post-meta {
    animation: slideInLeft 0.8s ease-out 0.3s both !important;
}

/* Botão de ação flutuante (se houver) */
.single-mdocs-posts .mdocs-floating-action,
.mdocs-post-single .mdocs-floating-action {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    width: 56px !important;
    height: 56px !important;
    background: var(--nextlevel-primary) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--nextlevel-white) !important;
    box-shadow: var(--nextlevel-shadow-xl) !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    cursor: pointer !important;
}

.single-mdocs-posts .mdocs-floating-action:hover,
.mdocs-post-single .mdocs-floating-action:hover {
    transform: translateY(-4px) scale(1.1) !important;
    box-shadow: 0 12px 20px rgba(99, 102, 241, 0.4) !important;
}

/* Scroll suave */
.single-mdocs-posts,
.mdocs-post-single {
    scroll-behavior: smooth !important;
}

/* Melhorias no foco para acessibilidade */
.single-mdocs-posts *:focus,
.mdocs-post-single *:focus {
    outline: 2px solid var(--nextlevel-primary) !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

/* Loading placeholder otimizado */
.single-mdocs-posts .mdocs-loading,
.mdocs-post-single .mdocs-loading {
    background: linear-gradient(90deg, var(--nextlevel-light) 25%, rgba(255,255,255,0.5) 50%, var(--nextlevel-light) 75%) !important;
    background-size: 200% 100% !important;
    animation: shimmer 2s infinite !important;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}