/* === Удаляем t450 (сломанное гамбургер-меню с английскими ссылками) === */
.t450,
.t450__burger_container {
  display: none !important;
}

/* === Мобильный гамбургер и оверлей — скрыты по умолчанию на десктопе === */
#nav-hamburger-btn {
  display: none !important;
}
#mobile-nav-overlay {
  display: none !important;
}

/* === Фиксированный подвал — переопределяем на relative === */
#rec1233618146 .t396__artboard {
  position: relative !important;
  bottom: auto !important;
}

/* === Мобильная версия (<=640px) === */
@media screen and (max-width: 640px) {
  /* Скрываем горизонтальные ссылки nav в шапке */
  .tn-elem__12336183311755874100138,
  .tn-elem__12336183311755874100136,
  .tn-elem__12336183311755874100133,
  .tn-elem__12336183311755874100129,
  .tn-elem__12336183311755874100124 {
    display: none !important;
  }

  /* Золотой круг гамбургер */
  #nav-hamburger-btn {
    display: flex !important;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #D6BA69;
    border-radius: 50%;
    z-index: 99999;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.35);
    transition: transform 0.2s ease;
    padding: 0;
  }
  #nav-hamburger-btn:active { transform: scale(0.92); }
  #nav-hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  #nav-hamburger-btn.nav-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  #nav-hamburger-btn.nav-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  #nav-hamburger-btn.nav-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* Оверлей мобильного меню */
  #mobile-nav-overlay.nav-open {
    display: flex !important;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #5c1f7d 0%, #3a1050 100%);
    z-index: 99998;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 35px;
  }
  #mobile-nav-overlay a {
    color: #ffffff;
    font-size: 22px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 1px;
  }
  #mobile-nav-overlay a:active { color: #D6BA69; }
}

/* ============================================================
   ШРИФТЫ: Forum (заголовки), Cormorant Garamond (текст)
   Улучшение меню и мобильной адаптации
   ============================================================ */

/* Переопределяем шрифты везде где остался Playfair Display */
.t-title,
.t-name,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Forum', serif !important;
  letter-spacing: 0.02em;
}

.t-text,
.t-descr,
.t-records p,
#allrecords p {
  font-family: 'Cormorant Garamond', serif !important;
  line-height: 1.7;
}

.t-descr_xl {
  font-size: 22px !important;
  line-height: 1.6 !important;
}

.t-text_md {
  font-size: 19px !important;
}

/* Кнопки */
.t-btn,
.t-btnflex,
.t-btnflex__text {
  font-family: 'Forum', serif !important;
  letter-spacing: 0.08em;
}

/* Меню */
.t-menu__link-item,
.t-menu__link-item a,
.tmenu-mobile .t-menu__link-item,
.tmenu-mobile a {
  font-family: 'Forum', serif !important;
  letter-spacing: 0em;
  font-size: 12px !important;
}

.t-menu__link-item a {
  text-decoration: none !important;
  transition: opacity 0.25s ease !important;
}

.t-menu__link-item a:hover {
  opacity: 0.65;
}

/* Мобильная адаптация */
@media screen and (max-width: 980px) {
  .tmenu-mobile .t-menu__link-item a {
    font-size: 16px !important;
    letter-spacing: 0.05em;
    line-height: 1.8 !important;
  }
}

@media screen and (max-width: 768px) {
  .t-title {
    font-size: clamp(28px, 8vw, 52px) !important;
    line-height: 1.2 !important;
  }

  .t-name {
    font-size: clamp(18px, 5vw, 28px) !important;
  }

  .t-descr_xl {
    font-size: 18px !important;
    line-height: 1.65 !important;
  }

  .t-text_md {
    font-size: 17px !important;
    line-height: 1.65 !important;
  }

  .t-btn,
  .t-btnflex {
    font-size: 14px !important;
    letter-spacing: 0.06em;
  }
}

@media screen and (max-width: 480px) {
  .t-title {
    font-size: clamp(24px, 9vw, 40px) !important;
  }

  .t-descr {
    font-size: 16px !important;
  }

  .t-text {
    font-size: 16px !important;
  }
}

