/* Базовые стили */
:root {
  --container: 90%;
  --gap: 2.3vw;
  --edge: 0.57vw;
  --text: #111;
  --muted: #444;
  --brand: rgba(173, 12, 12, 1);
}

::-webkit-scrollbar {
  width: 0;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Geologica, system-ui, Arial, sans-serif;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

main {
  margin-top: 4.95vw;
}

/* ================= HEADER ================= */

/* базовое состояние хедера */
.site_header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
  box-shadow: none;
}

/* ✅ ГЛАВНЫЙ КЛАСС (JS использует именно его) */
.site_header.is-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

/* ✅ Совместимость с твоими старыми классами (если где-то используются) */
.site_header.hidden,
.site_header.header--hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

.site_header.visible,
.site_header.header--visible {
  transform: translateY(0);
}

/* внутренности хедера */
.header_inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2%;
  padding: 1.5vh 0;
  margin: 0 auto;
  width: 90%;
  box-sizing: border-box;
}

.logo {
  flex: 0 0 auto;
  width: 10%;
  min-width: 80px;
}

.main_nav {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.main_nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5vw;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.main_nav a {
  text-decoration: none;
  color: #111;
  font-weight: 300;
  font-size: 0.8vw;
  min-font-size: 14px;
  font-family: geologica, system-ui, Arial, sans-serif;
  transition: opacity .2s ease;
  display: flex;
  height: 100%;
  align-items: center;
}

.main_nav a.accent {
  color: #a10000;
}

.utils {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1%;
}

.icon_btn img {
  width: 1.5vw;
  min-width: 20px;
  height: auto;
  display: none;
}

.search {
  display: flex;
  align-items: center;
  border: 1px solid #111;
  padding: 0.5vw;
  width: 12.8vw;
  height: 1.8vw;
}

.search input {
  border: 0;
  outline: 0;
  width: 10vw;
  min-width: 120px;
  font-size: 0.7vw;
}

.search button {
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 1.85vw;
  height: 1.3vw;
}

.search img {
  height: 100%;
}

/* ================= MOBILE NAV ================= */

.nav_toggle {
  position: absolute;
  clip: rect(0 0 0 0);
  width: 1px;
  height: 1px;
}

.burger_btn {
  display: none;
  width: 36px;
  height: 24px;
  cursor: pointer;
  position: relative;
}

.burger_btn::before,
.burger_btn::after,
.burger_btn span {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: #000;
  left: 0;
  border-radius: 10px;
  transition: transform .25s ease;
}

.burger_btn::before {
  top: 0px;
}

.burger_btn span {
  top: 11px;
}

.burger_btn::after {
  bottom: 0px;
}

.mobile_drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.08);
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  overflow-y: auto;
  padding: 2%;
}

.mobile_drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile_drawer__head img {
  width: auto;
}

.mobile_drawer__close {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  position: relative;
  cursor: pointer;
}

.mobile_drawer__close::before,
.mobile_drawer__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 20%;
  width: 60%;
  height: 2px;
  background: #222;
}

.mobile_drawer__close::before {
  transform: rotate(45deg);
}

.mobile_drawer__close::after {
  transform: rotate(-45deg);
}

.mobile_search input {
  width: 100%;
  padding: 0.5em;
  border: 1px solid #222;
}

.mobile_nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile_nav__list a {
  display: block;
  padding: 1em 0;
  text-decoration: none;
  color: #111;
  border-bottom: 1px solid #eee;
}

.mobile_nav__list a.accent:nth-last-child(-n+3) {
  color: #a10000;
}

.mobile_overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  height: 120vh;
}

.nav_toggle:checked~.mobile_drawer {
  transform: translateX(0);
}

.nav_toggle:checked~.mobile_overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ================= FOOTER ================= */

