/* ================================================================
   entry-content.css
   Типографика контента: статьи, портфолио, страницы.
   ================================================================ */

/* ── Базовый текст ───────────────────────────────────────────── */
.entry-content {
    color: var(--text);
    font-family: var(--text1-font-family);
    font-size: var(--text1-font-size);
    font-weight: var(--text1-font-weight);
    line-height: var(--text1-line-height);
}

.entry-content > * + * { margin-top: 32px; }

/* ── H1 ──────────────────────────────────────────────────────── */
.entry-content h1 {
    color: var(--active);
    font-family: var(--h1-stati-font-family);
    font-size: var(--h1-stati-font-size);
    font-weight: var(--h1-stati-font-weight);
    line-height: var(--h1-stati-line-height);
}

/* ── H2 ──────────────────────────────────────────────────────── */
.entry-content h2 {
    color: var(--active);
    font-family: var(--h3-font-family);
    font-size: var(--h3-font-size);
    font-weight: var(--h3-font-weight);
    line-height: var(--h3-line-height);
    margin-top: 64px;
}
.entry-content h2 + * { margin-top: 24px; }

/* ── H3 ──────────────────────────────────────────────────────── */
.entry-content h3 {
    color: var(--active);
    font-family: var(--h4-font-family);
    font-size: var(--h4-font-size);
    font-weight: var(--h4-font-weight);
    line-height: var(--h4-line-height);
    margin-top: 48px;
}
.entry-content h3 + * { margin-top: 20px; }

.entry-content h4{
   color: #7782B3;

font-family: Unbounded;
font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: normal; 
}

.entry-content h4 + * { margin-top: 26px; }


/* ── Разделитель ─────────────────────────────────────────────── */
.entry-content hr {
    border: none;
    background: var(--white);
    width: 75%;
    height: 1px;
    margin-top: 48px;
}

/* ── Ссылки ──────────────────────────────────────────────────── */
.entry-content a {
    color: var(--active);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
.entry-content a:hover { color: var(--white); }

/* ── Код ─────────────────────────────────────────────────────── */
.entry-content code {
    font-family: monospace;
    font-size: 0.875em;
    background: rgba(146, 152, 177, 0.1);
    color: var(--active);
    padding: 2px 6px;
    border-radius: 3px;
}
.entry-content pre {
    background: rgba(146, 152, 177, 0.08);
    border: 1px solid rgba(146, 152, 177, 0.2);
    border-radius: 6px;
    padding: 24px;
    overflow-x: auto;
}
.entry-content pre code {
    background: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ================================================================
   МАРКЕРОВАННЫЙ СПИСОК (ul)
   ================================================================ */
.entry-content ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    padding: 0;
}

.entry-content ul li {
    display: flex;
    flex-direction: row;
    gap: 11px;
    align-items: flex-start;
    color: var(--text);
    font-family: var(--text2-font-family);
    font-size: var(--text2-font-size);
    font-weight: var(--text2-font-weight);
    line-height: 140%;
}

.entry-content ul li::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 14px;
    height: 1px;
    margin-top: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='1' viewBox='0 0 14 1' fill='none'%3E%3Cpath d='M13.3333 0.3125C13.3333 0.39538 13.2748 0.474866 13.1706 0.533471C13.0664 0.592076 12.9251 0.625 12.7778 0.625H0.555556C0.408213 0.625 0.266905 0.592076 0.162719 0.533471C0.0585317 0.474866 0 0.39538 0 0.3125C0 0.22962 0.0585317 0.150134 0.162719 0.0915292C0.266905 0.0329241 0.408213 0 0.555556 0H12.7778C12.9251 0 13.0664 0.0329241 13.1706 0.0915292C13.2748 0.150134 13.3333 0.22962 13.3333 0.3125Z' fill='%237782B3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
}

/* ================================================================
   НУМЕРОВАННЫЙ СПИСОК (ol) — шаги с номером и заголовком
   ================================================================ */
.entry-content ol {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    counter-reset: ol-step;
}

.entry-content ol li {
    border-top: 1px solid rgba(26, 23, 20, 0.07);
    border-bottom: 1px solid rgba(26, 23, 20, 0.07);
    margin-top: -1px; /* схлопываем двойные границы */
    padding: 22px 0 8px;
    display: flex;
    flex-direction: row;
    gap: 18px;
    align-items: flex-start;
    counter-increment: ol-step;
}

/* Номер */
.entry-content ol li::before {
    content: counter(ol-step, decimal-leading-zero);
    flex-shrink: 0;
    width: 48px;
    border-top: 1px solid var(--active);
    padding-top: 6.4px;
    color: var(--active);
    font-family: var(--podpisi1-font-family);
    font-size: var(--podpisi1-font-size);
    line-height: var(--podpisi1-line-height);
    font-weight: var(--podpisi1-font-weight);
}

