/* ==========================================================================
   CSS URGENTE - CORRIGE PROBLEMA DE VISIBILIDADE DO CONTEÚDO
   Adicione no início do arquivo blog-post-enhancements.css
   ========================================================================== */

/* --------------------------------
   CORREÇÃO CRÍTICA - VISIBILIDADE DO CONTEÚDO
   -------------------------------- */

/* Força a exibição do conteúdo - Soluciona conflitos */
.elementor-widget-theme-post-content .elementor-widget-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    min-height: auto !important;
    height: auto !important;
}

/* Garante que todos os parágrafos sejam visíveis */
.elementor-widget-theme-post-content p {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garante que todos os headings sejam visíveis */
.elementor-widget-theme-post-content h1,
.elementor-widget-theme-post-content h2,
.elementor-widget-theme-post-content h3,
.elementor-widget-theme-post-content h4,
.elementor-widget-theme-post-content h5,
.elementor-widget-theme-post-content h6 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garante que listas sejam visíveis */
.elementor-widget-theme-post-content ul,
.elementor-widget-theme-post-content ol {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garante que figuras e imagens sejam visíveis */
.elementor-widget-theme-post-content figure,
.elementor-widget-theme-post-content img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garante que iframes (vídeos do YouTube) sejam visíveis */
.elementor-widget-theme-post-content iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* --------------------------------
   1. CONFIGURAÇÕES GLOBAIS
   -------------------------------- */

/* Seletor principal do conteúdo do post */
.elementor-widget-theme-post-content .elementor-widget-container {
    line-height: 1.7;
    color: #333;
}

/* Seleção de texto customizada */
.elementor-widget-theme-post-content ::selection {
    background-color: rgba(52, 152, 219, 0.2);
    color: #2c3e50;
}

/* --------------------------------
   2. TÍTULOS (H1-H6)
   -------------------------------- */

.elementor-widget-theme-post-content h1,
.elementor-widget-theme-post-content h2,
.elementor-widget-theme-post-content h3,
.elementor-widget-theme-post-content h4,
.elementor-widget-theme-post-content h5,
.elementor-widget-theme-post-content h6 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    position: relative;
}

.elementor-widget-theme-post-content h1 {
    margin-top: 0;
}

/* H2 com linha decorativa azul e reset do contador H3 */
.elementor-widget-theme-post-content h2 {
    color: #3498db;
    padding-left: 1.5rem;
    counter-reset: h3-counter;  /* Reinicia a contagem dos H3 aqui */
}

.elementor-widget-theme-post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3498db, #5dade2);
    border-radius: 2px;
}

/* H3 com numeração */
.elementor-widget-theme-post-content h3 {
    counter-increment: h3-counter;
    padding-left: 2rem;
    position: relative;
}

.elementor-widget-theme-post-content h3::before {
    content: counter(h3-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #e8f4f8;
    color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
}

/* --------------------------------
   3. PARÁGRAFOS
   -------------------------------- */

.elementor-widget-theme-post-content p {
    margin-bottom: 1.8rem;
    text-align: justify;
    hyphens: auto;
}

/* Primeira letra do primeiro parágrafo (drop cap) */
.elementor-widget-theme-post-content p:first-child::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 3rem;
    padding-right: 8px;
    color: #3498db;
    font-weight: bold;
}

/* --------------------------------
   4. IMAGENS
   -------------------------------- */

.elementor-widget-theme-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f1f2f6;
}

/* Hover effect nas imagens */
.elementor-widget-theme-post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Imagens do WordPress (figure) */
.elementor-widget-theme-post-content figure {
    text-align: center;
    margin: 2.5rem 0;
}

/* Imagens em orientação vertical - largura máxima */
.elementor-widget-theme-post-content img[height][width] {
    max-width: min(600px, 100%);
    margin: 0 auto;
    display: block;
}

/* --------------------------------
   5. LEGENDAS DE IMAGENS
   -------------------------------- */

.elementor-widget-theme-post-content figcaption,
.elementor-widget-theme-post-content .wp-element-caption {
    background: #f8f9fa;
    padding: 12px 20px;
    margin-top: 8px;
    border-radius: 8px;
    font-style: italic;
    font-size: 0.9em;
    color: #6c757d;
    text-align: center;
    border-top: 3px solid #e9ecef;
}

/* --------------------------------
   6. LISTAS MODERNAS E BALANCEADAS
   -------------------------------- */

