/* Контейнер баннера */
.img-cta-banner{
  --radius: 12px;
  --cta-bg: #0040ff;
  --cta-bg-hover: #809FFF;
  --cta-text: #fff;

  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;               /* чтобы кнопка и картинка не «выпадали» */
  background: #e5e5e5;            /* на случай задержки загрузки изображения */
  isolation: isolate;
}

/* Картинка на всю ширину блока */
.img-cta-banner__media,
.img-cta-banner__img{
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
}

/* Кнопка поверх изображения (десктоп) */
.img-cta-banner__cta{
  position: absolute;
  left: clamp(1px, 6vw, 120px);
  bottom: clamp(20px, 6vw, 80px);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: clamp(12px, 1.4vw, 18px) clamp(18px, 2.2vw, 28px);
  border-radius: 999px;

  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont,"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 1.2vw, 18px);
  color: var(--cta-text);
  background: var(--cta-bg);
  text-decoration: none;

  box-shadow: none;
  transition: background-color .2s ease;
}
.img-cta-banner__cta:hover{ background: var(--cta-bg-hover); }

/* Снимаем влияние темы на ссылки внутри баннера */
.img-cta-banner a{
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  color: inherit;
}

/* Мобайл: другая картинка уже подставляется через <picture>.
   Перепозиционируем/масштабируем кнопку под макет. */
@media (max-width: 980px){
  .img-cta-banner__cta{
    left: clamp(16px, 6vw, 48px);
    bottom: clamp(16px, 7vw, 56px);
    font-size: clamp(14px, 3.8vw, 18px);
    padding: clamp(12px, 3.2vw, 18px) clamp(18px, 4.6vw, 28px);
  }
}

@media (max-width: 980px){
  .img-cta-banner__cta{
    margin: 0;                       /* базовый отступ */
    transform: translate(-100px, -100px); /* X (влево/вправо), Y (вверх/вниз) */
  }
}


/* FIX: убираем щель снизу у картинки баннера */
.img-cta-banner{ line-height: 0; }                 /* на всякий случай */
.img-cta-banner__media{
  display: block !important;                       /* <picture> становится блочным */
  width: 100%;
  line-height: 0;
  font-size: 0;                                    /* чтобы точно не было baseline-пробела */
}
.img-cta-banner__img{
  display: block !important;                       /* дублируем для надежности */
  width: 100%;
  height: auto;
  margin: 0;
  vertical-align: top;                             
}

/* Секция-обёртка: убираем паддинги, базовые линии и делаем grid */
.img-cta-banner{
  display: grid;                 /* baseline-зазоров нет */
  padding: 0 !important;         /* чтобы снизу не оставалось места */
  margin: 0;
  line-height: 0;                /* на всякий случай */
  font-size: 0;                  /* и это тоже, если тема что-то вставляет */
  border-radius: 16px;           /* твои значения */
  overflow: hidden;              /* картинка заполняет до самого низа */
  background: transparent;       /* не подмешиваем фон */
}

/* Картинка занимает всю ячейку грида */
.img-cta-banner__media{
  grid-area: 1 / 1;              /* слой 1 */
  display: block !important;
  margin: 0 !important;
  line-height: 0;
}
.img-cta-banner__img{
  display: block !important;     /* убираем baseline у изображения */
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  vertical-align: bottom;        /* если где-то оставили inline — тоже поможет */
  box-shadow: none !important;
}

/* Кнопка — поверх изображения в той же ячейке */
.img-cta-banner__cta{
  grid-area: 1 / 1;              /* слой 2 поверх картинки */
  align-self: end;               /* прижать к низу (по желанию) */
  justify-self: start;           /* к левому краю (как нужно) */
  margin: 0 0 24px 24px;         /* отступы кнопки внутри баннера */
  position: relative;            /* абсолют больше не нужен */
  z-index: 2;
}


.img-cta-banner__cta{
  margin: 0 0 24px 24px;
  transform: translate(-56px, 30px); /* X, Y */
}

/* Если где-то в теме есть паддинги у <picture> — прижмём */
picture.img-cta-banner__media { padding: 0 !important; }