.site_footer {
  border-top: 0.1vw solid rgba(0, 0, 0, 0.4);
  background: #fff;
  color: #111;
  font-family: geologica, system-ui, Arial, sans-serif;
  max-width: 100%;
  box-sizing: border-box;
  margin: auto;
  max-width: var(--container);
}

.site_footer__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  padding: 1vw 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

footer div.site_footer__inner section:nth-child(1)
{
  grid-column: 1 / 3;
}

footer div.site_footer__inner nav:nth-child(2)
{
  grid-column: 3 / 5;
  justify-content: flex-end;
}

footer div.site_footer__inner nav:nth-child(3)
{
  grid-column: 5 / 7;
  justify-content: flex-end;
}

footer div.site_footer__inner nav:nth-child(4)
{
  grid-column: 7 / 9;
}

footer div.site_footer__inner nav:nth-child(5)
{
  grid-column: 9 / 11;
}

footer div.site_footer__inner nav:nth-child(6)
{
  grid-column: 11 / 13;
}

.site_footer__policy {
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  font-size: 0.85vw;
  display: flex;
  flex-direction: column;
  gap: 0.5vw;
}

.site_footer__policy p
{
  margin: 0;
}

.site_footer__col {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  width: 100%;
  padding: 0;
}

.site_footer__logo {
  display: inline-flex;
  margin-bottom: 3vw;
}

.site_footer__logo img,
.logo img {
  width: 4.5vw;
  height: auto;
  margin-left: -0.05vw;
}

.site_footer__title {
  margin: 0 0 2vw;
  font-weight: 300;
  font-size: 1.5vw;
}

