/* bh-chrome.css — шапка/футер хаба для Laravel-семьи. Правила извлечены ВЕРБАТИМ из
   style-v3.css (источник правок — он). Регенерация: bw-chrome-unify.py. */

:root {
  --bh-primary: #2D6A4F;
  --bh-primary-dark: #1B4332;
  --bh-primary-light: #52B788;
  --bh-accent: #D4A373;
  --bh-accent-light: #E9C46A;
  --bh-bg: #FAFAF7;
  --bh-bg-alt: #F0EDE6;
  --bh-text: #1A1A1A;
  --bh-text-light: #555;
  --bh-text-muted: #888;
  --bh-white: #fff;
  --bh-border: #E0DDD5;
  --bh-shadow: 0 2px 12px rgba(0,0,0,.08);
  --bh-shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --bh-radius: 12px;
  --bh-radius-sm: 8px;
  --bh-header-h: 72px;
  --bh-max-w: 1240px;
  --bh-font: 'DM Sans', system-ui, sans-serif;
  --bh-font-display: 'Playfair Display', Georgia, serif;
  --bh-transition: .25s ease;
}



/* ===== HEADER ===== */
.bh-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bh-white);
  border-bottom: 1px solid var(--bh-border);
  height: var(--bh-header-h);
  transition: background var(--bh-transition), box-shadow var(--bh-transition);
}

.bh-header--home { background: transparent; border-bottom-color: transparent; }

.bh-header--home.bh-header--scrolled { background: var(--bh-white); border-bottom-color: var(--bh-border); box-shadow: var(--bh-shadow); }

.bh-header--scrolled .bh-logo__text { color: var(--bh-primary-dark) !important; }

.bh-header__inner {
  max-width: var(--bh-max-w); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; height: 100%; gap: 24px;
}

.bh-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }

.bh-logo__icon { width: 36px; height: 36px; flex-shrink: 0; }

.bh-logo__text { font-family: var(--bh-font-display); font-size: 1.25rem; font-weight: 700; color: var(--bh-primary-dark); }

.bh-header--home .bh-logo__text { color: var(--bh-white); }

.bh-nav { display: flex; gap: 6px; margin-left: auto; }

.bh-nav a { padding: 8px 14px; border-radius: var(--bh-radius-sm); font-weight: 500; font-size: .925rem; color: var(--bh-text); transition: all var(--bh-transition); }

.bh-nav a:hover { background: var(--bh-bg-alt); color: var(--bh-primary); }

.bh-header--home .bh-nav a { color: var(--bh-white); }

.bh-header--home.bh-header--scrolled .bh-nav a { color: var(--bh-text); }

.bh-header__cta {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: var(--bh-primary); color: var(--bh-white) !important; border-radius: var(--bh-radius-sm);
  font-weight: 600; font-size: .9rem; white-space: nowrap; transition: all var(--bh-transition);
}

.bh-header__cta:hover { background: var(--bh-primary-dark); transform: translateY(-1px); }

.bh-header__cta svg { width: 18px; height: 18px; flex-shrink: 0; }


/* Hamburger */
.bh-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 1003; }

.bh-hamburger span { display: block; width: 26px; height: 3px; background: var(--bh-primary-dark); border-radius: 2px; transition: all .3s; }

.bh-header--home .bh-hamburger span { background: var(--bh-white); }

.bh-header--home.bh-header--scrolled .bh-hamburger span { background: var(--bh-primary-dark); }

.bh-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,6px); }

.bh-hamburger.active span:nth-child(2) { opacity: 0; }

.bh-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-6px); }


/* Overlay */
.bh-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 998; opacity: 0; pointer-events: none; transition: opacity .3s; }

.bh-overlay.active { opacity: 1; pointer-events: auto; }
@media(max-width:968px) {

  .bh-nav { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background: var(--bh-white); flex-direction: column; padding: 80px 24px 24px; z-index: 999; box-shadow: var(--bh-shadow-lg); transition: right .3s; gap: 4px; }

  .bh-nav.active { right: 0; }

  .bh-nav a { color: var(--bh-text) !important; padding: 14px 16px; font-size: 1rem; border-radius: var(--bh-radius-sm); }

  .bh-nav a:hover { background: var(--bh-bg-alt); }

  .bh-hamburger { display: flex; }

  .bh-header__cta span { display: none; }

  .bh-header__cta { padding: 10px; }
}