/* Контент шага (flex-колонка внутри li).
   В редакторе: первый абзац = заголовок (жирный), второй = текст */
.entry-content ol li > p,
.entry-content ol li > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.entry-content ol li strong,
.entry-content ol li b {
    color: var(--active);
    font-family: var(--h4-font-family);
    font-size: 23px;
    line-height: 120%;
    font-weight: 400;
    display: block;
}

/* ================================================================
   ЦИТАТА (blockquote)
   ================================================================ */
.entry-content blockquote {
    background: #161820;
    padding: 0 36px 44px;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 32px 0;
}



/* Декоративная открывающая кавычка */
.entry-content blockquote::before {
    content: '“';
    display: block;
    color: var(--active);
    font-family: "Cormorant Garamond", serif;
    font-size: 80px;
    line-height: 27%;
    font-weight: 300;
    margin-top:80px;
    margin-bottom: 0;
}

.entry-content blockquote p {
    color: var(--text);
    font-family: "Onest", sans-serif;
    font-size: 20px;
    line-height: 32px;
    font-weight: 300;
    margin: 0 0 17px;
}

.entry-content blockquote cite,
.entry-content blockquote footer {
    color: #9b9389;
    font-family: var(--podpisi1-font-family);
    font-size: var(--podpisi1-font-size);
    line-height: var(--podpisi1-line-height);
    font-weight: var(--podpisi1-font-weight);
    font-style: normal;
    display: block;
}

/* ================================================================
   КАРТИНКА С ПОДПИСЬЮ (figure)
   ================================================================ */
.entry-content figure {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.entry-content figure img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-content .wp-caption {
    width: 100% !important;
    max-width: 100%;
}
.entry-content p img,
.entry-content figure, 
.entry-content figure img,
.entry-content .wp-caption img,
.entry-content img.alignnone,
.entry-content img.aligncenter,
.entry-content img.size-full,
.entry-content img.size-large {
    width: 100% !important;
    height: auto !important;
}

.entry-content img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
}



/* Подпись: «Рис. 1» + текст в сетке */
.entry-content figcaption {
    border-top: 1px solid rgba(26, 23, 20, 0.1);
    padding-top: 14.4px;
    display: grid;
    grid-template-columns: 35.2px 1fr;
    column-gap: 12.8px;
    color: #9b9389;
    font-family: var(--podpisi1-font-family);
    font-size: var(--podpisi1-font-size);
    line-height: var(--podpisi1-line-height);
    font-weight: var(--podpisi1-font-weight);
}

/* Номер рисунка — первый <span> или сам текст до «пробела» недостижим,
   поэтому используем псевдоэлемент с авто-счётчиком */
.entry-content { counter-reset: fig-counter; }

.entry-content figure { counter-increment: fig-counter; }

.entry-content figcaption::before {
    content: 'Рис.\00A0' counter(fig-counter);
    color: var(--active);
    font-family: var(--podpisi1-font-family);
    font-size: var(--podpisi1-font-size);
    line-height: var(--podpisi1-line-height);
    font-weight: var(--podpisi1-font-weight);
    white-space: nowrap;
}

/* ================================================================
   АДАПТИВ
   ================================================================ */
@media (max-width: 1200px) {
    .entry-content h2 { font-size: 32px; }
    .entry-content h3 { font-size: 24px; }
    .entry-content ol li strong { font-size: 20px; }
}

@media (max-width: 768px) {
    .entry-content { font-size: 16px; }
    .entry-content h1 { font-size: 36px; }
    .entry-content h2 { font-size: 28px; margin-top: 48px; }
    .entry-content h3 { font-size: 22px; margin-top: 36px; }
    .entry-content ul li { font-size: 16px; }
    .entry-content ol li { gap: 12px; }
    .entry-content ol li::before { width: 36px; }
    .entry-content ol li strong { font-size: 18px; }
    .entry-content blockquote { padding: 0 24px 32px; }
    .entry-content blockquote p { font-size: 18px; line-height: 28px; }
    .entry-content figcaption { grid-template-columns: 1fr; }
    .entry-content figcaption::before { display: none; }
}

@media (max-width: 480px) {
    .entry-content h2 { font-size: 24px; }
    .entry-content h3 { font-size: 20px; }
    .entry-content ol li { flex-direction: column; gap: 8px; }
    .entry-content ol li::before { width: auto; border-top: none; padding-top: 0; }
}