@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:            #080B12;
  --bg-card:       #0E1218;
  --bg-deep:       #0A1020;
  --border:        #141820;
  --border-blue:   #1A2A40;

  --text-primary:   #FFFFFF;
  --text-secondary: #CBD2DB;
  --text-label:     #549DE7;

  --blue-light:    #1B9AF0;
  --blue-mid:      #1B6EC2;
  --blue-btn:      #1B6EC2;
  --blue-hover:    #1B9AF0;
  --blue-text:     #FFFFFF;

  --font-main:  'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 12px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.pg {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   Hero
=========================== */
.hero {
  position: relative;
  min-height: 10vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 1.5rem;
  background-image:
    linear-gradient(rgba(111,111,111,0.36), rgba(119,119,119,0.33)),
    url("poster.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(41,41,41,0.57) 0%,
    rgba(0,0,0,0.78) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 600px;
  text-align: center;
}

.hero-sub {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  text-align: justify;
  line-height: 1.6;
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  letter-spacing: -.01em;
}

h1 strong {
  font-weight: 600;
  color: var(--blue-light);
}

/* ===========================
   Sections
=========================== */
.sec {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.sec-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: 1.4rem;
}

/* ===========================
   Pain cards
=========================== */
.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  overflow: visible;
}

.pcard {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform, box-shadow;
  animation: cardBreathe 4s ease-in-out infinite;
}

.pcard:nth-child(2) { animation-delay: 1s; }
.pcard:nth-child(3) { animation-delay: 2s; }
.pcard:nth-child(4) { animation-delay: 3s; }

@keyframes cardBreathe {
  0%, 100% { box-shadow: 0 0 0px rgba(27,154,240,0); }
  50%       { box-shadow: 0 0 12px rgba(27,154,240,0.12), 0 0 24px rgba(27,154,240,0.06); }
}

.pcard:hover {
  border-color: #1B9AF0;
  transform: translateY(-6px);
  animation: none;
  box-shadow:
    0 0 0 1px rgba(27,154,240,0.6),
    0 0 16px rgba(27,154,240,0.35),
    0 0 40px rgba(27,154,240,0.15),
    0 24px 48px rgba(0,0,0,0.7);
}

.ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-deep);
  border: 1px solid var(--border-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.ico svg {
  width: 16px;
  height: 16px;
  stroke: var(--blue-light);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pcard h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.pcard p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ===========================
   Steps
=========================== */
.steps { display: flex; flex-direction: column; }

.step { display: flex; align-items: stretch; }

.step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 18px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1px solid var(--blue-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-light);
  flex-shrink: 0;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  animation: numBreathe 3s ease-in-out infinite;
}

.step:nth-child(2) .step-num { animation-delay: 0.8s; }
.step:nth-child(3) .step-num { animation-delay: 1.6s; }
.step:nth-child(4) .step-num { animation-delay: 2.4s; }

@keyframes numBreathe {
  0%, 100% { box-shadow: 0 0 0px rgba(27,154,240,0); }
  50%       { box-shadow: 0 0 10px rgba(27,154,240,0.35); }
}

.step:hover .step-num,
.step.touch-active .step-num {
  background: var(--blue-mid);
  border-color: var(--blue-light);
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(27,154,240,0.6);
  animation: none;
}

.step-line {
  width: 1px;
  background: var(--border);
  flex: 1;
  margin: 4px 0;
}

.step:last-child .step-line { display: none; }

.step-body { padding-bottom: 24px; }

.step-body h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  padding-top: 4px;
}

.step-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===========================
   Results
=========================== */
.rgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rcard {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 1.3rem 1rem;
  text-align: center;
}

.rnum {
  font-size: 30px;
  font-weight: 300;
  color: var(--blue-light);
  margin-bottom: 6px;
  letter-spacing: -.02em;
}

.rdesc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ===========================
   CTA
=========================== */
.cta-sec {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.cta-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  /* overflow: hidden убран намеренно — иначе cta-glow обрезается */
}

.cta-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(27,110,194,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  position: relative;
}

.cta-box p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 500px;
  position: relative;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-btn);
  color: var(--blue-text);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  width: fit-content;
  transition: background .2s ease, transform .15s ease;
  position: relative;
}

.cta-btn:hover { background: var(--blue-hover); transform: translateY(-1px); }
.cta-btn:active { transform: scale(.98); }

.cta-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--blue-text);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===========================
   Footer
=========================== */
.footer {
  padding: 1.8rem 0 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--border);
}
.footer-contacts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .2s;
}

.contact-btn:hover { opacity: .8; }

.contact-btn.whatsapp {
  background: rgba(37,211,102,0.12);
  color: #25D366;
  border: 1px solid rgba(37,211,102,0.25);
}

