/**
 * Blog Editorial Layout - MR2C
 * Layout editorial de duas colunas para artigos longos
 * Aplicar APENAS em páginas de artigos do blog
 */

/* =====================================================
   EDITORIAL LAYOUT SYSTEM - TWO COLUMN GRID
   - Conteúdo principal ancorado à esquerda (65-70%)
   - Sidebar à direita (30-35%)
   - Sombra suave e difusa
   - Espaçamento vertical generoso
   ===================================================== */

/* Reset e variáveis */
.editorial-article {
    --editorial-shadow: 0 4px 40px rgba(0,0,0,0.06);
    --editorial-radius: 16px;
    --editorial-padding-v: 3rem;
    --editorial-padding-h: 2.5rem;
    --primary-color: #3d7b6f;
    --secondary-color: #d4af37;
    --text-dark: #1a1a1a;
    --text-body: #444;
    --text-light: #666;
    --bg-light: #f8f9fa;
}

/* =====================================================
   TWO-COLUMN EDITORIAL GRID
   ===================================================== */

/* Section de conteúdo do artigo */
.editorial-article .article-content {
    padding: 3rem 0;
    background: var(--bg-light);
}

/* Container Bootstrap - largura máxima aumentada */
.editorial-article .article-content > .container {
    max-width: 1320px;
}

/* Card do artigo na coluna principal - preenche a coluna, NÃO centralizado */
.editorial-article .article-content article {
    background: #fff;
    border-radius: var(--editorial-radius);
    box-shadow: var(--editorial-shadow);
    padding: var(--editorial-padding-v) var(--editorial-padding-h);
    position: relative;
    overflow: hidden;
}

/* Detalhe sutil no topo do card */
.editorial-article .article-content article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Wrapper legado (blog-importacao-mei-2025) */
.editorial-article .article-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
}

.editorial-article .article-card {
    background: #fff;
    border-radius: var(--editorial-radius);
    box-shadow: var(--editorial-shadow);
    padding: var(--editorial-padding-v) var(--editorial-padding-h);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.editorial-article .article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.editorial-article .article-inner {
    max-width: 800px;
}

/* =====================================================
   TIPOGRAFIA EDITORIAL
   ===================================================== */

.editorial-article h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.editorial-article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 3rem 0 1.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
    line-height: 1.3;
}

.editorial-article h2:first-of-type {
    border-top: none;
    margin-top: 2rem;
    padding-top: 0;
}

.editorial-article h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 2.5rem 0 1.25rem;
}

.editorial-article h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.editorial-article p {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-body);
    margin-bottom: 1.5rem;
}

