/* ============================================
   HOME MARKET — Header
   ============================================ */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  transition: background var(--t-base), box-shadow var(--t-base), padding var(--t-base);
  padding: 20px 0;
}

/* Прозрачный на hero */
.header.transparent {
  background: transparent;
}

/* Залит при скролле */
.header.scrolled {
  background: var(--navy-deep);
  box-shadow: 0 2px 30px rgba(0,0,0,0.25);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ---- Logo ---- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 12px rgba(201,169,110,0.35);
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Cormorant', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3px;
  line-height: 1;
}
.logo-text span {
  display: block;
  font-size: 10px;
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

.logo-badge {
  font-family: 'Onest', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.2px;
  color: var(--gold-light);
  white-space: nowrap;
}

/* ---- Nav ---- */
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav a {
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  border-radius: var(--r-sm);
  transition: var(--t-fast);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.nav a.active { color: var(--gold); }

/* ---- Header CTA ---- */
.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-phone {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  transition: color var(--t-fast);
}
.header-phone:hover { color: var(--gold); }

.header-messengers {
  display: flex; gap: 6px;
}
.header-msg-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t-fast);
  opacity: 0.85;
}
.header-msg-btn:hover { opacity: 1; transform: scale(1.1); }
.header-msg-btn.wa { background: #25D366; }
.header-msg-btn.tg { background: #0088CC; }
.header-msg-btn svg { width: 17px; height: 17px; color: #fff; }

/* ---- Burger ---- */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px 0;
  margin-left: auto;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--t-base);
  transform-origin: center;
}
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Mobile menu ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--navy-deep);
  z-index: calc(var(--z-header) - 1);
  display: flex;
  flex-direction: column;
  padding: 100px 32px 40px;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: 'Cormorant', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color var(--t-fast);
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu-bottom {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 16px;
}
.mobile-menu-phone {
  font-size: 22px; font-weight: 700; color: var(--white);
}
.mobile-menu-phone:hover { color: var(--gold); }

/* ---- Крупное лого (160px) и раскладка шапки на ПК ---- */
/* РАЗМЕРЫ ЛОГО — меняются только здесь */
.logo img, .footer-logo img {
  display: block; width: auto; object-fit: contain; flex-shrink: 0;
  transition: height var(--t-base);
}
.header .logo img       { height: 160px; } /* шапка, большой экран */
.footer-logo img        { height: 112px; } /* футер */
.header.scrolled .logo img { height: 90px !important; } /* шапка при прокрутке */
@media (max-width: 768px) {
  .header .logo img     { height: 80px; }  /* шапка, телефон */
}

@media (min-width: 1025px) {
  /* контент ниже высокой шапки */
  body .hero-content { padding-top: 230px; }
  body .page-hero, body .settlements-hero, body .settlement-hero-content,
  body .blog-hero, body .post-hero-content { padding-top: 220px; }
}
@media (min-width: 1025px) and (max-width: 1600px) {
  .logo-badge { display: none; }
  .header-inner { gap: 20px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 15px; }
  /* мессенджеры дублируются плавающими кнопками справа */
  .header-messengers { display: none; }
}
@media (min-width: 1025px) and (max-width: 1440px) {
  .header:not(.scrolled) .logo img { height: 130px; } /* шапка, ноутбук */
  body .hero-content { padding-top: 200px; }
  body .page-hero, body .settlements-hero, body .settlement-hero-content,
  body .blog-hero, body .post-hero-content { padding-top: 190px; }
}
@media (min-width: 1025px) and (max-width: 1280px) {
  .header-cta .btn { display: none; }
}
