/* =========================================
   HEADER (BEM) — Aurumwood
   Requirements:

========================================= */

.header {
  background: #f7f4eb;
}

.header__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px;
  /* 40 from edges, 24 by height */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* LOGO */
.header__logo-zone {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.header__logo-img {
  height: 120px;
  width: auto;
  display: block;
}

/* CONTENT ZONE */
.header__content-zone {
  flex: 1 1 auto;
  max-width: 60%;
  min-height: 120px;
  /* по высоте как лого */
  padding: 16px 0;
  /* 16 сверху/снизу */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* инфо сверху, меню снизу */
  gap: 12px;
}

/* INFO (space-between) */
.header__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* требование */
  gap: 16px;
}

/* INFO ITEM (hover: icon + text) */
.header__info-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #33271a;
  transition: 0.2s ease;
}

.header__info-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ca942c33;
  transition: 0.2s ease;
  flex: 0 0 auto;
}

.header__info-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.header__info-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
}

.header__info-title {
  font-size: 14px;
  color: #634626;
}

.header__info-value {
  font-size: 16px;
  font-weight: 500;
  transition: 0.2s ease;
}

/* hover affects both icon and text */
.header__info-item:hover {
  color: #ca942c;
}

.header__info-item:hover .header__info-icon {
  background: #ca942c;
}

.header__info-item:hover .header__info-icon img {
  filter: brightness(0) invert(1);
}

.header__info-item:hover .header__info-value {
  color: #ca942c;
}

/* SOCIAL */
.header__social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header__social-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #33271a;
  transition: 0.2s ease;
}

.header__social-link img {
  width: 18px;
  height: 18px;
  display: block;
}

.header__social-link:hover {
  transform: translateY(-1px);
  scale: 1.1;
}


/* NAV */
.header__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* прижато вправо */
  gap: 20px;
}

.header__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: flex-end;
  width: 100%;

}

.header__menu a {
  text-decoration: none;
  color: #33271A;
  transition: 0.2s ease;
  line-height: 130%;
  font-weight: bold;
  font-size: 18px;
}

.header__menu a:hover {
  color: #ca942c;
}

.header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid #ca942c33;
  color: #33271a;
  text-decoration: none;
  transition: 0.2s ease;
}

.header__cta:hover {
  border-color: #ca942c;
  color: #ca942c;
}

/* BURGER (default hidden on desktop) */
.header__burger {
  display: none;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(51, 39, 26, 0.12);
  background: transparent;
  cursor: pointer;
}

.header__burger-lines {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #33271a;
}

.header__burger-lines::before,
.header__burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #33271a;
}

.header__burger-lines::before {
  top: -6px;
}

.header__burger-lines::after {
  top: 6px;
}

/* DRAWER */
.header__drawer {
  position: fixed;
  inset: 0;
  z-index: 200;

  /* вместо display:none (нужно для анимации) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}


.header__drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 220ms ease;
}

.header__drawer-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 380px);
  height: 100%;
  background: #f7f4eb;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 2;

  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
  will-change: transform;

  /* важно для свайпа: разрешаем вертикальный скролл, но обрабатываем горизонтальный drag */
  touch-action: pan-y;
}
.header__drawer.is-open .header__drawer-inner {
  transform: translateX(0);
}

.header__drawer-close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(51, 39, 26, 0.12);
  background: transparent;
  cursor: pointer;
}

.header__drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.header__drawer-menu a {
  text-decoration: none;
  color: #33271a;
  font-weight: 600;
  font-size: 22px;
}

.header__drawer-meta {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.header__drawer-link {
  text-decoration: none;
  color: #634626;
}

.header__drawer-link:hover {
  color: #ca942c;
}

.header__drawer-cta {
  margin-top: 10px;
  display: inline-flex;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  background: #ca942c;
  color: #ffffff;
  text-decoration: none;
}

.header__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 1;
}

.header__drawer.is-open .header__backdrop {
  opacity: 1;
}

/* во время перетаскивания убираем transition, чтобы panel следовал за пальцем */
.header__drawer.is-dragging .header__drawer-inner {
  transition: none;
}

.header__drawer.is-dragging .header__backdrop {
  transition: none;
}

/* =========================================
   Responsive
========================================= */

/* Medium: уменьшаем отступы, можно скрыть часть информации при необходимости */
/* 
@media (min-width:1921px){
  .header__inner{
  max-width: 100%;
}
.header__info{
  justify-content: flex-end;
  gap: 32px;
}

.header__content-zone{
  gap: 18px;
  min-height: max-content;
}

.header__menu a{
  font-size: 22px;
}
.header__info-title{
  font-size: 18px;
}

.header__info-value{
  font-size: 22px;
}

.header__social-link img{
  height: 22px;
  width: 22px;
}

.header__cta{
  font-size: 22px;
}
} */

@media (max-width:1920px) {


.header__content-zone{
  max-width: 75%;
}

 .header__info {
    align-items: flex-start;
  }

  .header__info-title{
    font-size: 16px;
  }
  
  .header__info-value{
    font-size: 18px;
  }

  .header__social-link img{
    height: 20px;
    width: 20px;
  }

  .header__cta{
    font-size: 18px;
  }

  .header__menu{
    justify-content: flex-start;
  }
  
  .header__menu a{
    font-size: 20px;
  }
  
 
  
}

@media (max-width: 1440px) {
  .header__inner {
    padding: 20px 24px;
    gap: 16px;
  }

  .header__content-zone {
    max-width: 100%;
    align-items: flex-end;
  }

}

/* Small: только лого и бургер */
@media (max-width: 1030px) {
  .header__content-zone {
    display: none;
    
  }

  .header__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header__inner {
    padding: 16px 16px;
  }

  .header__logo-img {
    height: 90px;
  }
}

/* ===== Mini popover for info icons (<= 1330px) ===== */
.header__info-item {
  position: relative;
}

/* popover hidden by default */
.header__info-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  max-width: 320px;

  background: #f7f4eb;
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 12px 14px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 50;
}

.header__info-pop::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #f7f4eb;
  border-left: 1px solid var(--color-border-light);
  border-top: 1px solid var(--color-border-light);
}

.header__info-pop-title {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.header__info-pop-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.header__info-pop-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.9;
}

/* open state */
.header__info-item.is-open .header__info-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* <= 1330px: leave only icons */
@media (max-width: 1330px) {
  .header__info-text {
    display: none;
  }

  .header__info {
    justify-content: flex-start;
    gap: 12px;
  }

  /* чуть компактнее, чтобы влезало */
  .header__info-icon {
    width: 44px;
    height: 44px;
  }
}