.editorial-article .lead {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.7;
    border-left: 4px solid var(--primary-color);
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

/* =====================================================
   LISTAS - Dentro do fluxo editorial (apenas no conteúdo)
   ===================================================== */

.editorial-article .article-inner ul,
.editorial-article .article-inner ol,
.editorial-article .article-content ul,
.editorial-article .article-content ol,
.editorial-article article ul,
.editorial-article article ol {
    margin: 1.5rem 0 2rem;
    padding: 1.5rem 2rem 1.5rem 2.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
}

.editorial-article .article-inner li,
.editorial-article .article-content li,
.editorial-article article li {
    margin-bottom: 0.75rem;
    line-height: 1.75;
    font-size: 1.05rem;
    color: var(--text-body);
}

.editorial-article .article-inner li:last-child,
.editorial-article .article-content li:last-child,
.editorial-article article li:last-child {
    margin-bottom: 0;
}

/* Reset para footer e outras áreas */
.editorial-article .site-footer ul,
.editorial-article .site-footer ol,
.editorial-article footer ul,
.editorial-article footer ol {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.editorial-article .site-footer li,
.editorial-article footer li {
    margin-bottom: 0.6rem;
    line-height: inherit;
    font-size: inherit;
    color: inherit;
}

/* =====================================================
   CALLOUT BOXES - Alinhados com conteúdo
   ===================================================== */

.editorial-article .info-box,
.editorial-article .highlight-box,
.editorial-article .success-box,
.editorial-article .danger-box,
.editorial-article .warning-box {
    padding: 1.75rem 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.editorial-article .info-box {
    background: linear-gradient(135deg, #e8f4f2 0%, #f0f7f6 100%);
    border-left: 5px solid var(--primary-color);
}

.editorial-article .highlight-box,
.editorial-article .warning-box {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
    border-left: 5px solid #ffc107;
}

.editorial-article .success-box {
    background: linear-gradient(135deg, #d1e7dd 0%, #e8f5e9 100%);
    border-left: 5px solid #198754;
}

.editorial-article .danger-box {
    background: linear-gradient(135deg, #f8d7da 0%, #ffebee 100%);
    border-left: 5px solid #dc3545;
}

.editorial-article .info-box h4,
.editorial-article .highlight-box h4,
.editorial-article .success-box h4,
.editorial-article .danger-box h4,
.editorial-article .warning-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.editorial-article .info-box h4 { color: var(--primary-color); }
.editorial-article .success-box h4 { color: #0f5132; }
.editorial-article .danger-box h4 { color: #842029; }
.editorial-article .highlight-box h4,
.editorial-article .warning-box h4 { color: #664d03; }

.editorial-article .info-box ul,
.editorial-article .highlight-box ul,
.editorial-article .success-box ul,
.editorial-article .danger-box ul,
.editorial-article .warning-box ul {
    margin: 0;
    padding: 0 0 0 1.25rem;
    background: transparent;
    border: none;
}

/* =====================================================
   BLOCKQUOTES
   ===================================================== */

.editorial-article blockquote {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-left: 4px solid var(--secondary-color);
    padding: 1.75rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.editorial-article blockquote p {
    margin-bottom: 0;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* =====================================================
   TABELAS
   ===================================================== */

.editorial-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95rem;
}

.editorial-article th {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
}

.editorial-article td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    color: var(--text-body);
}

.editorial-article tr:nth-child(even) {
    background: #f8f9fa;
}

.editorial-article tr:last-child td {
    border-bottom: none;
}

/* =====================================================
   CODE BLOCKS
   ===================================================== */

.editorial-article .code-block,
.editorial-article pre {
    background: #2b2d42;
    color: #f8f9fa;
    padding: 1.75rem 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    font-family: 'Courier New', Consolas, monospace;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.editorial-article code {
    background: #e9ecef;
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.editorial-article pre code,
.editorial-article .code-block code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* =====================================================
   IMAGENS
   ===================================================== */

.editorial-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.editorial-article .section-image {
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* =====================================================
   CTA BOX
   ===================================================== */

.editorial-article .cta-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a635c 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    margin: 3rem 0;
    text-align: center;
}

.editorial-article .cta-box h3,
.editorial-article .cta-box h4,
.editorial-article .cta-box h5 {
    color: white;
    margin-top: 0;
    margin-bottom: 1rem;
}

.editorial-article .cta-box p {
    color: rgba(255,255,255,0.95);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.editorial-article .cta-box ul {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    background: transparent;
    border: none;
    padding-left: 1.5rem;
}

.editorial-article .cta-box li {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.75rem;
}

.editorial-article .cta-box .btn,
.editorial-article .cta-box .cta-button {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 0.875rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.editorial-article .cta-box .btn:hover,
.editorial-article .cta-box .cta-button:hover {
    background: #c4a85f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    color: var(--text-dark);
}

/* =====================================================
   FAQ
   ===================================================== */

.editorial-article .faq-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease;
}

.editorial-article .faq-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.editorial-article .faq-question {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.editorial-article .faq-answer {
    font-size: 1.05rem;
    color: var(--text-body);
    margin: 0;
    line-height: 1.75;
}

/* =====================================================
   SIDEBAR (para layouts com sidebar)
   ===================================================== */

.editorial-article .sidebar {
    position: sticky;
    top: 100px;
}

.editorial-article .sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.editorial-article .sidebar-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.editorial-article .sidebar-card .card-body {
    padding: 1.5rem;
}

.editorial-article .sidebar-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.editorial-article .sidebar-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
}

.editorial-article .sidebar-card li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.editorial-article .sidebar-card li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.editorial-article .sidebar-card a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.editorial-article .sidebar-card a:hover {
    color: var(--primary-color);
}

/* =====================================================
   LINKS
   ===================================================== */

.editorial-article a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.editorial-article a:hover {
    color: #2a635c;
    text-decoration: underline;
}

/* =====================================================
   ARTICLE META & CATEGORY
   ===================================================== */

.editorial-article .article-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.editorial-article .article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.editorial-article .article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =====================================================
   RELATED ARTICLES
   ===================================================== */

.editorial-article .related-articles {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.editorial-article .related-articles h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
    border: none;
    padding: 0;
    color: var(--text-dark);
}

.editorial-article .related-articles ul {
    margin: 0;
    padding-left: 1.5rem;
    background: transparent;
    border: none;
}

.editorial-article .related-articles li {
    background: transparent;
    margin-bottom: 0.5rem;
}

/* =====================================================
   RESPONSIVE - Tablet
   ===================================================== */

@media (max-width: 992px) {
    .editorial-article {
        --editorial-padding-h: 1.5rem;
    }
    
    .editorial-article h1 {
        font-size: 2rem;
    }
    
    .editorial-article h2 {
        font-size: 1.5rem;
    }
    
    .editorial-article h3 {
        font-size: 1.25rem;
    }
    
    .editorial-article .cta-box {
        padding: 2rem;
    }
}

/* =====================================================
   RESPONSIVE - Mobile
   ===================================================== */

@media (max-width: 768px) {
    .editorial-article {
        --editorial-padding-v: 2rem;
        --editorial-padding-h: 1.25rem;
        --editorial-radius: 12px;
    }
    
    .editorial-article .article-content {
        padding: 1.5rem 0;
    }
    
    .editorial-article .article-content article {
        border-radius: var(--editorial-radius);
        margin: 0 0.5rem;
    }
    
    .editorial-article .article-wrapper {
        padding: 0 0.5rem;
    }
    
    .editorial-article .article-card {
        border-radius: var(--editorial-radius);
    }
    
    /* Sidebar vai para baixo no mobile */
    .editorial-article .sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .editorial-article h1 {
        font-size: 1.75rem;
    }
    
    .editorial-article h2 {
        font-size: 1.4rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .editorial-article h3 {
        font-size: 1.2rem;
    }
    
    .editorial-article p {
        font-size: 1rem;
        text-align: left;
    }
    
    .editorial-article .article-content article p {
        text-align: left !important;
        word-spacing: normal;
        text-justify: auto;
    }
    
    .editorial-article .article-content article .cta-box p {
        text-align: center !important;
    }
    
    .editorial-article ul,
    .editorial-article ol {
        padding: 1.25rem 1.25rem 1.25rem 2rem;
    }
    
    .editorial-article .info-box,
    .editorial-article .highlight-box,
    .editorial-article .success-box,
    .editorial-article .danger-box,
    .editorial-article .warning-box {
        padding: 1.25rem 1rem;
        margin: 1.5rem 0;
    }
    
    .editorial-article .code-block,
    .editorial-article pre {
        padding: 1.25rem;
        font-size: 0.85rem;
    }
    
    .editorial-article .cta-box {
        padding: 1.75rem 1.25rem;
        margin: 2rem 0;
    }
    
    .editorial-article .cta-box h3 {
        font-size: 1.35rem;
    }
    
    .editorial-article .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .editorial-article table {
        font-size: 0.85rem;
    }
    
    .editorial-article th,
    .editorial-article td {
        padding: 0.75rem;
    }
    
    .editorial-article .faq-item {
        padding: 1.25rem;
    }
    
    .editorial-article .faq-question {
        font-size: 1.05rem;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .editorial-article .article-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .editorial-article .cta-box {
        background: #f8f9fa !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
    }
}
