/* Общая шапка сайта (04_Инфраструктура/build-header.py). Самодостаточна: цвета с запасными значениями. */

html { scroll-padding-top: 84px; }
.sh {
  --sh-ink: #23282C; --sh-muted: #5E666B; --sh-green: #2F8F4E; --sh-green-d: #1F6B38; --sh-tint: #EAF3EC; --sh-line: #E3EAE5;
  position: sticky; top: 0; z-index: 45; background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--sh-line);
  font-family: Manrope, -apple-system, 'Segoe UI', Arial, sans-serif;
}
.sh-in { max-width: 1140px; margin: 0 auto; padding: 0 20px; height: 72px; display: flex; align-items: center; gap: 28px; }

.sh-logo { display: flex; flex-direction: column; text-decoration: none; flex: 0 0 auto; line-height: 1.15; }
.sh-logo b { color: var(--sh-green); font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.sh-logo span { margin-top: 3px; color: var(--sh-muted); font-size: 11.5px; font-weight: 500; }

.sh-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.sh-link {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px;
  border: 0; border-radius: 10px; background: none; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--sh-ink); font: 650 15px/1 Manrope, -apple-system, 'Segoe UI', Arial, sans-serif;
  transition: background .15s, color .15s;
}
.sh-link svg { width: 12px; height: 12px; color: var(--sh-muted); transition: transform .2s; }
.sh-link:hover, .sh-dd:hover .sh-dd-btn, .sh-dd-btn[aria-expanded="true"] { background: var(--sh-tint); color: var(--sh-green-d); }
.sh-link:focus-visible { outline: 2px solid var(--sh-green); outline-offset: 1px; }
.sh-link[aria-current="page"]::after, .sh-dd-btn.is-current::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: -16px; height: 2px; background: var(--sh-green); border-radius: 2px;
}
.sh-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* выпадающие меню «Для кого» и «Экосбор и РОП» */
.sh-dd { position: relative; }
.sh-panel {
  position: absolute; left: -8px; top: calc(100% + 14px); width: 560px; display: none;
  grid-template-columns: 1fr 1fr; gap: 2px; padding: 10px; border-radius: 16px; background: #fff;
  border: 1px solid var(--sh-line); box-shadow: 0 22px 50px rgba(35, 60, 45, .16);
}
.sh-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }   /* мостик, чтобы меню не закрывалось по пути */
.sh-dd.open .sh-panel { display: grid; }
@media (hover: hover) and (min-width: 1181px) { .sh-dd:hover .sh-panel { display: grid; } }
.sh-item { display: block; padding: 12px 14px; border-radius: 11px; text-decoration: none; transition: background .15s; }
.sh-item b { display: block; color: var(--sh-ink); font-size: 15px; font-weight: 750; }
.sh-item span { display: block; margin-top: 3px; color: var(--sh-muted); font-size: 12.5px; line-height: 1.35; }
.sh-item:hover, .sh-item:focus-visible { background: var(--sh-tint); outline: none; }
.sh-item:hover b { color: var(--sh-green-d); }
.sh-item.sh-urgent { background: #FFF6F4; }
.sh-item.sh-urgent b { color: #C2412F; }
.sh-item.sh-urgent:hover { background: #FDEBE7; }

.sh-right { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; margin-left: auto; }
.sh-phone { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; line-height: 1.2; }
.sh-phone b { color: var(--sh-ink); font-size: 16px; font-weight: 800; white-space: nowrap; }
.sh-phone span { color: var(--sh-muted); font-size: 11.5px; }
.sh-phone:hover b { color: var(--sh-green-d); }
.sh-cta {
  display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border: 0; border-radius: 11px; cursor: pointer;
  background: var(--sh-green); color: #fff; text-decoration: none; white-space: nowrap;
  font: 750 14.5px/1 Manrope, -apple-system, 'Segoe UI', Arial, sans-serif; transition: background .15s;
}
.sh-cta:hover { background: var(--sh-green-d); }

.sh-burger { display: none; width: 44px; height: 44px; border: 1px solid var(--sh-line); border-radius: 12px; background: #fff; cursor: pointer; padding: 0 12px; }
.sh-burger span { display: block; height: 2px; background: var(--sh-ink); border-radius: 2px; transition: transform .2s; }
.sh-burger span + span { margin-top: 6px; }
.sh-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.sh-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.sh-mobile { border-top: 1px solid var(--sh-line); padding: 8px 20px 22px; max-height: calc(100vh - 72px); overflow-y: auto; background: #fff; }
.sh-mobile[hidden] { display: none; }
.sh-m-cap { margin: 10px 0 2px; color: var(--sh-muted); font-size: 12px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; }
.sh-m-group a { display: block; padding: 12px 0; border-bottom: 1px solid var(--sh-line); color: var(--sh-ink); font-size: 16px; font-weight: 650; text-decoration: none; }
.sh-m-group a.sh-urgent { color: #C2412F; }
.sh-m-main { margin-top: 10px; }
.sh-m-main a { font-size: 18px; font-weight: 750; }
.sh-m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.sh-m-tile { display: block; padding: 14px; border-radius: 14px; background: var(--sh-tint); text-decoration: none; }
.sh-m-tile b { display: block; color: var(--sh-green-d); font-size: 16px; font-weight: 800; }
.sh-m-tile span { display: block; margin-top: 4px; color: var(--sh-muted); font-size: 12.5px; line-height: 1.35; }
.sh-m-small a { font-size: 15px; }
.sh-m-more { margin-top: 6px; border-bottom: 1px solid var(--sh-line); }
.sh-m-more summary { padding: 14px 0; color: var(--sh-ink); font-size: 16px; font-weight: 750; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.sh-m-more summary::-webkit-details-marker { display: none; }
.sh-m-more summary::after { content: '+'; color: var(--sh-green); font-size: 20px; line-height: 1; }
.sh-m-more[open] summary::after { content: '−'; }
.sh-m-more .sh-m-group a { padding-left: 12px; font-size: 15px; }
.sh-m-more .sh-m-group a:last-child { border-bottom: 0; }
.sh-m-cta { display: flex; justify-content: center; align-items: center; height: 48px; margin-top: 18px; border-radius: 12px; background: var(--sh-green); color: #fff; font-size: 16px; font-weight: 750; text-decoration: none; }
.sh-m-phone { display: block; margin-top: 14px; text-align: center; color: var(--sh-green-d); font-size: 18px; font-weight: 800; text-decoration: none; }

@media (max-width: 1280px) { .sh-in { gap: 18px; } .sh-link { padding: 0 10px; font-size: 14.5px; } .sh-phone span { display: none; } }
.sh-dd:first-child .sh-panel { width: 520px; }
@media (max-width: 1180px) {
  .sh-nav { display: none; }
  .sh-burger { display: block; }
  .sh-right { gap: 12px; }
}
@media (max-width: 640px) {
  .sh-in { height: 62px; gap: 10px; padding: 0 14px; }
  .sh-logo b { font-size: 16.5px; }
  .sh-logo span { display: none; }
  .sh-cta { display: none; }
  .sh-phone b { font-size: 14.5px; }
  .sh-mobile { max-height: calc(100vh - 62px); }
  html { scroll-padding-top: 72px; }
}

/* Навигация в подвале главной (build-header.py, FOOTNAV) */
.fnav { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 32px; margin: 4px 0 28px; padding-bottom: 24px; border-bottom: 1px solid #E3EAE5; text-align: left; }
.fnav-cap { margin: 0 0 10px; color: #23282C; font-size: 15px; font-weight: 800; }
.fnav ul { list-style: none; margin: 0; padding: 0; }
.fnav li { margin: 0 0 8px; }
.fnav a { color: #4A5550; font-size: 14px; line-height: 1.4; text-decoration: none; }
.fnav a:hover { color: #1F6B38; text-decoration: underline; }