/* Кнопка поверх баннера — фиксируем вид независимо от темы */
.img-cta-banner .img-cta-banner__cta,
.img-cta-banner a.img-cta-banner__cta,
.img-cta-banner .img-cta-banner__cta:link,
.img-cta-banner .img-cta-banner__cta:visited,
.img-cta-banner .img-cta-banner__cta:hover,
.img-cta-banner .img-cta-banner__cta:active,
.img-cta-banner .img-cta-banner__cta:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 24px 22px;
  border-radius: 999px;

  color: #fff !important;                /* ← белый текст, перекрываем тему */
  background: #0040ff !important;        /* синий фон */
  border: 0 !important;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  box-shadow: none !important;
}

/* hover/focus */
.img-cta-banner .img-cta-banner__cta:hover {
  background: #809FFF !important;
  color: #fff !important;
}
.img-cta-banner .img-cta-banner__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* На случай вложенных спанов/иконок внутри ссылки */
.img-cta-banner .img-cta-banner__cta * {
  color: inherit !important;
  fill: currentColor !important;
}

/* --- DESKTOP-ONLY: если нужен абсолют с left/bottom, ограничиваем им только десктоп --- */
/* @media (min-width: 981px){
  .img-cta-banner__cta{
    position: absolute !important;
    left: clamp(1px, 6vw, 120px) !important;
    bottom: clamp(20px, 6vw, 80px) !important;
    transform: translate(-78px, 30px); /* если нужно смещение на десктопе, иначе 0,0 */
  }
} */

/* --- MOBILE OVERRIDE --- */
@media (max-width: 500px){
  .img-cta-banner__cta{
    position: relative !important;      /* убираем абсолют на мобилке */
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;

    justify-self: start;                 /* к левому краю */
    align-self: end;                     /* к нижнему краю */
    margin: 0 0 0px 0px !important;    /* базовое положение */

    /* Точное смещение (подгоняй значения): X влево(–)/вправо(+), Y вверх(–)/вниз(+) */
    transform: translate(25px, -220px) !important;
  }
}

/* === TABLET PORTRAIT: 768–980px (отдельно от мобайла) === */
@media (min-width: 768px) and (max-width: 980px){
  .img-cta-banner__cta{
    left: 40px;          /* ← двигаешь по горизонтали на планшете-портрете */
    bottom: 36px;        /* ↑/↓ вертикаль */
    transform: translate(50px, 50px) !important; /* тонкая подстройка (можно 0,0) */
    padding: 18px 24px;  /* чуть компактнее на портрете, при желании */
    font-size: 16px;
  }
}

/* Значения по умолчанию для десктопа (если хочешь — оставь как есть) */
.img-cta-banner{
  /* Эти переменные можно переопределять на брейкпоинтах */
  --cta-left: 6%;      /* отступ слева как % от ширины баннера */
  --cta-bottom: 8%;    /* отступ снизу как % от высоты баннера */
}

/* MOBILE ≤ 767px: фиксируем кнопке позицию процентах */
@media (max-width: 767px){
  .img-cta-banner{
    --cta-left: 7%;
    --cta-bottom: 45%;
  }
  .img-cta-banner__cta{
    position: absolute !important;      /* фиксируем к баннеру */
    left: var(--cta-left) !important;
    bottom: calc(var(--cta-bottom) + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    transform: none !important;         /* больше не двигаем translate */
    justify-self: auto; align-self: auto;
    padding: clamp(14px, 3.6vw, 18px) clamp(20px, 5vw, 28px);
    font-size: clamp(14px, 3.8vw, 18px);
  }
}

/* TABLET 768–980px: отдельно подстроим проценты при желании */
@media (min-width: 768px) and (max-width: 980px){
  .img-cta-banner{
    --cta-left: 7%;
    --cta-bottom: 50%;
  }
  .img-cta-banner__cta{
    position: absolute !important;
    left: var(--cta-left) !important;
    bottom: calc(var(--cta-bottom) + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    transform: none !important;
    padding: 18px 24px;
    font-size: 16px;
  }
}

/* === DESKTOP (>=981px): позиционирование кнопки в процентах === */
 @media (min-width: 981px){
  /* ← ТУТ МЕНЯЙ значения под макет */
  .img-cta-banner{
    --cta-left: 2%;      
/*     горизонталь: больше — правее, меньше — левее  */
    --cta-bottom: 12%;  
/*     вертикаль: больше — выше, меньше — ниже  */
  } 

  .img-cta-banner__cta{
    position: absolute !important;
    left: calc(var(--cta-left));
    bottom: calc(var(--cta-bottom));
    transform: none !important;   /* отключаем смещения, чтобы не мешали */
  }
} 
