/* NutriAIT — overrides.css */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Letter-spacing: везде ноль ── */
*, *::before, *::after {
    letter-spacing: 0 !important;
}

/* ── Шрифт Inter везде — перекрываем все Raleway из main.css ── */
body,
h1, h2, h3, h4, h5, h6,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
header p,
p, a, ul, li, input, textarea, select, button, label,
#footer .copyright,
.post .title h2, .post .title h2 a,
.mini-post header h3, .mini-post header h3 a {
    font-family: 'Inter', sans-serif !important;
}

/* Сбрасываем uppercase и text-transform из main.css */
h1, h2, h3, h4, h5, h6,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
header p,
#footer .copyright {
    text-transform: none !important;
}

/* ── Хедер: длинные русские категории ── */
#header nav.links ul li a {
    font-size: 0.72em;
    white-space: nowrap;
}

/* ── SVG-бургер: центрирование по вертикали и горизонтали ── */
#header .main ul li.menu > a.menu-trigger {
    text-indent: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 4em;
    height: 3.5em;
    line-height: 1;
    color: #aaaaaa;
}
#header .main ul li.menu > a.menu-trigger::before {
    display: none !important;
}
a.menu-trigger svg {
    display: block;
    flex-shrink: 0;
}

/* ── Крестик закрытия меню: просто иконка, без рамки ── */
.menu-close {
    position: absolute;
    top: 1.25em;
    right: 1.25em;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin: 0;
    line-height: 0;
    display: block;
    opacity: 0.65;
    transition: opacity 0.2s;
    z-index: 10;
}
.menu-close:hover,
.menu-close:focus {
    opacity: 1;
    outline: none;
    box-shadow: none;
}

/* ── Карточка поста: убираем meta (дата/автор) ── */
.post header .meta,
.mini-post header time,
.mini-post header .author {
    display: none !important;
}

/* ── mini-post header ── */
.mini-post header h3 {
    font-size: 0.9em;
    margin: 0 0 0.5em 0;
    line-height: 1.4;
}
.mini-post header {
    padding-bottom: 0.5em;
    min-height: unset;
}

/* ── Иконки соцсетей ── */
#footer ul.icons,
#sidebar #footer ul.icons {
    display: none !important;
}

/* ── Дисклеймер ── */
.disclaimer {
    font-size: 0.75em;
    line-height: 1.6;
    opacity: 0.65;
    margin-bottom: 0.75em;
    font-style: italic;
}

/* ── Copyright ── */
p.copyright {
    font-size: 0.75em;
    opacity: 0.55;
}

/* ── Sidebar about blurb — кнопку скрываем ── */
.blurb .actions {
    display: none;
}

/* ── Поисковый элемент в nav.main — скрываем ── */
#header nav.main ul li.search {
    display: none;
}

/* ── Stats (теги) в footer поста — без иконок ── */
ul.stats li a.icon {
    display: none;
}

/* ── Анонс статьи (excerpt) между картинкой и кнопкой ── */
.post p.post-excerpt {
    margin: 1.25em 0 1.75em;
    font-size: 0.95em;
    line-height: 1.65;
    color: inherit;
    opacity: 0.85;
}

/* ── post-content: типографика и защита от переполнения ── */
.post-content {
    line-height: 1.75em;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.post-content * {
    max-width: 100%;
    box-sizing: border-box;
}
.post-content h2 {
    font-size: 1.4em;
    font-weight: 700;
    margin: 1.5em 0 0.5em;
}
.post-content h3 {
    font-size: 1.15em;
    font-weight: 700;
    margin: 1.25em 0 0.4em;
}
.post-content p {
    margin-bottom: 1em;
}
.post-content ul,
.post-content ol {
    list-style: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.post-content ol {
    list-style: decimal;
}
.post-content blockquote {
    border-left: 3px solid #f56a6a;
    padding: 0.5em 1em;
    margin: 1em 0;
    opacity: 0.8;
    font-style: italic;
}
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    display: block;
    overflow-x: auto;
}
.post-content th,
.post-content td {
    border: 1px solid #e0e0e0;
    padding: 0.5em 0.75em;
    text-align: left;
}
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em auto;
}
.post-content iframe,
.post-content video,
.post-content embed {
    max-width: 100%;
}

/* ── #main защита от горизонтального переполнения ── */
#main {
    overflow-x: hidden;
    min-width: 0;
}

/* ── Пустой список статей ── */
.no-posts {
    padding: 3em 0;
    text-align: center;
    opacity: 0.5;
    font-size: 1.1em;
}

/* ════════════════════════════════════════
   МОБИЛЬНЫЕ СТИЛИ (≤736px)
   ════════════════════════════════════════ */
@media screen and (max-width: 736px) {

    /* ── Хедер: выше, бургер по центру ── */
    #header {
        height: 4em !important;
        line-height: 4em !important;
    }
    #header .main ul li.menu > a.menu-trigger {
        height: 4em !important;
        width: 4em;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        float: none !important;
        text-indent: 0 !important;
    }
    #header .main ul li.menu > a.menu-trigger::before {
        display: none !important;
    }

    /* ── Карточки и статья: боковые отступы ── */

    /* Заголовок карточки и статьи */
    .post > header .title {
        text-align: left !important;
        padding-left: 1.5em !important;
        padding-right: 1.5em !important;
        box-sizing: border-box !important;
    }

    /* Анонс текста под картинкой */
    .post > p.post-excerpt {
        text-align: left !important;
        padding-left: 1.5em !important;
        padding-right: 1.5em !important;
        margin-top: 0.75em !important;
        box-sizing: border-box !important;
    }

    /* Кнопка «Читать далее» */
    .post > footer {
        padding-left: 1.5em !important;
        padding-right: 1.5em !important;
        box-sizing: border-box !important;
    }

    /* Тело статьи: добавляем padding поверх родительского */
    .post > div.post-content {
        padding-left: 1.5em !important;
        padding-right: 1.5em !important;
        box-sizing: border-box !important;
    }

    /* ── Меню: шрифт крупнее, контент ниже крестика ── */
    #menu ul.links li > a h3 {
        font-size: 1.0em !important;
        text-transform: none !important;
    }
    #menu > section:first-of-type,
    #menu > section {
        padding-top: 1em !important;
        margin-top: 3.5em !important;
    }
}

/* ── Логотип в шапке (заменяет текст site_title если загружен) ── */
#header h1 a .nutri-logo {
    display: inline-block;
    max-height: 56px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
}
#header h1 a .nutri-logo.logo-text {
    /* Текст-фолбэк уже стилизуется h1 a, ничего не делаем */
    max-height: none;
}