.site_footer__text,
.site_footer__address,
.site_footer__link {
  font-size: 1.15vw;
  font-weight: 300;
  color: rgba(0, 0, 0, 1);
  margin: 0;
  text-decoration: none;
  transition: opacity 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.site_footer__link a {
  color: rgba(0, 0, 0, 1);
  text-decoration: none;
}

.site_footer__text {
  color: rgba(0, 0, 0, 0.4);
  font-size: 1.04vw;
}

.site_footer__link_accent {
  color: #a10000;
}

.site_footer__sections {
  padding-right: 0;
  padding-left: 1vw;
  border-left: 1px solid rgba(0, 0, 0, 0.4);
}

.site_footer__list_sections {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4vw 2vw;
}

.site_footer__list_sections li {
  margin: 0;
  padding: 0;
}

.site_footer__bottom {
  border-top: 0.1vw solid rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1vw;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.9vw;
  padding: 0.25vw 0;
  width: 100%;
  box-sizing: border-box;
}

.site_footer__dev_container {
  display: flex;
  align-items: center;
  gap: 0.26vw;
}

.site_footer__dev_container img {
  width: auto;
  height: 3em;
  opacity: 0.6;
  filter: grayscale(1);
}

/* ================= BREADCRUMBS ================= */

.title-glav {
  color: #6B6B6B;
  text-decoration: none;
}

.title-min {
  display: flex;
  align-items: center;
  gap: 0.3vw;
  font-family: 'Geologica', serif;
  font-size: 0.8vw;
  margin-top: 0vw;
  margin-left: -0.05vw;
}

.title-min a {
  margin: 0;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03rem;
}

.title {
  margin: 0;
  font-weight: 200;
  font-family: 'Geologica', serif;
  font-size: 2.6vw;
  margin-left: -0.26vw;
  line-height: 1;
}

.breadcrumbs {
  display: flex;
  margin-bottom: 1.7vw;
  gap: 1vw;
  flex-direction: column;
}

/* === Адаптив: на планшет/мобилка === */

@media (max-width: 1024px) {
  .main_nav ul {
    gap: 1.2vw;
  }

  .site_footer__inner {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding: 2.6vw 0;
  }

}

@media (max-width: 767px) {
  main {
    margin-top: 14.5vw;
  }

  .site_footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4vw;
  }

  .site_footer__brand {
    order: 1;
    align-items: flex-start;
  }

  .site_footer__sections,
  .site_footer__contacts {
    width: 100%;
    box-sizing: border-box;
  }

  .site_footer__sections {
    padding-left: 2.6vw !important;
  }

  footer div.site_footer__inner nav:nth-child(3), footer div.site_footer__inner nav:nth-child(4)
  {
    margin-bottom: 7.7vw;
  }

  .site_footer__list_sections {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .site_footer__bottom {
    clear: both;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }

  .site_footer__col_header {
    display: none;
  }

  .site_footer__brand {
    order: 0;
    align-items: flex-start;
    padding: 0;
  }

  .site_footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 6vw;
    row-gap: 0;
    padding: 4vw 0;
  }

  /* Убираем старые order если есть */
  .site_footer__col {
    order: unset;
  }

  footer div.site_footer__inner section:nth-child(1), footer div.site_footer__inner nav:nth-child(2), footer div.site_footer__inner nav:nth-child(3), footer div.site_footer__inner nav:nth-child(4), footer div.site_footer__inner nav:nth-child(5), footer div.site_footer__inner nav:nth-child(6), footer div.site_footer__inner nav:nth-child(7)
  {
    grid-column: unset;
  }

  footer div.site_footer__inner nav:nth-child(3), footer div.site_footer__inner nav:nth-child(4), footer div.site_footer__inner nav:nth-child(5), footer div.site_footer__inner nav:nth-child(6)
  {
    padding-bottom: 3.35vw;
  }

  footer div.site_footer__inner nav:nth-child(2)
  {
    grid-row: 2;
    grid-column: 1;
  }

  footer div.site_footer__inner nav:nth-child(3)
  {
    grid-row: 3;
    grid-column: 1;
  }

  footer div.site_footer__inner nav:nth-child(4)
  {
    grid-row: 1 / 4;
    grid-column: 2;
  }

  footer div.site_footer__inner nav:nth-child(5)
  {
    grid-row: 4 / 6;
    grid-column: 1;
  }

  footer div.site_footer__inner nav:nth-child(5)
  {
    grid-row: 4 / 6;
  }

  /* Явно задаём позиции */

  .site_footer__brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site_footer__col.site_footer__contacts {
    order: 3;
  }

  .site_footer__list_sections li {
    height: 20px;
  }

  .title {
    font-size: 8vw;
    margin-top: 2vw;
    margin-left: -0.8vw;
  }

  .title-min {
    font-size: 2.3vw;
    gap: 1vw;
    margin-bottom: 0;
    margin-left: -0.25vw;
  }

  .breadcrumbs {
    padding-bottom: 3vw;
    gap: 0;
  }

  .title-min a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }

  .site_footer__title {
    font-size: 4.5vw;
    margin: 0 0 8vw;
  }

  .site_footer__list,
  .site_footer__list_second,
  .site_footer__text,
  .site_footer__address,
  .site_footer__link {
    font-size: 3.5vw;
  }

  .site_footer__link {
    width: 100%;
  }

  .site_footer__logo img,
  .logo img {
    width: 11vw;
  }
    .site_footer__dev {
    font-size: 3.5vw;
  }

  .site_footer__dev_container img {
    width: auto;
    height: 10em;
  }
}

/* Мобильная адаптация */
@media (max-width: 1024px) {
  :root {
    --container: 90%;
    --gap: 3.0vw;
    --edge: 5.56vw;
  }

  .main_nav,
  .utils {
    display: none;
  }

  .burger_btn {
    display: block;
  }

  .header_inner {
    justify-content: space-between;
  }

  .site_footer__dev_container {
    gap: 1vw;
  }

  .site_footer__policy {
    font-size: 3vw;
  }
  .site_footer__brand .site_footer__policy {
      display: none;
  }
}