/* ===== FOOTER ===== */
.bh-footer { background: var(--bh-primary-dark); color: rgba(255,255,255,.8); padding: 60px 20px 0; }

.bh-footer__inner { max-width: var(--bh-max-w); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.15); }

.bh-footer h4 { color: var(--bh-white); font-size: .95rem; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; }

.bh-footer a { display: block; color: rgba(255,255,255,.7); padding: 4px 0; font-size: .9rem; transition: color var(--bh-transition); }

.bh-footer a:hover { color: var(--bh-white); }

.bh-footer__phone { display: flex !important; align-items: center; gap: 8px; color: var(--bh-accent) !important; font-weight: 600; margin-top: 12px; font-size: 1rem !important; }

.bh-footer__phone svg { width: 18px; height: 18px; flex-shrink: 0; }

.bh-footer__disclaimer { font-size: .8rem; opacity: .6; margin-top: 8px; }

.bh-footer__bottom { max-width: var(--bh-max-w); margin: 0 auto; padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .85rem; }

.bh-footer__links { display: flex; gap: 20px; }

.bh-footer__links a { display: inline; }
@media(max-width:768px) {
 .bh-footer__inner { grid-template-columns: repeat(2, 1fr); gap: 30px; }
 .bh-footer__bottom { flex-direction: column; text-align: center; }
}


/* Home header CTA - white on dark hero */
.bh-header--home .bh-header__cta { background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.6); }

.bh-header--home .bh-header__cta:hover { background: rgba(255,255,255,.25); }

.bh-header--home.bh-header--scrolled .bh-header__cta { background: var(--bh-primary); border-color: var(--bh-primary); }


/* ===== UNIFIED HEADER/FOOTER IMPROVEMENTS ===== */

/* Nav active state */
.bh-nav a.active,
.bh-nav a[aria-current="page"] {
  color: var(--bh-primary) !important;
  background: var(--bh-bg-alt);
  font-weight: 600;
}
@media(max-width:480px) {

  .bh-footer__inner { grid-template-columns: 1fr; gap: 24px; }

  .bh-footer { padding: 40px 16px 0; }

  .bh-footer h4 { margin-bottom: 10px; }

  .bh-footer a { padding: 3px 0; }
}


/* Footer links spacing */
.bh-footer__col { min-width: 0; }
@media(max-width:480px) {

  .bh-header__cta {
    padding: 8px 12px;
    font-size: .82rem;
  }
}


/* Hamburger menu close button inside nav */
.bh-nav-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--bh-text);
}
@media(max-width:968px) {

  .bh-nav-close { display: block; }
}


/* Footer bottom links gap */
.bh-footer__bottom div { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }

.bh-footer__bottom a { color: rgba(255,255,255,.6); font-size: .82rem; padding: 0; }

.bh-footer__bottom a:hover { color: #fff; }


/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--bh-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  z-index: 10000;
  font-weight: 600;
  transition: top .2s;
}

.skip-to-content:focus { top: 16px; }


/* Nav overlay z-index fix */
.bh-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 998;
}

.bh-overlay.active { display: block; }


/* Mobile nav close button */
.bh-nav-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: #333;
  line-height: 0;
  transition: background .2s;
}

