/* =====================================================
   ТЕМА: ma-theme-core-1967
   ФАЙЛ: main.css
   НАЗНАЧЕНИЕ:
   - reset
   - типографика
   - контейнер
   - header
   - layout
   - footer
===================================================== */


/* =====================================================
   1. RESET
===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    overflow-y: scroll; /* фикс скачка страницы */
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 16px;
    color: #111;
    background: #fff;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: #1e3a8a;
    text-decoration: none;
}

a:hover {
    opacity: 0.85;
}


/* =====================================================
   2. ТИПОГРАФИКА
===================================================== */

h1,
h2,
h3 {
    margin: 0 0 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 1.6rem;
}

h2 {
    font-size: 1.3rem;
}

p {
    margin: 0 0 1rem;
}


/* =====================================================
   3. КОНТЕЙНЕР
   Единая внешняя сетка сайта
===================================================== */

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}


/* =====================================================
   4. HEADER
   Header должен жить в той же сетке, что и сайт
===================================================== */

.site-header {
    position: relative;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 0; /* воздух сверху/снизу */
}

/* Внутренняя линия шапки */
.header-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 60px;
    gap: 20px; /* безопасный зазор между блоками */
    padding: 0;
}

/* Левый блок: логотип + текст */
.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;

    /* Важно: не проценты, а контролируемая ширина */
    flex: 0 1 300px;
    min-width: 0; /* даёт ellipsis работать корректно */
    max-width: 300px;
}

/* Текст брендинга */
.site-branding-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* важно для обрезки title */
    max-width: 100%;
}

/* Название сайта */
.site-title {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ссылка в title */
.site-title a {
    color: inherit;
    text-decoration: none;
}

/* Описание сайта */
.site-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
}

/* Правый блок: навигация */
.main-navigation {
    display: flex;
    align-items: center;
 /* justify-content: flex-end; */
    flex: 0 0 auto;
    min-width: 0;
    margin-left: 10px; /* Двигает меню в ДЕСКТОП */
}


/* =====================================================
   5. ОСНОВНОЙ LAYOUT
   Контент и sidebar в одной системе
===================================================== */

.site-wrapper {
    width: 100%;
}

/* Мобильная версия */
main,
aside {
    width: 100%;
}

/* Десктопная сетка */
@media (min-width: 54rem) {
    .site-wrapper {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
    }

    /* Основная колонка */
    main {
        flex: 0 0 69%;
        max-width: 69%;
    }

    /* Боковая колонка */
    aside {
        flex: 0 0 27%;
        max-width: 27%;
    }
}