/* LISTAS PRINCIPAIS (UL) - MINI CARDS */
.elementor-widget-theme-post-content ul {
    margin: 2rem 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.elementor-widget-theme-post-content ul li {
    list-style: none;
    position: relative;
    background: rgba(52, 152, 219, 0.05);
    border-left: 3px solid #3498db;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.elementor-widget-theme-post-content ul li:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateX(8px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Marcador moderno com gradiente */
.elementor-widget-theme-post-content ul li::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #3498db, #5dade2);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* SUB-LISTAS (UL ANINHADAS) - SETAS */
.elementor-widget-theme-post-content ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding-left: 1rem;
}

.elementor-widget-theme-post-content ul ul li {
    background: rgba(44, 62, 80, 0.05);
    border-left: 2px solid #bdc3c7;
    padding: 0.5rem 1rem 0.5rem 2rem;
    margin-bottom: 0.5rem;
}

.elementor-widget-theme-post-content ul ul li::before {
    content: '▸';
    color: #7f8c8d;
    background: none;
    width: auto;
    height: auto;
    border-radius: 0;
    font-size: 1.1em;
    left: 0.7rem;
    box-shadow: none;
}

.elementor-widget-theme-post-content ul ul li:hover {
    background: rgba(44, 62, 80, 0.08);
    border-left-color: #95a5a6;
}

/* LISTAS NUMERADAS (OL) - CÍRCULOS AZUIS MODERNOS */
.elementor-widget-theme-post-content ol {
    counter-reset: list-counter;
    padding-left: 0;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.elementor-widget-theme-post-content ol li {
    counter-increment: list-counter;
    position: relative;
    padding: 0.8rem 1rem 0.8rem 3.5rem;
    background: linear-gradient(90deg, #f8f9fa 0%, transparent 100%);
    border-radius: 8px;
    border-left: 3px solid #3498db;
    line-height: 1.6;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.elementor-widget-theme-post-content ol li:hover {
    background: linear-gradient(90deg, #f1f8ff 0%, transparent 100%);
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.elementor-widget-theme-post-content ol li::marker {
    content: none;
}

.elementor-widget-theme-post-content ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3498db, #5dade2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.4);
}

/* LISTAS ESPECÍFICAS DO WORDPRESS */
.elementor-widget-theme-post-content .wp-block-list li {
    background: rgba(52, 152, 219, 0.05) !important;
    border-left: 3px solid #3498db !important;
    position: relative !important;
    padding: 0.8rem 1rem 0.8rem 3rem !important;
    border-radius: 8px !important;
    margin-bottom: 0.8rem !important;
    list-style: none !important;
}

.elementor-widget-theme-post-content .wp-block-list li::before {
    content: '' !important;
    position: absolute !important;
    left: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 12px !important;
    height: 12px !important;
    background: linear-gradient(45deg, #3498db, #5dade2) !important;
    border-radius: 50% !important;
}

.elementor-widget-theme-post-content .wp-block-list li ul li::before {
    display: none;
}
.elementor-widget-theme-post-content .wp-block-list li ul li{
    padding: 0.6rem 1rem 0.6rem 1rem !important;
}


/* --------------------------------
   7. CITAÇÕES (BLOCKQUOTE)
   -------------------------------- */

.elementor-widget-theme-post-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.elementor-widget-theme-post-content blockquote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 3rem;
    color: #3498db;
    opacity: 0.3;
    line-height: 1;
}

.elementor-widget-theme-post-content blockquote p {
    margin-bottom: 0;
    padding-left: 2rem;
}

/* --------------------------------
   8. LINKS
   -------------------------------- */

.elementor-widget-theme-post-content a {
    color: #3498db;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.elementor-widget-theme-post-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #5dade2);
    transition: width 0.3s ease;
}

.elementor-widget-theme-post-content a:hover::after {
    width: 100%;
}

.elementor-widget-theme-post-content a:hover {
    color: #2980b9;
}

/* Links externos com ícone */
.elementor-widget-theme-post-content a[target="_blank"]::before {
    content: '↗';
    margin-right: 4px;
    font-size: 0.8em;
    opacity: 0.7;
}

/* --------------------------------
   9. CÓDIGOS
   -------------------------------- */

.elementor-widget-theme-post-content code {
    background: #f8f9fa;
    color: #c7254e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #e9ecef;
}

.elementor-widget-theme-post-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.elementor-widget-theme-post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

/* --------------------------------
   10. ELEMENTOS ESPECIAIS DO WORDPRESS GUTENBERG
   -------------------------------- */

/* Classes específicas que encontrei no seu HTML */
.elementor-widget-theme-post-content .wp-block-heading {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.elementor-widget-theme-post-content .wp-block-embed-youtube {
    margin: 2rem 0;
}

.elementor-widget-theme-post-content .wp-block-embed-youtube .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.elementor-widget-theme-post-content .wp-block-embed-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --------------------------------
   11. MELHORIAS ADICIONAIS
   -------------------------------- */

/* Ajustes para imagens específicas */
.elementor-widget-theme-post-content .wp-block-image {
    text-align: center;
    margin: 2rem 0;
}

.elementor-widget-theme-post-content .wp-block-image img {
    display: inline-block;
}

/* --------------------------------
   12. RESPONSIVIDADE
   -------------------------------- */

@media (max-width: 768px) {
    .elementor-widget-theme-post-content h2 {
        padding-left: 1rem;
    }
    
    .elementor-widget-theme-post-content h3 {
        padding-left: 1.5rem;
    }
    
    .elementor-widget-theme-post-content blockquote {
        padding: 1rem 1.5rem;
    }
    
    .elementor-widget-theme-post-content p:first-child::first-letter {
        font-size: 3rem;
        line-height: 2.5rem;
    }
    
    .elementor-widget-theme-post-content ul li {
        padding-left: 2.5rem;
    }
    
    .elementor-widget-theme-post-content ul li::before {
        left: 0.7rem;
    }
    
    .elementor-widget-theme-post-content ol li {
        padding-left: 2.5rem;
    }
    
    .elementor-widget-theme-post-content ol li::before {
        left: 0.7rem;
        width: 24px;
        height: 24px;
    }
    
    .elementor-widget-theme-post-content ul ul li {
        padding-left: 1.5rem;
    }
}

/* --------------------------------
   13. ANIMAÇÕES SUAVES PARA LISTAS
   -------------------------------- */

.elementor-widget-theme-post-content li {
    animation: fadeInSlide 0.5s ease;
}

.elementor-widget-theme-post-content li:nth-child(2) {
    animation-delay: 0.1s;
}

.elementor-widget-theme-post-content li:nth-child(3) {
    animation-delay: 0.2s;
}

.elementor-widget-theme-post-content li:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------
   14. ACCESSIBILITY
   -------------------------------- */

.elementor-widget-theme-post-content *:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}