/* ============================================
   TIPOGRAFIA E FORMATAÇÃO DE TEXTO
   Sobrescreve o reset do Tailwind nas áreas de conteúdo
   ============================================ */

/* ============================================
   FUNDO SUAVIZADO PARA POSTS
   ============================================ */

/* Fundo mais suave para páginas de posts */
body.single-post,
body.page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    min-height: 100vh;
}

/* Container principal dos posts com fundo suavizado */
.blog-content,
.product-content {
    background: rgba(30, 41, 59, 0.3) !important;
    border-radius: 1rem !important;
    padding: 2rem 6rem !important;
    margin: 2rem 0 !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(148, 163, 184, 0.1) !important;
}

/* Responsividade para containers de conteúdo */
@media (max-width: 1024px) {
    .blog-content,
    .product-content {
        padding: 2rem 4rem !important;
    }
}

@media (max-width: 768px) {
    .blog-content,
    .product-content {
        padding: 1.5rem 2rem !important;
        margin: 1.5rem 0 !important;
        border-radius: 0.75rem !important;
    }
}

@media (max-width: 640px) {
    .blog-content,
    .product-content {
        padding: 1rem 1.5rem !important;
        margin: 1rem 0 !important;
        border-radius: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .blog-content,
    .product-content {
        padding: 1rem !important;
        margin: 0.75rem 0 !important;
        border-radius: 0.5rem !important;
    }
}

/* Garantir centralização do article */
article {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Container específico para posts */
.container {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* ============================================
   ESTILOS GERAIS PARA ELEMENTOS FORA DE CONTAINERS
   ============================================ */

/* Listas gerais */
main ul:not(.product-benefits):not([class*="flex"]):not([class*="grid"]),
section ul:not(.product-benefits):not([class*="flex"]):not([class*="grid"]) {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 1.5rem 0 !important;
}

main ul:not(.product-benefits):not([class*="flex"]):not([class*="grid"]) li,
section ul:not(.product-benefits):not([class*="flex"]):not([class*="grid"]) li {
    position: relative !important;
    padding-left: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.6 !important;
    color: #d1d5db !important;
}

main ul:not(.product-benefits):not([class*="flex"]):not([class*="grid"]) li::before,
section ul:not(.product-benefits):not([class*="flex"]):not([class*="grid"]) li::before {
    content: '•' !important;
    color: #a78bfa !important;
    font-weight: bold !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
}

/* Blockquotes gerais */
main blockquote,
section blockquote {
    border-left: 4px solid #8b5cf6 !important;
    padding: 1.5rem 2rem !important;
    margin: 2rem 0 !important;
    background: rgba(139, 92, 246, 0.08) !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
    font-style: italic !important;
    color: #e5e7eb !important;
    position: relative !important;
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

main blockquote::before,
section blockquote::before {
    content: '"' !important;
    font-size: 4rem !important;
    color: #8b5cf6 !important;
    position: absolute !important;
    top: -0.5rem !important;
    left: 1rem !important;
    opacity: 0.3 !important;
}

main blockquote p,
section blockquote p {
    margin-bottom: 0 !important;
    font-size: 1.125rem !important;
    color: #e5e7eb !important;
}

/* Citações de autor */
main blockquote cite,
section blockquote cite {
    display: block !important;
    margin-top: 1rem !important;
    font-size: 0.875rem !important;
    color: #9ca3af !important;
    font-style: normal !important;
}

main blockquote cite::before,
section blockquote cite::before {
    content: '— ' !important;
}

/* ============================================
   HIERARQUIA DE TÍTULOS
   Aplica estilos com alta especificidade
   ============================================ */

/* Título Principal (H1) */
.blog-content h1,
.product-content h1,
article h1,
main h1 {
    font-size: clamp(2rem, 4vw, 2.75rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
}

/* Título Secundário (H2) */
.blog-content h2,
.product-content h2,
article h2,
main h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
    color: #ffffff !important;
    margin-bottom: 1.25rem !important;
    margin-top: 2.5rem !important;
    position: relative;
}

.blog-content h2::before,
.product-content h2::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(to bottom, #a78bfa, #8b5cf6);
    border-radius: 2px;
}

/* Título Terciário (H3) */
.blog-content h3,
.product-content h3,
article h3,
main h3 {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    margin-bottom: 1rem !important;
    margin-top: 2rem !important;
}

/* Título Quaternário (H4) */
.blog-content h4,
.product-content h4,
article h4,
main h4 {
    font-size: clamp(1.125rem, 2vw, 1.375rem) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #e5e7eb !important;
    margin-bottom: 0.875rem !important;
    margin-top: 1.5rem !important;
}

/* Título Quinário (H5) */
.blog-content h5,
.product-content h5,
article h5,
main h5 {
    font-size: clamp(1.125rem, 2vw, 1.25rem) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #d1d5db !important;
    margin-bottom: 0.75rem !important;
    margin-top: 1.25rem !important;
}

/* Título Senário (H6) */
.blog-content h6,
.product-content h6,
article h6,
main h6 {
    font-size: clamp(1rem, 1.5vw, 1.125rem) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #9ca3af !important;
    margin-bottom: 0.5rem !important;
    margin-top: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   PARÁGRAFOS E TEXTO CORRIDO
   ============================================ */

.blog-content p,
.product-content p,
article p {
    font-size: 1.125rem !important;
    line-height: 1.75 !important;
    color: #d1d5db !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
}

/* Parágrafo de introdução */
.lead {
    font-size: 1.25rem !important;
    line-height: 1.7 !important;
    color: #e5e7eb !important;
    font-weight: 400 !important;
    margin-bottom: 2rem !important;
}

/* Texto pequeno */
small,
.small {
    font-size: 0.875rem !important;
    color: #9ca3af !important;
    line-height: 1.5 !important;
}

/* ============================================
   LISTAS
   ============================================ */

.blog-content ul,
.blog-content ol,
.product-content ul,
.product-content ol,
article ul,
article ol {
    margin: 1.5rem 0 !important;
    padding-left: 2rem !important;
}

.blog-content li,
.product-content li,
article li {
    margin-bottom: 0.75rem !important;
    line-height: 1.6 !important;
    color: #d1d5db !important;
}

/* Lista não ordenada com estilo personalizado */
.blog-content ul,
.product-content ul {
    list-style: none;
    padding-left: 0 !important;
}

.blog-content ul li,
.product-content ul li {
    position: relative;
    padding-left: 1.5rem !important;
}

.blog-content ul li::before,
.product-content ul li::before {
    content: '•';
    color: #a78bfa;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Lista ordenada com estilo personalizado */
.blog-content ol,
.product-content ol {
    counter-reset: item;
    padding-left: 0 !important;
}

.blog-content ol li,
.product-content ol li {
    position: relative;
    padding-left: 2rem !important;
    counter-increment: item;
}

.blog-content ol li::before,
.product-content ol li::before {
    content: counter(item) '.';
    color: #a78bfa;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* ============================================
   ELEMENTOS ESPECIAIS
   ============================================ */

/* Citações */
.blog-content blockquote,
.product-content blockquote,
article blockquote {
    border-left: 4px solid #8b5cf6 !important;
    padding: 1.5rem 2rem !important;
    margin: 2rem 0 !important;
    background: rgba(139, 92, 246, 0.05) !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
    font-style: italic !important;
    color: #e5e7eb !important;
    position: relative;
}

.blog-content blockquote::before,
.product-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #8b5cf6;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    opacity: 0.3;
}

.blog-content blockquote p,
.product-content blockquote p {
    margin-bottom: 0 !important;
    font-size: 1.125rem !important;
}

/* Código inline */
.blog-content code,
.product-content code,
article code {
    background: rgba(31, 41, 55, 0.8) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.875em !important;
    color: #a78bfa !important;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

/* Bloco de código */
.blog-content pre,
.product-content pre,
article pre {
    background: #1f2937 !important;
    padding: 1.5rem !important;
    border-radius: 0.5rem !important;
    overflow-x: auto !important;
    margin: 2rem 0 !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    position: relative;
}

.blog-content pre::before,
.product-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #a78bfa, #8b5cf6);
    border-radius: 0.5rem 0.5rem 0 0;
}

.blog-content pre code,
.product-content pre code {
    background: none !important;
    padding: 0 !important;
    border: none !important;
    color: #e5e7eb !important;
    font-size: 0.875rem !important;
}

/* Destaques */
.blog-content mark,
.product-content mark,
.highlight {
    background: linear-gradient(120deg, rgba(167, 139, 250, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%) !important;
    padding: 0.125rem 0.25rem !important;
    border-radius: 0.25rem !important;
    color: #ffffff !important;
}

/* Texto forte/negrito */
.blog-content strong,
.product-content strong,
article strong {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Texto enfático */
.blog-content em,
.product-content em,
article em {
    color: #e5e7eb !important;
    font-style: italic !important;
}

/* ============================================
   LINKS
   ============================================ */

.blog-content a,
.product-content a,
article a {
    color: #a78bfa !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    position: relative;
}

.blog-content a:hover,
.product-content a:hover,
article a:hover {
    color: #8b5cf6 !important;
}

.blog-content a::after,
.product-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #a78bfa, #8b5cf6);
    transition: width 0.3s ease;
}

.blog-content a:hover::after,
.product-content a:hover::after {
    width: 100%;
}

/* ============================================
   DIVISORES
   ============================================ */

.blog-content hr,
.product-content hr,
article hr {
    border: none !important;
    height: 1px !important;
    background: linear-gradient(to right, transparent, #8b5cf6, transparent) !important;
    margin: 3rem 0 !important;
}

/* ============================================
   TABELAS
   ============================================ */

.blog-content table,
.product-content table,
article table,
main table,
section table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 2rem 0 !important;
    background: rgba(51, 65, 85, 0.6) !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(148, 163, 184, 0.1) !important;
}

.blog-content table thead,
.product-content table thead,
article table thead,
main table thead,
section table thead {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
}

.blog-content table th,
.product-content table th,
article table th,
main table th,
section table th {
    padding: 1rem 1.5rem !important;
    text-align: left !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border: none !important;
}

.blog-content table td,
.product-content table td,
article table td,
main table td,
section table td {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #374151 !important;
    color: #e5e7eb !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

.blog-content table tbody tr,
.product-content table tbody tr,
article table tbody tr,
main table tbody tr,
section table tbody tr {
    transition: background-color 0.2s ease !important;
}

.blog-content table tbody tr:hover,
.product-content table tbody tr:hover,
article table tbody tr:hover,
main table tbody tr:hover,
section table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05) !important;
}

.blog-content table tbody tr:nth-child(even),
.product-content table tbody tr:nth-child(even),
article table tbody tr:nth-child(even),
main table tbody tr:nth-child(even),
section table tbody tr:nth-child(even) {
    background: rgba(31, 41, 55, 0.5) !important;
}

.blog-content table tbody tr:last-child td,
.product-content table tbody tr:last-child td,
article table tbody tr:last-child td,
main table tbody tr:last-child td,
section table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Tabelas responsivas */
@media (max-width: 768px) {
    .blog-content table,
    .product-content table,
    article table,
    main table,
    section table {
        font-size: 0.875rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .blog-content table th,
    .product-content table th,
    article table th,
    main table th,
    section table th {
        padding: 0.75rem 1rem !important;
        font-size: 0.75rem !important;
    }
    
    .blog-content table td,
    .product-content table td,
    article table td,
    main table td,
    section table td {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }
}

/* Tabelas com scroll horizontal em mobile */
.table-wrapper {
    overflow-x: auto !important;
    margin: 2rem 0 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

.table-wrapper table {
    margin: 0 !important;
    min-width: 600px !important;
}

/* Estilos especiais para células com números/percentuais */
.blog-content table td.number,
.product-content table td.number,
article table td.number,
main table td.number,
section table td.number {
    text-align: right !important;
    font-weight: 600 !important;
    color: #a78bfa !important;
}

/* Estilos para células de status */
.blog-content table td.status-success,
.product-content table td.status-success,
article table td.status-success,
main table td.status-success,
section table td.status-success {
    color: #10b981 !important;
    font-weight: 600 !important;
}

.blog-content table td.status-warning,
.product-content table td.status-warning,
article table td.status-warning,
main table td.status-warning,
section table td.status-warning {
    color: #f59e0b !important;
    font-weight: 600 !important;
}

.blog-content table td.status-error,
.product-content table td.status-error,
article table td.status-error,
main table td.status-error,
section table td.status-error {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

/* Tabelas compactas */
.blog-content table.compact,
.product-content table.compact,
article table.compact,
main table.compact,
section table.compact {
    margin: 1rem 0 !important;
}

.blog-content table.compact th,
.product-content table.compact th,
article table.compact th,
main table.compact th,
section table.compact th {
    padding: 0.75rem 1rem !important;
    font-size: 0.75rem !important;
}

.blog-content table.compact td,
.product-content table.compact td,
article table.compact td,
main table.compact td,
section table.compact td {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
}

/* ============================================
   IMAGENS
   ============================================ */

.blog-content img,
.product-content img {
    border-radius: 0.75rem !important;
    margin: 2.5rem 0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

.blog-content figure,
.product-content figure {
    margin: 2.5rem 0 !important;
    text-align: center;
}

.blog-content figcaption,
.product-content figcaption {
    margin-top: 0.75rem !important;
    font-size: 0.875rem !important;
    color: #9ca3af !important;
    font-style: italic !important;
}

/* Remove margem da imagem destacada imediatamente após o post meta */
.post-meta-compact + .mb-10 img {
    margin: 0 !important;
}

/* ============================================
   POST META COMPACT (Autor, Data, etc.)
   ============================================ */

.post-meta-compact {
    margin-bottom: 1.5rem !important;
    padding: 0.25rem 0.75rem !important;
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    height: 35px;
    align-content: center;
}

.post-meta-compact .flex {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    line-height: 1 !important;
}

.post-meta-compact .flex > div {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.post-meta-compact img {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.post-meta-compact img:hover {
    border-color: rgba(139, 92, 246, 0.6) !important;
    transform: scale(1.05) !important;
}

.post-meta-compact span {
    font-size: 0.8rem !important;
    color: #9ca3af !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}

.post-meta-compact .font-medium {
    color: #d1d5db !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

.post-meta-compact i {
    width: 12px !important;
    height: 12px !important;
    color: #8b5cf6 !important;
    flex-shrink: 0 !important;
}

.post-meta-compact .text-gray-600 {
    color: #6b7280 !important;
    font-weight: 300 !important;
    margin: 0 0.25rem !important;
}

/* Responsividade para Post Meta Compact */
@media (max-width: 768px) {
    .post-meta-compact .flex {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .post-meta-compact img {
        width: 18px !important;
        height: 18px !important;
    }
    
    .post-meta-compact span {
        font-size: 0.75rem !important;
    }
    
    .post-meta-compact i {
        width: 11px !important;
        height: 11px !important;
    }
}

@media (max-width: 480px) {
    .post-meta-compact {
        padding: 0.2rem 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .post-meta-compact .flex {
        gap: 0.375rem !important;
    }
    
    .post-meta-compact .text-gray-600 {
        display: none !important;
    }
    
    .post-meta-compact span {
        font-size: 0.7rem !important;
    }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .blog-content h1,
    .product-content h1,
    article h1,
    main h1 {
        font-size: 1.875rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.2 !important;
    }
    
    .blog-content h2,
    .product-content h2,
    article h2,
    main h2 {
        font-size: 1.5rem !important;
        margin-top: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .blog-content h2::before,
    .product-content h2::before {
        left: -0.75rem;
        width: 3px;
    }
    
    .blog-content h3,
    .product-content h3,
    article h3,
    main h3 {
        font-size: 1.25rem !important;
        margin-top: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .blog-content h4,
    .product-content h4,
    article h4,
    main h4 {
        font-size: 1.125rem !important;
        margin-top: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .blog-content p,
    .product-content p,
    article p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.25rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* Ajustes para listas em mobile */
    .blog-content ul,
    .blog-content ol,
    .product-content ul,
    .product-content ol {
        padding-left: 1.5rem !important;
        margin: 1rem 0 !important;
    }
    
    .blog-content li,
    .product-content li {
        margin-bottom: 0.5rem !important;
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    .blog-content h1,
    .product-content h1,
    article h1,
    main h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .blog-content h2,
    .product-content h2,
    article h2,
    main h2 {
        font-size: 1.25rem !important;
        margin-top: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .blog-content h3,
    .product-content h3,
    article h3,
    main h3 {
        font-size: 1.125rem !important;
        margin-top: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .blog-content h4,
    .product-content h4,
    article h4,
    main h4 {
        font-size: 1rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .blog-content p,
    .product-content p,
    article p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
    
    .lead {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
    
    /* Ajustes específicos para mobile pequeno */
    .blog-content ul,
    .blog-content ol,
    .product-content ul,
    .product-content ol {
        padding-left: 1.25rem !important;
        margin: 0.75rem 0 !important;
    }
    
    .blog-content li,
    .product-content li {
        margin-bottom: 0.375rem !important;
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* Blockquotes em mobile pequeno */
    .blog-content blockquote,
    .product-content blockquote,
    main blockquote,
    section blockquote {
        padding: 1rem 1.25rem !important;
        margin: 1rem 0 !important;
        font-size: 0.9rem !important;
    }
    
    /* Tabelas em mobile pequeno */
    .blog-content table,
    .product-content table {
        font-size: 0.8rem !important;
        margin: 1rem 0 !important;
    }
    
    .blog-content table th,
    .product-content table th {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    .blog-content table td,
    .product-content table td {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
}