/* ========== ESTILOS GERAIS ========== */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: blanchedalmond;
    min-height: calc(100vh - 200px);
}

.page-container h1 {
    color: #1e7554;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

/* Clearfix */
.rich-text::after,
.post-body::after {
    content: "";
    display: table;
    clear: both;
}

/* ========== STANDARD PAGE ========== */
.template-standardpage .rich-text {
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.template-standardpage .rich-text h2 {
    color: #1e7554;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
}

.template-standardpage .rich-text h3 {
    color: #16654a;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 12px;
    text-align: left;
}

.template-standardpage .rich-text p:not(:empty) {
    margin-bottom: 15px;
    line-height: 1.8;
    text-align: justify;
}

.template-standardpage .rich-text p:empty {
    display: none;
}

.template-standardpage .rich-text ul,
.template-standardpage .rich-text ol {
    margin: 15px 0;
    padding-left: 30px;
}

.template-standardpage .rich-text li {
    margin-bottom: 8px;
}

.template-standardpage .rich-text > div {
    line-height: 0 !important;
    text-align: center !important;
}

/* Restaura para parágrafos */
.template-standardpage .rich-text > div > p:not(:empty) {
    line-height: 1.8 !important;
    text-align: justify !important;
}
.template-standardpage .rich-text > div > p:empty {
    display: none !important;
}

/* Primeira imagem - Standard Page */
.template-standardpage img.richtext-image.full-width:first-of-type {
    width: 100% !important;
    max-width: 700px !important;
    height: auto !important;
    display: block !important;
    margin: 20px auto !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    float: none !important;
}

/* Secundárias - Standard Page */
.template-standardpage img.richtext-image.full-width:not(:first-of-type) {
    width: 250px !important;
    height: 450px !important;
    max-width: 250px !important;
    object-fit: cover;
    display: inline-block !important;
    margin: 15px !important;
    vertical-align: top;
    float: none !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.template-standardpage .image-container {
    line-height: 0 !important;
    text-align: center !important;
}

.template-standardpage .image-container p:empty {
    display: none !important;
}

.template-standardpage .image-container p:not(:empty) {
    line-height: 1.8 !important;
    text-align: justify !important;
}

/* ========== INDEX PAGE ========== */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.post-preview {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-preview h2 {
    color: #1e7554;
    font-size: 24px;
    margin-bottom: 15px;
    text-align: left;
}

.post-preview h2 a {
    color: inherit;
    text-decoration: none;
}

.post-preview h2 a:hover {
    color: #16654a;
}

.post-body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #333;
    text-align: center;
    line-height: 0;
}

.post-body p:not(:empty) {
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.post-body p:empty {
    display: none;
}

/* Primeira imagem - Index Page */
.post-body img.richtext-image:first-of-type {
    max-width: 400px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 20px auto !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    float: none !important;
}

/* Secundárias - Index Page */
.post-body img.richtext-image:not(:first-of-type) {
    width: 180px !important;
    height: 380px !important;
    max-width: 180px !important;
    object-fit: cover;
    display: inline-block !important;
    margin: 12px !important;
    vertical-align: top;
    float: none !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .page-container {
        padding: 20px 15px;
    }

    .page-container h1 {
        font-size: 24px;
    }
    
    .post-preview h2,
    .template-standardpage .rich-text h2 {
        font-size: 20px;
    }
    
    .template-standardpage .rich-text h3 {
        font-size: 18px;
    }

    .post-body img.richtext-image:not(:first-of-type) {
        width: 140px !important;
        height: 140px !important;
    }
    
    .template-standardpage img.richtext-image.full-width:not(:first-of-type) {
        width: 180px !important;
        height: 320px !important;
    }
}