/* Плавное отображение шрифтов */
#allrecords,
.t-records {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   МЕНЮ — одна строка, по центру, на всю ширину, без скруглений
   ============================================================ */

/* Блок меню — прижать к верху, убрать скругления */
.t-rec[data-record-type="96"],
.t-rec[data-record-type="96"] > div,
.t-menu-base {
  border-radius: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Контейнер — на всю ширину страницы */
.t-menu-base__maincontainer {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 24px !important;
  align-items: center !important;
  min-height: 56px !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

/* Левая часть (навигация) — растянуть, центрировать */
.t-menu-base__leftwrapper {
  flex: 1 1 auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

/* UL-список — одна строка, по центру */
.t-menu-base__list.t-menu__list {
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
}

/* Каждый LI-пункт */
.t-menu-base__list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  padding: 0 !important;
}

/* Ссылки внутри пунктов — крупнее, Forum, hover-пилюля */
.t-menu-base__list-item a {
  font-family: 'Forum', serif !important;
  font-size: 14px !important;
  letter-spacing: 0.05em !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  border: 1.5px solid transparent !important;
  border-radius: 20px !important;
  padding: 5px 13px !important;
  transition: border-color 0.22s ease !important;
  display: inline-block !important;
  line-height: 1.3 !important;
}

/* Hover — обводка-пилюля */
.t-menu-base__list-item a:hover {
  border-color: rgba(255,255,255,0.7) !important;
  opacity: 1 !important;
}

/* Правый блок (лупа + Контакты) — выровнять */
.t-menu-base__rightwrapper {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  align-self: center !important;
  padding: 0 !important;
}

.t-menu-base__additionalwrapper {
  display: flex !important;
  align-items: center !important;
}

/* Убрать верхние отступы у самого блока-записи */
.t-rec_pt_0,
.t-rec_pt_30,
.t-rec_pt_60 {
  /* только для блока меню — переопределяем в .t-menu-base */
}

.t-menu-base.t-rec_pt_60,
.t-menu-base.t-rec_pt_30 {
  padding-top: 0 !important;
}

/* Меню — убрать верхний отступ 60px и скругления блока */
.t-rec[data-record-type="1272"] {
  padding-top: 0 !important;
  margin-top: 0 !important;
  border-radius: 0 !important;
}

/* Убрать скругление у фона меню */
.t-rec[data-record-type="1272"] > div,
.t-menu-base__bg {
  border-radius: 0 !important;
}



/* === ФИНАЛЬНЫЙ ФИX: убрать 5px зазор у меню === */
/* Максимально специфичный селектор для перебивки Tilda */
html body #allrecords .t-rec .t-menu-base,
html body .t-records .t-rec .t-menu-base,
.t-menu-base {
  margin-top: 0 !important;
  margin: 0 !important;
  top: 0 !important;
}

/* Убрать скругления у фонового контейнера меню */
html body #allrecords .t-menu-base__maincontainer,
.t-menu-base__maincontainer {
  border-radius: 0 !important;
  margin: 0 !important;
}


/* ============================================================
   МОБИЛЬНЫЕ ИСПРАВЛЕНИЯ — финальная версия
   ============================================================ */

/* === 1. Мобильная верхняя плашка — название сайта по центру + бургер === */
@media screen and (max-width: 980px) {
  /* Контейнер плашки */
  .tmenu-mobile__container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    min-height: 60px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Название сайта посередине плашки */
  .tmenu-mobile__container::after {
    content: '☰  Меню';
    font-family: 'Forum', serif !important;
    font-size: 13px !important;
    letter-spacing: 0.04em;
    color: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    pointer-events: none;
  }
}

/* === 2. Открытое мобильное меню — вертикально, по центру === */
@media screen and (max-width: 980px) {
  /* Когда меню открыто — главный контейнер становится колонкой */
  .t-menu-base__maincontainer {
    flex-direction: column !important;
    align-items: center !important;
    padding: 20px 20px 30px !important;
    min-height: 60px !important;
  }

  /* Левый блок — nav ссылки, по центру */
  .t-menu-base__leftwrapper {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Список пунктов — вертикально, по центру */
  .t-menu-base__list.t-menu__list {
    flex-direction: column !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }

  /* Каждый пункт — авто ширина */
  .t-menu-base__list-item {
    width: auto !important;
    text-align: center !important;
  }

  .t-menu-base__list-item a {
    font-size: 17px !important;
    padding: 6px 20px !important;
    letter-spacing: 0.04em !important;
  }

  /* Правый блок — Контакты по центру, снизу */
  .t-menu-base__rightwrapper {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 20px !important;
    flex-direction: row !important;
    gap: 16px !important;
  }

  .t-menu-base__additionalwrapper {
    justify-content: center !important;
  }

  .t-menu-base__buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Иконка лупы — по центру */
  .t-menuwidgeticons__wrapper {
    justify-content: center !important;
  }
}

/* === 3. Контент не прячется под фиксированную плашку === */
@media screen and (max-width: 980px) {
  .t-records .t-rec:first-child,
  #allrecords .t-rec:first-child {
    margin-top: 60px !important;
  }
}

/* === 4. Текст — читабельность: отступы между абзацами === */
.t-text p,
.t-descr p {
  margin-bottom: 0.9em !important;
  line-height: 1.8 !important;
}

.t-text p:first-child {
  font-size: 19px !important;
  line-height: 1.8 !important;
}


/* === ТЕКСТ — визуальная иерархия, не сплошная стена === */

/* Все абзацы — хороший интерлиньяж */
.t-text p,
.t-descr p {
  line-height: 1.85 !important;
  margin-bottom: 1.1em !important;
}

/* Первый абзац — акцентный, чуть крупнее */
.t-text_md p:first-of-type {
  font-size: 20px !important;
  line-height: 1.8 !important;
  font-weight: 400 !important;
  margin-bottom: 1.4em !important;
}

/* Второй абзац — с декоративной линией слева */
.t-text_md p:nth-of-type(2) {
  font-size: 18px !important;
  line-height: 1.85 !important;
  padding-left: 18px !important;
  border-left: 3px solid rgba(91, 61, 125, 0.5) !important;
  margin-left: 2px !important;
  font-style: italic !important;
}

/* На мобильном — чуть меньше */
@media screen and (max-width: 768px) {
  .t-text_md p:first-of-type {
    font-size: 18px !important;
  }
  .t-text_md p:nth-of-type(2) {
    font-size: 17px !important;
    padding-left: 14px !important;
  }
}

/* TEXT BLOCK — gap between the two sentences */
.tn-elem__22442203811470210011265 .tn-atom br {
  display: block;
  margin-bottom: 18px;
}

/* BADGE — "предприниматель, общественный деятель, автор и наставник" */

/* DESKTOP */
.tn-elem__22442203811776019878138000002 {
  text-align: center !important;
  top: 153px !important;
}
.tn-elem__22442203811776019878138000002 .tn-atom {
  display: inline !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  background: rgba(127, 89, 131, 0.11) !important;
  border: 1px solid rgba(127, 89, 131, 0.32) !important;
  border-radius: 20px !important;
  padding: 3px 12px !important;
  letter-spacing: 0.03em !important;
}

/* MOBILE — центрируем, убираем overflow */
.tn-elem__22442203911776019878138000002 {
  left: 0 !important;
  width: 100% !important;
  text-align: center !important;
  transform: translateY(-10px) !important;
}
.tn-elem__22442203911776019878138000002 .tn-atom {
  display: inline !important;
  font-size: 11px !important;
  background: rgba(127, 89, 131, 0.11) !important;
  border: 1px solid rgba(127, 89, 131, 0.32) !important;
  border-radius: 20px !important;
  padding: 3px 10px !important;
  letter-spacing: 0.03em !important;
  max-width: 260px !important;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* MENU — 2 строки на промежуточных размерах экрана (957px–1550px) */
@media (min-width: 957px) and (max-width: 1550px) {
  #rec2244341821 .t-menu-base__list {
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-width: 750px !important;
    row-gap: 2px !important;
  }
  #rec2244341821 .t-menu-base__maincontainer {
    min-height: 80px !important;
    height: auto !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
  #rec2244341821 .t-menu-base__rightwrapper {
    align-self: center !important;
  }
}