/* ========== 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 .page-container {
    max-width: 860px;
}

.standard-page__header {
    text-align: center;
    margin-bottom: 36px;
}

.standard-page__back {
    display: inline-block;
    color: #1e7554;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
    transition: color 0.15s;
}

.standard-page__back:hover {
    color: #16654a;
}

.standard-page__divider {
    width: 60px;
    height: 3px;
    background-color: #1e7554;
    margin: 16px auto 0;
    border-radius: 2px;
}

.standard-page__body {
    background: white;
    border-radius: 10px;
    padding: 40px 48px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.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 ========== */
.index-subtitle {
    color: #1e7554;
    font-size: 20px;
    margin-bottom: 8px;
    text-align: center;
}

.intro-content {
    color: #555;
    font-size: 16px;
    text-align: center;
    margin-bottom: 40px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.post-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid #1e7554;
    display: flex;
    flex-direction: column;
    height: 380px;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.post-card__content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card__title {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-card__title a {
    color: #1e7554;
    text-decoration: none;
}

.post-card__title a:hover {
    color: #16654a;
    text-decoration: underline;
}

.post-card__preview {
    position: relative;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #c8ddd5 transparent;
}

.post-card__preview::-webkit-scrollbar {
    width: 4px;
}

.post-card__preview::-webkit-scrollbar-track {
    background: transparent;
}

.post-card__preview::-webkit-scrollbar-thumb {
    background-color: #c8ddd5;
    border-radius: 4px;
}

.post-card__preview h3 {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.post-card__preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 8px auto;
}

.post-card__preview .rich-text p:empty {
    display: none;
}

.post-card__preview .rich-text p {
    margin-bottom: 8px;
}

.post-card__link {
    display: inline-block;
    color: #1e7554;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
    margin-top: auto;
}

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

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

    .page-container h1 {
        font-size: 24px;
    }
    
    .standard-page__body {
        padding: 24px 20px;
    }

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

    .post-card {
        height: 340px;
    }


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