/* =====================================================
   6. АДАПТИВ ДЛЯ HEADER
   На мобилке брендинг получает больше свободы
===================================================== */
@media (max-width: 767px) {

    .header-content-wrapper {
        gap: 12px;
    }

    /* ---------------------------------------------
       БРЕНДИНГ — БЕЗ FLEX
       ---------------------------------------------
       Убираем любое участие в flex-расчётах
    --------------------------------------------- */
    .site-branding {
        flex: none; /* 🔥 ключ */
    }

    /* ---------------------------------------------
       МЕНЮ ВСЕГДА СПРАВА
    --------------------------------------------- */
    .main-navigation {
        margin-left: auto;
    }

    .site-title {
        font-size: 17px;
        word-break: break-word;
    }

    .site-description {
        font-size: 13px;
    }
}
/* =====================================================
   7. FOOTER
===================================================== */
.site-footer {
    padding: 1rem 0;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
/*  Конец FOOTER
===================================================== */


.pmv2-post-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pmv2-post-item {
    padding: 10px;
    border: 1px solid #ddd;
}

@media (max-width: 768px) {
    .pmv2-post-list {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   8. MOBILE HEADER HIDE ON SCROLL
   Шапка уезжает вверх при скролле вниз и возвращается при скролле вверх
===================================================== */
@media (max-width: 767px) {

    body {
        padding-top: 80px;
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(0);
        transition: transform 0.25s ease;
        border-bottom: 1px solid rgb(12 12 12 / 20%);
        will-change: transform;
    }

    body.header-hidden .site-header {
        transform: translateY(-100%);
    }

    body.modal-open .site-header {
        transform: translateY(0);
    }

    body.admin-bar .site-header {
        top: 46px;
    }

    body.admin-bar {
        padding-top: 126px;
    }
}


/* ============================
   PMV2 SEO ACCORDION
   ========================== */
.pmv2-seo-accordion {
	--tab-height: 30px;
	position: relative;
	margin-top: 20px;
	margin-bottom: 50px;
	padding: 14px 16px calc(var(--tab-height) + 12px);
	background: #fff;
	border: 1px solid #d7d7d7;
	border-radius: 10px;
	overflow: visible;
}

/* Скрываем checkbox */
.pmv2-seo-accordion__check {
	display: none;
}

/* Контент аккордеона */
.pmv2-seo-accordion__content {
	font-size: 15px;
	line-height: 1.6;
	color: #333;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	position: relative;
}

/* Убираем лишние отступы */
.pmv2-seo-accordion__content p:first-child {
	margin-top: 0;
}

.pmv2-seo-accordion__content p:last-child {
	margin-bottom: 0;
}

/* Градиент в закрытом состоянии */
.pmv2-seo-accordion__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 35px;
	background: linear-gradient(
		to bottom,
		rgba(255,255,255,0),
		#fff 90%
	);
}

/* Открытый accordion */
.pmv2-seo-accordion__check:checked
~ .pmv2-seo-accordion__content {
	display: block;
}

.pmv2-seo-accordion__check:checked
~ .pmv2-seo-accordion__content::after {

	display: none;
}

/* Нижний ярлык */
.pmv2-seo-accordion__tab {
	position: absolute;
	left: 50%;
	bottom: calc(-1 * var(--tab-height));
	transform: translateX(-50%);
	height: var(--tab-height);
	padding: 0 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #2f6fed;
	border: 1px solid #d7d7d7;
	border-top: none;
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
	cursor: pointer;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	z-index: 2;
}

/* Линии слева и справа */
.pmv2-seo-accordion__tab::before,
.pmv2-seo-accordion__tab::after {
	content: "";
	position: absolute;
	top: 0;
	height: 1px;
	background: #d7d7d7;
}

.pmv2-seo-accordion__tab::before {
	right: 100%;
	left: -16px;
}

.pmv2-seo-accordion__tab::after {
	left: 100%;
	right: -16px;
}

/* Переключение текста */
.pmv2-seo-accordion__less {
	display: none;
}

.pmv2-seo-accordion__check:checked
~ .pmv2-seo-accordion__tab
.pmv2-seo-accordion__more {
	display: none;
}

.pmv2-seo-accordion__check:checked
~ .pmv2-seo-accordion__tab
.pmv2-seo-accordion__less {
	display: inline;
}

/* Mobile */
@media (max-width: 768px) {

	.pmv2-seo-accordion__content {
		font-size: 14px;
		line-height: 1.5;
	}

	.pmv2-seo-accordion__tab {
		font-size: 13px;
	}
}
/* КОНЕЦ PMV2 SEO ACCORDION
   ============================ */
   
/* ============================
   МЕНЮ на странице ИМЕНА
   ========================== */
/* Обёртка двух колонок */
.names-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

/* Колонка */
.names-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Заголовки */
.names-column h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

/* Список */
.names-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ССЫЛКА-КНОПКА */
.names-list li a {
  display: block;
  padding: 10px 8px;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #222;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.05s ease;
}

/* Hover (десктоп) */
.names-list li a:hover {
  background-color: #f5f5f5;
  border-color: #d0d0d0;
}

/* Active (тап на мобилке) */
.names-list li a:active {
  background-color: #ededed;
  border-color: #bcbcbc;
  transform: translateY(1px);
}

/* Фокус с клавиатуры */
.names-list li a:focus-visible {
  outline: none;
  border-color: #999;
}
/* КОНЕЦ МЕНЮ на странице ИМЕНА
   ============================ */
   
   
   
   
   
   
   
   
   
/* H1 для HUB СТРАНИЦ
 * ===================== */
.site-main > h1 {
	font-size: 42px;
	line-height: 1.2;
	margin: 5px 0 5px 0;
  /* margin-bottom: 5px; */
}

/* Mobile */

@media (max-width: 768px) {

	.site-main > h1 {
		font-size: 20px;
		line-height: 1.25;
	}
}
/*  КОНЕЦ H1 для HUB СТРАНИЦ
 * ======================= */   
   
   
   
   
   
   
   
   