article figcaption { color: #909294; margin-top: 0.5rem; } article figure { background: #f9f9f9; border-radius: 4px; margin-bottom: 18px; } /* Стандартный формат - обрезка с заполнением */ article IMG { width: 100%; height: auto; object-fit: cover; } /* Портретный формат для постов из указанных рубрик */ body.image-portrait article figure { display: flex; flex-direction: column; align-items: center; padding: 20px; } body.image-portrait article IMG { width: auto; max-width: 100%; height: auto; max-height: 600px; object-fit: contain; } .post-title { padding-bottom: 18px; } p { font-size: 1.125rem; line-height: 1.65; margin: 0 0 1em; max-width: 80ch; } /* Мобильные устройства */ @media (max-width: 768px) { body.image-portrait article IMG { max-height: 500px; } }