/* ===== ESTILOS PARA CONTEÚDO DE ARTIGOS ===== */

/* Container principal do conteúdo do artigo */
.article-content {
    font-size: var(--desktop-article-text-size);
    line-height: 1.6;
    color: var(--text-color);
}

/* Títulos dentro do artigo */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-family: var(--font-family-headings, 'Lora', serif);
    color: var(--headings-color, #003b46);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* Tamanhos específicos com maior especificidade */
html body .article-content h1 {
    font-size: var(--desktop-h1-size) !important;
}

html body .article-content h2 {
    font-size: var(--desktop-h2-size) !important;
}

html body .article-content h3 {
    font-size: var(--desktop-h3-size) !important;
}

html body .article-content h4 {
    font-size: var(--desktop-h4-size) !important;
}

html body .article-content h5 {
    font-size: var(--desktop-h5-size) !important;
}

html body .article-content h6 {
    font-size: var(--desktop-h6-size) !important;
}

/* Parágrafos */
.article-content p {
    margin-bottom: 0rem;
    text-align: justify;
}

/* Listas */
.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
}

.article-content ol li {
    list-style-type: decimal;
    margin-bottom: 0.5rem;
}

.article-content li {
    line-height: 1.5;
}

/* Listas aninhadas */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Tabelas */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.article-content table th,
.article-content table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: break-word;
}