.bh-nav-close:hover { background: #eee; }
@media(max-width:968px) {

  .bh-nav-close { display: flex; align-items: center; justify-content: center; }
}


/* Mobile nav phone link */
.bh-nav-phone {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 14px 16px !important;
  background: #2D6A4F !important;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 700 !important;
  font-size: .95rem !important;
  text-decoration: none;
  margin-top: 16px;
}

.bh-nav-phone svg { flex-shrink: 0; }
@media(max-width:968px) {

  .bh-nav-phone { display: flex; }

  .bh-nav { display: flex; flex-direction: column; }
}
@media print {

  .bh-header, .bh-footer, .bh-mobile-cta, .bh-hamburger, #scroll-progress { display: none !important; }
}


/* Hide hamburger when nav is open */
.bh-hamburger.active {
  z-index: 990;
  pointer-events: none;
  opacity: 0;
}

.bh-nav-phone { color: #fff !important; }


/* ===== ACCESSIBILITY CONTRAST FIXES ===== */
/* Fix 1: nav phone in mobile menu */
.bh-nav-phone { background: #2D6A4F !important; color: #ffffff !important; }
  

/* Fix 3: footer disclaimer - improve opacity */
.bh-footer__col p[style*="rgba(255,255,255,.5)"],
.bh-footer p { color: rgba(255,255,255,.7) !important; }


/* ===== ACCESSIBILITY FIXES ===== */
/* Skip link focusable */
.skip-to-content {
  position: absolute !important;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}

.skip-to-content:focus {
  position: fixed !important;
  top: 10px !important;
  left: 10px !important;
  width: auto !important;
  height: auto !important;
  padding: 12px 20px;
  background: #1B4332;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: .95rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}


/* Nav phone contrast fix */
.bh-nav-phone {
  background: #1B4332 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}


/* Bigger, more prominent phone CTA in header — kill bounce rate */
.bh-header { height: 72px !important; }

.bh-header__inner { gap: 16px !important; }


.bh-header__cta {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 22px !important;
  background: linear-gradient(135deg, #2D6A4F, #1f4f37) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 1.02rem !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.25), 0 0 0 2px rgba(255,179,3,0.0) !important;
  transition: all .18s ease !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  position: relative !important;
}

.bh-header__cta::before {
  content: "" !important;
  position: absolute !important;
  inset: -3px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #FFB703, transparent) !important;
  opacity: 0 !important;
  z-index: -1 !important;
  transition: opacity .18s ease !important;
}

.bh-header__cta:hover {
  background: linear-gradient(135deg, #1f4f37, #133424) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.35) !important;
}

.bh-header__cta:hover::before { opacity: 1 !important; }

.bh-header__cta svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
}

.bh-header__cta span,
.bh-header__cta .bh-cta-num,
.bh-header__cta .bh-cta-sub {
  display: inline !important;
}
@media (max-width: 968px) {

  .bh-header__cta span { display: inline !important; }
}
@media (max-width: 600px) {

  .bh-header__cta {
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
  }

  .bh-nav { /* hidden via hamburger toggle, no change */ }
}
@media (max-width: 380px) {

  .bh-header__cta {
    padding: 9px 12px !important;
    font-size: 0.88rem !important;
  }

  .bh-header__cta svg { width: 16px !important; height: 16px !important; }
}

.bh-header__cta {
  animation: bh-cta-pulse 2.4s ease-in-out infinite !important;
}
@media (prefers-reduced-motion: reduce) {

  .bh-header__cta { animation: none !important; }
}
@media print, but reinforce) */
@media screen {

  .bh-header { display: flex !important; align-items: center !important; }

  .bh-header__inner { display: flex !important; }
}


/* Header trust micro-line (visible on desktop, hidden on mobile to save space) */
.bh-header__trust {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #475569;
  margin-right: auto;
  margin-left: 12px;
  white-space: nowrap;
}

.bh-header__trust svg { width: 14px; height: 14px; color: #2D6A4F; }
@media (min-width: 1100px) {

  .bh-header__trust { display: inline-flex; }
}
@media (max-width: 420px) {

  .bh-header__inner {
    gap: 8px !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
  }

  .bh-header__logo, .bh-header__inner > a:first-child {
    min-width: 0 !important;
    flex: 0 1 auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .bh-header__cta {
    flex: 0 0 auto !important;
    padding: 8px 10px !important;
    font-size: .8rem !important;
    gap: 6px !important;
    letter-spacing: 0 !important;
  }

  .bh-header__cta svg { width: 15px !important; height: 15px !important; }

  .bh-hamburger { flex: 0 0 auto !important; padding: 6px !important; }

  .bh-hamburger span { width: 22px !important; }
}
@media (max-width: 360px) {

  .bh-header__cta span,
  .bh-header__cta .bh-cta-num,
  .bh-header__cta .bh-cta-sub { display: none !important; }

  .bh-header__cta { padding: 9px !important; }
}


/* H2 · §7.11 — standalone controls to the 24px minimum.
   Inline links inside running prose are deliberately excluded (WCAG 2.5.8 inline exception). */
.bh-footer a,
.bh-footer__legal a,
.bh-footer__bottom a {
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
}

.skip-to-content { min-height: 24px; line-height: 24px; }
@media (max-width: 968px) {

  .bh-nav {
    visibility: hidden;
    transition: right .3s, visibility 0s linear .3s;
  }

  .bh-nav.active {
    visibility: visible;
    transition: right .3s, visibility 0s;
  }
}

/* Laravel-специфично: шапка fixed -> отступ контенту */
body { padding-top: var(--bh-header-h, 72px); }

/* лого в одну строку, как на хабе (при нехватке места — ellipsis, не перенос) */
.bh-logo { min-width: 0; }
.bh-logo__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