/* Планшет 768–1024 */
@media (min-width: 768px) and (max-width: 1024px) {
  main {
    margin-top: 7.8vw;
  }

  .header_inner {
    gap: 1.5%;
    width: calc(100% - 40px);
    padding: 1.5vh 0 1.2vh 0;
  }

  .site_footer {
    width: calc(100% - 40px);
    max-width: 100%;
  }

  footer div.site_footer__inner section:nth-child(1), footer div.site_footer__inner nav:nth-child(2), footer div.site_footer__inner nav:nth-child(3), footer div.site_footer__inner nav:nth-child(4), footer div.site_footer__inner nav:nth-child(5), footer div.site_footer__inner nav:nth-child(6), footer div.site_footer__inner nav:nth-child(7)
  {
    grid-column: unset;
  }

  footer div.site_footer__inner nav:nth-child(2)
  {
    grid-row: 2;
    grid-column: 1;
  }

  footer div.site_footer__inner nav:nth-child(3)
  {
    grid-row: 3;
    grid-column: 1;
    padding-bottom: 3.25vw;
  }

  footer div.site_footer__inner nav:nth-child(4), footer div.site_footer__inner nav:nth-child(5), footer div.site_footer__inner nav:nth-child(6)
  {
    grid-row: 1 / 4;
    padding-bottom: 3.25vw;
    padding-left: 1.3vw;
  }

  .logo {
    width: 12%;
  }

  .main_nav a {
    font-size: 1.2vw;
  }

  .utils {
    gap: 1%;
  }

  .title-min {
    font-size: 1.35vw;
    gap: 0.4vw;
    margin-left: -0.10vw;
  }

  .site_footer__title {
    font-size: 3vw;
  }

  .site_footer__col.site_footer__brand {
    padding: 0;
  }

  .site_footer__list,
  .site_footer__list_second,
  .site_footer__text,
  .site_footer__address,
  .site_footer__link {
    font-size: 2.5vw;
  }

  .site_footer__bottom {
    font-size: 0.9vw;
  }

  .site_footer__logo img,
  .logo img {
    width: 9vw;
  }

  .site_footer_text_content {
    display: none;
  }

  .title {
    font-size: 4.55vw;
    margin-left: -0.45vw;
  }

  .site_footer__policy {
    font-size: 1.85vw;
  }

  .site_footer__brand .site_footer__policy 
  {
    display: none;
  }

  .site_footer__dev {
    font-size: 2.5vw;
  }

  .site_footer__dev_container img {
    width: auto;
    height: 7em;
  }

  .site_footer__logo
  {
    margin-bottom: 5vw;
  }
}

/* Общий стиль списка */
.site_footer__list_combined {
  list-style-type: disc;
  list-style-position: inside;
  padding: 0;
  margin: 0;
}

.site_footer__list_combined li::marker {
  font-size: 1.1em;
}

.site_footer__list_combined li:nth-last-child(-n+3)::marker {
  color: #c11;
}

@media (max-width: 460px) {
  .site_footer__title {
    margin-bottom: 5vw;
  }

  .header_inner {
    padding-right: 0px;
  }

  .site_footer__list_sections {
    grid-template-columns: 1fr;
    gap: 0.1em;
  }

  .burger_btn {
    height: 24px;
    width: 30px;
  }

  .burger_btn span {
    top: 11px;
  }

  section,
  .about_design,
  .journal_block {
    padding-top: 8.3vw;
    padding-bottom: 8.3vw;
    width: 90%;
    padding-inline: 0;
    margin: auto;
  }

  .about_editorial h2,
  .events_block h2,
  .journal_block h2,
  .about_design h2 {
    margin-bottom: 2.5vh;
    margin-left: -0.8vw;
  }

  .site_footer {
    width: 100%;
  }
}

/* Отступы и выравнивание */
.site_footer__list_combined li {
  margin-bottom: 0.4em;
  line-height: 1.3;
}

@media (min-width: 1025px) {
  :root {
    --container: 90%;
    --gap: 2.29vw;
    --edge: 0.57vw;
  }

  .site_footer {
    width: calc(100% - 40px);
  }
}