.article-content table th {
    background-color: var(--headings-color, #003b46);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 3px solid #e58b73;
}

.article-content table th,
.article-content table td {
    border-bottom: 1px solid #e5e7eb;
}

.article-content table tr:nth-child(even) {
    background-color: #f8f5f2;
}

.article-content table tr:hover {
    background-color: rgba(229, 139, 115, 0.08);
    border-left: 3px solid #e58b73;
}

/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid var(--accent-color, #e58b73);
    background: #f9fafb;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.1rem;
    border-radius: 0 8px 8px 0;
}

.article-content blockquote p {
    margin-bottom: 0;
}

.article-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-style: normal;
    color: var(--headings-color, #003b46);
}

/* Links */
.article-content a {
    color: var(--accent-color, #e58b73);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--headings-color, #003b46);
    text-decoration-thickness: 3px;
}

/* Código */
.article-content code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: #1e293b;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Imagens */
.article-content img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    /*margin: 2rem 0;*/
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    display: block;
}

/* Garantir que figuras e containers de imagem também se ajustem */
.article-content figure,
.article-content .wp-block-image,
.article-content .wp-caption {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Imagens dentro de figuras e blocos do WordPress */
.article-content figure img,
.article-content .wp-block-image img,
.article-content .wp-caption img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

/* Separadores */
.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-color, #e58b73), transparent);
    margin: 3rem 0;
}

/* Destaque para texto forte */
.article-content strong,
.article-content b {
    font-weight: 700;
    color: var(--headings-color, #003b46);
}

/* Texto em itálico */
.article-content em,
.article-content i {
    font-style: italic;
    line-height: 1.0 !important;
    color: #5c5c5c;
}

/* Responsividade */
@media (max-width: 768px) {
    .article-content {
        font-size: var(--mobile-article-text-size) !important;
    }

    /* Tamanhos mobile com maior especificidade */
    html body .article-content h1 {
        font-size: var(--mobile-h1-size) !important;
    }

    html body .article-content h2 {
        font-size: var(--mobile-h2-size) !important;
    }

    html body .article-content h3 {
        font-size: var(--mobile-h3-size) !important;
    }

    html body .article-content h4 {
        font-size: var(--mobile-h4-size) !important;
    }

    html body .article-content h5 {
        font-size: var(--mobile-h5-size) !important;
    }

    html body .article-content h6 {
        font-size: var(--mobile-h6-size) !important;
    }

    /* Imagens em mobile - regras mais específicas */
    .article-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    /* Containers de imagem em mobile */
    .article-content figure,
    .article-content .wp-block-image,
    .article-content .wp-caption,
    .article-content div:has(img) {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Imagens dentro de qualquer container em mobile */
    .article-content figure img,
    .article-content .wp-block-image img,
    .article-content .wp-caption img,
    .article-content div img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }

    .article-content table {
        font-size: 0.9rem;
        min-width: 450px;
        overflow-x: auto;
        display: block;
    }

    .article-content table th,
    .article-content table td {
        padding: 0.6rem 0.6rem;
        min-width: 100px;
        max-width: 200px;
    }
    
    .article-content table th {
        font-size: 0.85rem;
    }
    
    .article-content table td {
        font-size: 0.875rem;
    }

    .article-content blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }
}

/* Desktop - rolagem também no desktop */
@media (min-width: 769px) {
    .article-content table {
        min-width: 700px;
        overflow-x: auto;
        display: block;
        -webkit-overflow-scrolling: touch;
    }
    
    .article-content table th,
    .article-content table td {
        min-width: 150px;
        max-width: 300px;
    }
}

/* ===== ESTILOS PARA FEEDBACK E REAÇÕES ===== */

/* Botões de reação selecionados */
.reaction-btn.selected {
    background-color: #e58b73 !important;
    border-color: #e58b73 !important;
    color: white !important;
}

.reaction-btn.selected i {
    color: white !important;
}

.reaction-btn.selected span {
    color: white !important;
}

.reaction-btn.selected .change-text {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ===== ESTILOS PARA SHORTCODES ===== */

/* Caixa de Newsletter */
.newsletter-box {
    background: var(--headings-color, #003b46);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
    box-shadow: 0 8px 25px rgba(0, 59, 70, 0.2);
}

.newsletter-box h4 {
    color: white !important;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.newsletter-box p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}



/* Citação Tweetável */
.tweetable-quote {
    position: relative;
    margin: 3rem 0;
}

.tweetable-quote blockquote {
    background: #f9fafb;
    border-left: 4px solid var(--accent-color, #e58b73);
    padding: 2rem;
    font-style: italic;
    font-size: 1.25rem;
    position: relative;
    border-radius: 8px;
}

/* ===== CORREÇÕES ESPECÍFICAS ===== */

/* Remove estilos conflitantes do Tailwind para o conteúdo */
.article-content .prose,
.article-content .lg\:prose-xl {
    max-width: none !important;
}

/* Remove classes do Tailwind que podem interferir */
.article-content .text-lg {
    font-size: inherit !important;
}

.article-content .prose {
    color: inherit !important;
    max-width: none !important;
}

.article-content .lg\:prose-xl {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Garante que shortcodes não sejam exibidos como texto */
.article-content [data-shortcode] {
    display: none;
}

/* Remove estilos conflitantes do prose */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    margin-top: inherit !important;
    margin-bottom: inherit !important;
}

.prose p {
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin-top: inherit !important;
    margin-bottom: inherit !important;
}

.prose table {
    font-size: inherit !important;
    line-height: inherit !important;
}

.prose th,
.prose td {
    padding: inherit !important;
    border-bottom: inherit !important;
    vertical-align: inherit !important;
}

.prose th {
    background-color: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
    text-transform: inherit !important;
    letter-spacing: inherit !important;
}

.prose tr:nth-child(even) {
    background-color: inherit !important;
}

.prose blockquote {
    border-left: inherit !important;
    background: inherit !important;
    padding: inherit !important;
    margin: inherit !important;
    font-style: inherit !important;
    font-size: inherit !important;
    border-radius: inherit !important;
}

.prose ul,
.prose ol {
    margin-bottom: inherit !important;
    padding-left: inherit !important;
}

.prose li {
    margin-bottom: inherit !important;
    line-height: inherit !important;
}

.prose a {
    color: inherit !important;
    text-decoration: inherit !important;
    text-decoration-thickness: inherit !important;
    text-underline-offset: inherit !important;
}

.prose strong,
.prose b {
    font-weight: inherit !important;
    color: inherit !important;
}

.prose em,
.prose i {
    font-style: inherit !important;
    color: inherit !important;
}

.prose code {
    background: inherit !important;
    padding: inherit !important;
    border-radius: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
}

.prose pre {
    background: inherit !important;
    color: inherit !important;
    padding: inherit !important;
    border-radius: inherit !important;
    overflow-x: inherit !important;
    margin: inherit !important;
}

.prose img {
    max-width: inherit !important;
    height: inherit !important;
    border-radius: inherit !important;
    margin: inherit !important;
    box-shadow: inherit !important;
}

.prose hr {
    border: inherit !important;
    height: inherit !important;
    background: inherit !important;
    margin: inherit !important;
}

/* ===== OTIMIZAÇÃO ADICIONAL PARA DISPOSITIVOS MUITO PEQUENOS ===== */
@media (max-width: 480px) {
    .article-content table {
        min-width: 400px;
    }
    
    .article-content table th,
    .article-content table td {
        min-width: 80px;
        max-width: 160px;
        padding: 0.5rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .article-content table th {
        font-size: 0.8rem;
    }
}