.contact-btn.telegram {
  background: rgba(39,174,239,0.12);
  color: #27AAEF;
  border: 1px solid rgba(39,174,239,0.25);
}

.contact-phone {
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
  -webkit-user-select: none;
}

.fname { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.ftitle { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.fcontact { font-size: 13px; color: var(--blue-light); }

/* ===========================
   Fade-in анимация
=========================== */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Touch-эффекты для мобильных */
.pcard.touch-active {
  border-color: #1B9AF0;
  transform: translateY(-4px);
  animation: none;
  box-shadow:
    0 0 0 1px rgba(27,154,240,0.6),
    0 0 16px rgba(27,154,240,0.35),
    0 0 40px rgba(27,154,240,0.15),
    0 20px 40px rgba(0,0,0,0.6);
}

/* ===========================
   Scroll Top Button
=========================== */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-mid);
  border: 1px solid var(--blue-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  z-index: 100;
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#scroll-top:hover {
  background: var(--blue-light);
  box-shadow: 0 0 16px rgba(27,154,240,0.4);
}

#scroll-top svg {
  width: 18px;
  height: 18px;
  stroke: #FFFFFF;
  fill: none;
}

/* ===========================
   Mobile
=========================== */
@media (max-width: 600px) {
  .pg { padding: 0 1rem; }
  .hero { padding: 60px 1rem; }
  .hero-content { max-width: 100%; }
  .pain-grid { grid-template-columns: 1fr; }
  .rgrid { grid-template-columns: 1fr 1fr; }
  .rgrid .rcard:last-child { grid-column: 1 / -1; }
  .cta-box { padding: 1.5rem; }
  .footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 380px) {
  .rgrid { grid-template-columns: 1fr; }
  .rgrid .rcard:last-child { grid-column: auto; }
}

/* ===========================
   Nav (ipats)
=========================== */
.nav {
  position: fixed;
  top: 0; right: 20%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(8,11,18,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-blue);
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-light);
  letter-spacing: .06em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text-primary); }

@media (max-width: 560px) { .nav-links { display: none; } }

/* ===========================
   Hero ipats (без фото, с сеткой)
=========================== */
.hero-ipats {
  position: relative;
  min-height: 10vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 56px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 60% 40%, rgba(27,110,194,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(27,154,240,0.07) 0%, transparent 60%);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27,154,240,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,154,240,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

.hero-ipats .hero-content {
  position: relative;
  text-align: left;
  padding: 0rem 0 1rem;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-mid);
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}
.btn-primary:hover { background: var(--blue-light); }

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-blue);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.btn-ghost:hover { border-color: var(--blue-light); color: var(--text-primary); }

/* ===========================
   Features (ipats)
=========================== */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.fcard {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.fcard-icon {
  width: 32px; height: 32px;
  margin-bottom: .8rem;
}
.fcard-icon svg {
  width: 100%; height: 100%;
  stroke: var(--blue-light);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fcard h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--text-primary);
}

.fcard p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   Services list (ipats)
=========================== */
.svc-list { display: flex; flex-direction: column; }

.svc-item {
  display: flex;
  gap: 1.2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.svc-item:last-child { border-bottom: none; }

.svc-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-label);
  letter-spacing: .06em;
  padding-top: 3px;
  min-width: 28px;
}

.svc-body h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: .3rem;
}

.svc-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===========================
   Functions list (ipats)
=========================== */
.func-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .4rem;
}

.func-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 5px 0;
}

.func-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue-light);
  flex-shrink: 0;
}

/* ===========================
   Projects (ipats)
=========================== */
.proj-list { display: flex; flex-direction: column; gap: .75rem; }

.proj-item {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color .2s;
}
.proj-item:hover { border-color: var(--blue-light); }

.proj-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-light);
  margin-top: 5px;
  flex-shrink: 0;
}

.proj-item h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .3rem;
}

.proj-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ===========================
   CTA btns row (ipats)
=========================== */
.cta-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
/*#scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20%;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--card-bg, #1a1b1e); 
  border: 1px solid var(--border, #333);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}*/

#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-top:hover {
  background: #333;
  transform: translateY(-3px);
}

/* На мобильных сделаем чуть меньше, чтобы не мешала */
@media (max-width: 768px) {
  #scroll-top {
    bottom: 15px;
    right: 25px;
    width: 40px;
    height: 40px;
  }
}

/* ===========================
   Mobile (ipats additions)
=========================== */


@media (max-width: 600px) {
  .feat-grid { grid-template-columns: 1fr; }
  .func-cols { grid-template-columns: 1fr; }
}

