/**
 * Post Layout CSS - Renderização de Posts com Layout Avançado
 * Suporta imagens flutuantes, colunas e layouts complexos
 * Blog Tec Perifa - 2026
 * 
 * SISTEMA DE NAMESPACES (CSS Architecture v2.0):
 * - .blog-post*        → Container e elementos do post PÚBLICO
 * - .blog-post__*      → Elementos internos (BEM notation)
 * - .post-* (DEPRECATED) → Manter para compatibilidade
 * 
 * IMPORTANTE: Este CSS é para o BLOG PÚBLICO, não usar no admin!
 * Classes do admin devem usar prefixo .admin-*
 */

/* Container principal do post - Namespaced para BLOG PÚBLICO */
.blog-post,
.blog-post__content,
.materia .post-content,
.post-content { /* DEPRECATED: usar .blog-post */
    font-size: 16px;
    line-height: 1.8;
    color: #2a2a2a;
    font-family: Georgia, 'Times New Roman', serif;
}

/* Imagem flutuante à esquerda */
.materia .post-content .img-float-left,
.post-content .img-float-left,
.materia .post-content img[style*="float: left"],
.post-content img[style*="float: left"] {
    float: left !important;
    margin: 0 30px 20px 0 !important;
    max-width: 45% !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Imagem flutuante à direita */
.materia .post-content .img-float-right,
.post-content .img-float-right,
.materia .post-content img[style*="float: right"],
.post-content img[style*="float: right"] {
    float: right !important;
    margin: 0 0 20px 30px !important;
    max-width: 45% !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Imagem centralizada */
.materia .post-content .img-center,
.post-content .img-center {
    display: block !important;
    margin: 30px auto !important;
    max-width: 80% !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Imagem largura total */
.materia .post-content .img-full-width,
.post-content .img-full-width,
.materia .post-content img[style*="width: 100%"],
.post-content img[style*="width: 100%"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 24px 0 !important;
    border-radius: 4px;
}

/* Texto em colunas */
.materia .post-content .text-columns,
.post-content .text-columns,
.materia .post-content p[style*="columns"],
.post-content p[style*="columns"] {
    columns: 2 !important;
    column-gap: 40px !important;
    text-align: justify !important;
    margin: 20px 0 !important;
}

/* Drop cap - Primeira letra grande (estilo jornal) */
.materia .post-content p:first-of-type::first-letter,
.post-content p:first-of-type::first-letter {
    font-size: 3.5em;
    font-weight: 700;
    line-height: 0.8;
    float: left;
    margin: 0.1em 0.1em 0 0;
    color: #1a1a1a;
    font-family: Georgia, serif;
}

/* Parágrafos - Espaçamento adequado */
.materia .post-content p,
.post-content p {
    margin: 0 0 1.2em 0;
    text-align: justify;
}

/* Clearfix para elementos flutuantes */
.materia .post-content::after,
.post-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsividade - Tablet */
@media (max-width: 1024px) {
    .materia .post-content .img-float-left,
    .post-content .img-float-left,
    .materia .post-content img[style*="float: left"],
    .post-content img[style*="float: left"] {
        max-width: 50% !important;
        margin: 0 20px 15px 0 !important;
    }
    
    .materia .post-content .img-float-right,
    .post-content .img-float-right,
    .materia .post-content img[style*="float: right"],
    .post-content img[style*="float: right"] {
        max-width: 50% !important;
        margin: 0 0 15px 20px !important;
    }
    
    .materia .post-content .text-columns,
    .post-content .text-columns {
        column-gap: 30px !important;
    }
}

/* Responsividade - Mobile */
@media (max-width: 768px) {
    /* Em mobile, imagens flutuantes ficam full width */
    .materia .post-content .img-float-left,
    .post-content .img-float-left,
    .materia .post-content .img-float-right,
    .post-content .img-float-right,
    .materia .post-content img[style*="float"],
    .post-content img[style*="float"] {
        float: none !important;
        display: block !important;
        margin: 20px auto !important;
        max-width: 100% !important;
    }
    
    /* Colunas viram coluna única em mobile */
    .materia .post-content .text-columns,
    .post-content .text-columns,
    .materia .post-content p[style*="columns"],
    .post-content p[style*="columns"] {
        columns: 1 !important;
        column-gap: 0 !important;
    }
    
    /* Drop cap menor em mobile */
    .materia .post-content p:first-of-type::first-letter,
    .post-content p:first-of-type::first-letter {
        font-size: 2.8em;
    }
}

/* Estilo para quebra de página/seção */
.post-content hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 40px 0;
    position: relative;
}

.post-content hr::after {
    content: '• • •';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 0 15px;
    color: #999999;
    font-size: 14px;
    letter-spacing: 8px;
}

