/*
  Профи Дом — Stage 1 home hero background overlay fix.
  Scope: index.html only via .pd-hero-clean.
  Goal: use the existing home photo as a real hero layer on desktop and mobile.
  No generated images, no new image folders, no internal/SEO pages touched.
*/

html body .pd-hero-clean.pfhero-v7--home {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  display: flex !important;
  min-height: 620px !important;
  padding: 34px 0 58px !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #071426 !important;
  background-image:
    linear-gradient(90deg, rgba(7, 20, 38, .96) 0%, rgba(7, 20, 38, .76) 34%, rgba(7, 20, 38, .34) 58%, rgba(7, 20, 38, .08) 100%),
    url('../img/hero-static/home-master.jpg') !important;
  background-size: cover !important;
  background-position: 63% center !important;
  background-repeat: no-repeat !important;
}

html body .pd-hero-clean.pfhero-v7--home .pd-hero-clean__media {
  display: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  z-index: 999 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border-radius: 0 !important;
}

html body .pd-hero-clean.pfhero-v7--home .pd-hero-clean__media img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: 68% center !important;
  filter: saturate(1.03) contrast(1.02) !important;
}

html body .pd-hero-clean.pfhero-v7--home .pd-hero-clean__media::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(90deg, rgba(7, 20, 38, .96) 0%, rgba(7, 20, 38, .74) 30%, rgba(7, 20, 38, .30) 56%, rgba(7, 20, 38, .04) 100%),
    linear-gradient(180deg, rgba(7, 20, 38, .04), rgba(7, 20, 38, .16)) !important;
  pointer-events: none !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__overlay {
  display: none !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__container {
  position: relative !important;
  z-index: 1000 !important;
  width: min(1180px, calc(100% - 48px)) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  transform: translateY(12px) !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__card {
  width: min(660px, 100%) !important;
  max-width: 660px !important;
  margin: 0 auto 0 0 !important;
  padding: clamp(28px, 3.4vw, 44px) !important;
  border-radius: 30px !important;
  background: linear-gradient(135deg, rgba(8, 18, 38, .42), rgba(8, 18, 38, .18)) !important;
  border: 1px solid rgba(255, 255, 255, .38) !important;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(255, 255, 255, .08) !important;
  backdrop-filter: blur(28px) saturate(175%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(175%) !important;
}

html body .pd-hero-clean.pfhero-v7--home h1 {
  font-size: clamp(38px, 4.35vw, 60px) !important;
  line-height: 1.04 !important;
  margin-bottom: 18px !important;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .42) !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__subtitle,
html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__trustline,
html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badge {
  text-shadow: 0 1px 14px rgba(0, 0, 0, .34) !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__subtitle {
  color: rgba(255, 255, 255, .93) !important;
  margin-bottom: 22px !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badges {
  margin: 18px 0 26px !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badge {
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .30) !important;
  box-shadow: 0 10px 26px rgba(2, 6, 23, .12) !important;
}

html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__btn--secondary {
  background: rgba(255, 255, 255, .13) !important;
  border-color: rgba(255, 255, 255, .34) !important;
}

@media (max-width: 992px) {
  html body .pd-hero-clean.pfhero-v7--home {
    display: flex !important;
    min-height: calc(100svh - 112px) !important;
    padding: 34px 0 30px !important;
    align-items: center !important;
    background-color: #071426 !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pd-hero-clean__media {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999 !important;
    border-radius: 0 !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pd-hero-clean__media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 64% 22% !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pd-hero-clean__media::after {
    background:
      linear-gradient(180deg, rgba(7, 20, 38, .06) 0%, rgba(7, 20, 38, .25) 28%, rgba(7, 20, 38, .50) 66%, rgba(7, 20, 38, .72) 100%),
      radial-gradient(circle at 78% 13%, rgba(255, 255, 255, .10), transparent 28%),
      linear-gradient(90deg, rgba(7, 20, 38, .20), rgba(7, 20, 38, .04) 52%, rgba(7, 20, 38, .18)) !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__container {
    position: relative !important;
    z-index: 1000 !important;
    width: min(100% - 28px, 720px) !important;
    margin: 0 auto !important;
    transform: none !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: clamp(20px, 4vw, 26px) !important;
    border-radius: 24px !important;
    text-align: center !important;
    background: linear-gradient(135deg, rgba(8, 18, 38, .06), rgba(8, 18, 38, .015)) !important;
    border: 1px solid rgba(255, 255, 255, .36) !important;
    box-shadow:
      0 8px 20px rgba(0, 0, 0, .08),
      inset 0 1px 0 rgba(255, 255, 255, .34),
      inset 0 -1px 0 rgba(255, 255, 255, .03) !important;
    backdrop-filter: blur(10px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
  }

  html body .pd-hero-clean.pfhero-v7--home h1,
  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__subtitle,
  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badge,
  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__btn,
  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__trustline {
    text-shadow: 0 1px 12px rgba(0, 0, 0, .34) !important;
  }

  html body .pd-hero-clean.pfhero-v7--home h1,
  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__subtitle {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badges,
  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__actions {
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  html body .pd-hero-clean.pfhero-v7--home {
    min-height: calc(100svh - 112px) !important;
    padding: 24px 0 24px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pd-hero-clean__media img {
    object-position: 66% 18% !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__container {
    width: calc(100% - 24px) !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__card {
    padding: 18px 17px !important;
    border-radius: 22px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home h1 {
    font-size: clamp(27px, 7.2vw, 34px) !important;
    line-height: 1.08 !important;
    margin-bottom: 12px !important;
    letter-spacing: -.035em !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__subtitle {
    font-size: 14.5px !important;
    line-height: 1.44 !important;
    margin-bottom: 14px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badges {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 13px 0 15px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badge {
    justify-content: center !important;
    padding: 8px 8px !important;
    font-size: 12px !important;
    line-height: 1.16 !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badge::before {
    margin-right: 6px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__actions {
    gap: 9px !important;
    margin-top: 0 !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__btn {
    min-height: 48px !important;
    padding: 13px 16px !important;
    border-radius: 14px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__trustline {
    display: none !important;
  }
}

html body .pfhero-v7.pfhero-v7--page {
  min-height: 620px !important;
  padding: 98px 0 74px !important;
  background-image:
    linear-gradient(90deg, rgba(7, 20, 38, .86) 0%, rgba(7, 20, 38, .58) 34%, rgba(7, 20, 38, .24) 58%, rgba(7, 20, 38, .06) 100%),
    var(--hero-static-image) !important;
  background-position: center center !important;
}

html body .pfhero-v7.pfhero-v7--page .pfhero-v7__overlay {
  display: none !important;
}

html body .pfhero-v7.pfhero-v7--page .pd-hero-clean__media {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border-radius: 0 !important;
}

html body .pfhero-v7.pfhero-v7--page .pd-hero-clean__media img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  filter: saturate(1.03) contrast(1.02) !important;
}

html body .pfhero-v7.pfhero-v7--page .pd-hero-clean__media::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(90deg, rgba(7, 20, 38, .86) 0%, rgba(7, 20, 38, .58) 34%, rgba(7, 20, 38, .24) 58%, rgba(7, 20, 38, .06) 100%),
    linear-gradient(180deg, rgba(7, 20, 38, .04), rgba(7, 20, 38, .14)) !important;
  pointer-events: none !important;
}

html body .pfhero-v7.pfhero-v7--page .pfhero-v7__container {
  position: relative !important;
  z-index: 2 !important;
  transform: translateY(10px) !important;
}

html body .pfhero-v7.pfhero-v7--page .pfhero-v7__card {
  width: min(660px, 100%) !important;
  max-width: 660px !important;
  background: linear-gradient(135deg, rgba(8, 18, 38, .42), rgba(8, 18, 38, .18)) !important;
  border: 1px solid rgba(255, 255, 255, .38) !important;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(255, 255, 255, .08) !important;
  backdrop-filter: blur(28px) saturate(175%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(175%) !important;
}

html body .pfhero-v7.pfhero-v7--page h1 {
  text-shadow: 0 2px 16px rgba(0, 0, 0, .42) !important;
}

html body .pfhero-v7.pfhero-v7--page .pfhero-v7__subtitle,
html body .pfhero-v7.pfhero-v7--page .pfhero-v7__trustline,
html body .pfhero-v7.pfhero-v7--page .pfhero-v7__badge {
  text-shadow: 0 1px 14px rgba(0, 0, 0, .34) !important;
}

@media (max-width: 992px) {
  html body .pfhero-v7.pfhero-v7--page {
    min-height: auto !important;
    padding: 64px 0 24px !important;
    align-items: flex-start !important;
    background-image:
      linear-gradient(180deg, rgba(7, 20, 38, .08) 0%, rgba(7, 20, 38, .28) 42%, rgba(7, 20, 38, .58) 100%),
      var(--hero-static-image) !important;
    background-position: var(--hero-mobile-position, 72% center) !important;
  }

  html body .pfhero-v7.pfhero-v7--page .pfhero-v7__container {
    width: min(100% - 28px, 720px) !important;
    transform: none !important;
  }

  html body .pfhero-v7.pfhero-v7--page .pd-hero-clean__media img {
    object-position: var(--hero-mobile-object-position, 72% center) !important;
  }

  html body .pfhero-v7.pfhero-v7--page .pd-hero-clean__media::after {
    background:
      linear-gradient(180deg, rgba(7, 20, 38, .08) 0%, rgba(7, 20, 38, .28) 42%, rgba(7, 20, 38, .58) 100%),
      radial-gradient(circle at 78% 13%, rgba(255, 255, 255, .08), transparent 28%),
      linear-gradient(90deg, rgba(7, 20, 38, .14), rgba(7, 20, 38, .04) 52%, rgba(7, 20, 38, .14)) !important;
  }

  html body .pfhero-v7.pfhero-v7--page .pfhero-v7__card {
    width: 100% !important;
    max-width: 100% !important;
    background: linear-gradient(135deg, rgba(8, 18, 38, .03), rgba(8, 18, 38, .008)) !important;
    border: 1px solid rgba(255, 255, 255, .36) !important;
    box-shadow:
      0 8px 20px rgba(0, 0, 0, .08),
      inset 0 1px 0 rgba(255, 255, 255, .34),
      inset 0 -1px 0 rgba(255, 255, 255, .03) !important;
    backdrop-filter: blur(10px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
  }

  html body .pfhero-v7.pfhero-v7--page h1,
  html body .pfhero-v7.pfhero-v7--page .pfhero-v7__subtitle,
  html body .pfhero-v7.pfhero-v7--page .pfhero-v7__badge,
  html body .pfhero-v7.pfhero-v7--page .pfhero-v7__btn,
  html body .pfhero-v7.pfhero-v7--page .pfhero-v7__trustline {
    text-shadow: 0 1px 12px rgba(0, 0, 0, .34) !important;
  }
}

@media (max-width: 640px) {
  html body .pfhero-v7.pfhero-v7--page {
    min-height: auto !important;
    padding: 54px 0 20px !important;
  }
}

/* Mobile safety: floating contacts stay hidden on the home hero until existing JS adds body.social-widget-visible. */
@media (max-width: 768px) {
  html body:not(.social-widget-visible) .social-widget {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(14px) !important;
  }

  html body.social-widget-visible .social-widget {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) !important;
  }
}

/* Mobile final glass override: keep hero photos visible under the card. */
@media (max-width: 767px) {
  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__card,
  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean .pfhero-v7__card,
  html body .pd-hero-clean .pfhero-v7__card {
    background: linear-gradient(135deg, rgba(8, 18, 38, .008), rgba(8, 18, 38, .001)) !important;
    border: 1px solid rgba(255, 255, 255, .34) !important;
    box-shadow:
      0 4px 12px rgba(0, 0, 0, .024),
      inset 0 1px 0 rgba(255, 255, 255, .26),
      inset 0 -1px 0 rgba(255, 255, 255, .01) !important;
    backdrop-filter: blur(1px) saturate(108%) !important;
    -webkit-backdrop-filter: blur(1px) saturate(108%) !important;
  }

  html body .pd-hero-clean .pfhero-v7__card::before,
  html body .pd-hero-clean .pfhero-v7__card::after {
    background: transparent !important;
    opacity: 0 !important;
    box-shadow: none !important;
    filter: none !important;
  }

  html body .pd-hero-clean .pd-hero-clean__media::before,
  html body .pd-hero-clean .pd-hero-clean__media::after {
    background: linear-gradient(180deg, rgba(7, 20, 38, 0) 0%, rgba(7, 20, 38, .014) 58%, rgba(7, 20, 38, .035) 100%) !important;
    opacity: .18 !important;
    box-shadow: none !important;
    filter: none !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__overlay,
  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean .pfhero-v7__overlay {
    display: none !important;
    background: transparent !important;
    opacity: 0 !important;
  }

  html body .pd-hero-clean .pfhero-v7__card h1,
  html body .pd-hero-clean .pfhero-v7__card p,
  html body .pd-hero-clean .pfhero-v7__subtitle,
  html body .pd-hero-clean .pfhero-v7__badge,
  html body .pd-hero-clean .pfhero-v7__trustline {
    text-shadow: 0 2px 14px rgba(0, 0, 0, .42) !important;
  }
}

/* Mobile inner pages: readable copy over lighter, softer hero photos. */
@media (max-width: 767px) {
  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero {
    min-height: auto !important;
    padding: 74px 0 calc(30px + env(safe-area-inset-bottom, 0px)) !important;
    align-items: flex-start !important;
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .18) 38%, rgba(7, 20, 38, .22) 100%),
      var(--hero-static-image) !important;
    background-position: var(--hero-mobile-position, 68% center) !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pd-hero-clean__media img {
    filter: brightness(1.14) saturate(.94) contrast(.92) !important;
    object-position: var(--hero-mobile-object-position, 68% center) !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pd-hero-clean__media::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .18) 42%, rgba(7, 20, 38, .24) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .12) 54%, rgba(7, 20, 38, .10) 100%) !important;
    opacity: .96 !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pfhero-v7__container {
    width: min(100% - 28px, 720px) !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pfhero-v7__card {
    margin-top: 0 !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .58)) !important;
    border: 1px solid rgba(255, 255, 255, .76) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16) !important;
    backdrop-filter: blur(3px) saturate(112%) !important;
    -webkit-backdrop-filter: blur(3px) saturate(112%) !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero h1,
  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pfhero-v7__subtitle,
  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pfhero-v7__trustline {
    color: #0f172a !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .72), 0 10px 28px rgba(15, 23, 42, .18) !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero h1 {
    font-weight: 900 !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pfhero-v7__subtitle {
    color: rgba(15, 23, 42, .9) !important;
    font-weight: 700 !important;
  }

  html body .pfhero-v7.pfhero-v7--page.pd-hero-clean.inner-premium-hero .pfhero-v7__actions {
    margin-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Desktop home fold: compact hero so the status strip lands in the first screen. */
@media (min-width: 993px) {
  html body .pd-hero-clean.pfhero-v7--home {
    height: clamp(560px, calc(100svh - 190px), 760px) !important;
    min-height: 0 !important;
    padding-top: 18px !important;
    padding-bottom: 24px !important;
    align-items: center !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__container {
    transform: translateY(-28px) !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__card {
    width: min(590px, 100%) !important;
    max-width: 590px !important;
    padding: clamp(22px, 2.25vw, 30px) !important;
    border-radius: 26px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home h1 {
    font-size: clamp(34px, 3.15vw, 46px) !important;
    line-height: 1.03 !important;
    margin-bottom: 12px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__subtitle {
    max-width: 540px !important;
    margin-bottom: 12px !important;
    font-size: clamp(15px, 1.05vw, 17px) !important;
    line-height: 1.42 !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badges {
    margin: 12px 0 14px !important;
    gap: 8px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__badge {
    min-height: 42px !important;
    padding: 7px 12px !important;
    font-size: 12.5px !important;
    line-height: 1.18 !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__btn {
    min-height: 46px !important;
    min-width: 170px !important;
    padding: 12px 19px !important;
    border-radius: 12px !important;
  }

  html body .pd-hero-clean.pfhero-v7--home .pfhero-v7__trustline {
    margin-top: 10px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  html body .today-status {
    margin-top: -18px !important;
    position: relative !important;
    z-index: 5 !important;
  }
}