/* ===========================
   Подход (index)
=========================== */
.approach-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.approach-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.approach-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===========================
   Карточки услуг (index)
=========================== */
.services-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.svc-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.4rem 1.4rem 1.4rem;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}

.svc-card:hover {
  border-color: var(--blue-light);
  transform: translateX(4px);
}

.svc-card-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-deep);
  border: 1px solid var(--border-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.svc-card-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue-light);
}

.svc-card-body {
  flex: 1;
}

.svc-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: .3rem;
}

.svc-card-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .3rem;
}

.svc-card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.svc-card-arrow {
  width: 20px;
  height: 20px;
  color: var(--text-label);
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}

.svc-card-arrow svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.svc-card:hover .svc-card-arrow {
  color: var(--blue-light);
  transform: translateX(3px);
}
.svc-card { padding: 1.2rem 1rem; }

	/* Специальный блок для страницы аудита */
.audit-hero {
  position: relative;
  min-height: 450px; /* Фиксируем высоту, чтобы картинка не "гуляла" */
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg); /* Черная подложка */
}

.audit-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('hero-audit.jpg');
  background-attachment: fixed;
  
  /* РЕШЕНИЕ: заставляем картинку быть не шире 100% экрана, 
     но при этом не даем ей растягиваться больше своего реального размера */
  background-size: 40vw auto; 
  
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
  filter: brightness(0.4);
}

/* На мобильных фиксированный фон всегда портит масштаб — отключаем его */
@media (max-width: 768px) {
  .audit-hero .hero-bg {
    background-attachment: scroll;
    background-size: cover; /* На телефонах картинка маленькая, cover тут сработает лучше */
  }
}

/* На мобильных (iOS/Android) fixed-background часто тормозит, отключаем */
@media (max-width: 768px) {
  .audit-hero .hero-bg {
    background-attachment: scroll;
    background-size: cover; /* На мобилках лучше заполнить весь блок */
  }
  .audit-hero {
    min-height: 50vh;
  }
}

/* Универсальный фикс для навигации */
.nav {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  justify-content: center !important;
}

/* Общий слой для фиксации фона */
.main-hero .hero-bg, 
.audit-hero .hero-bg, 
.tele-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-attachment: fixed;
  background-size: 100vw auto; /* Фиксируем ширину по окну */
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
  filter: brightness(0.45);
}

/* ЖЕСТКИЙ ФИКС РАЗМЕРА БЛОКА */
.main-hero, .audit-hero, .tele-hero {
  height: 500px !important; /* Устанавливаем четкую высоту */
  min-height: 500px !important;
  padding: 0 !important; /* Убираем твои 140px, которые раздували блок */
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Возвращаем отступы только контенту, чтобы текст не прилип к верху */
.hero-ipats .hero-content {
  position: relative;
  z-index: 5;
  padding: 2rem 0; 
}

/* Настройка фонового слоя для всех страниц с фото */
.main-hero .hero-bg, 
.audit-hero .hero-bg,
.tele-hero .hero-bg{
  position: absolute;
  inset: 0;
  background-attachment: fixed;
  background-size: 40vw auto; /* Сжимаем до ширины окна */
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
  filter: brightness(0.4);
   min-height: 100vh; /* Не делай слишком высоким, иначе картинка поползет в зум */
  max-height: 550px; /* Жесткий потолок высоты для четкости фото */
}

/* Конкретные картинки для каждой страницы */
.main-hero .hero-bg { background-image: url("poster.jpg"); }
.audit-hero .hero-bg { background-image: url("hero-audit.jpg"); }
.tele-hero .hero-bg { background-image: url("hero-ipats.jpg"); }

/* Чтобы текст всегда был сверху */
.hero-ipats .hero-content {
  position: relative;
  z-index: 5;
}

/* Сетка (из твоего стиля) поверх фото */
.hero-grid-bg {
  z-index: 2;
  pointer-events: none;
}
/* Максимально приоритетный мобильный режим */
@media screen and (max-width: 768px) {
    /* 1. Сбрасываем высоту и отступы для контейнера */
    html body .hero-ipats.main-hero, 
    html body .hero-ipats.audit-hero, 
    html body .hero-ipats.tele-hero {
        height: auto !important;
        min-height: 400px !important;
        padding: 80px 0 !important; /* Увеличиваем отступы, чтобы текст не сжимался */
    }

    /* 2. Исправляем масштаб картинки */
    html body .main-hero .hero-bg, 
    html body .audit-hero .hero-bg, 
    html body .tele-hero .hero-bg {
        background-attachment: scroll !important;
        background-size: cover !important; /* На мобилке только cover спасет картинку от "узкой полоски" */
        background-position: center center !important;
    }
}