@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Noto+Sans:wght@400;500&display=swap');

.hero {
  padding: 26px 0 10px;
}

.hero-box {
  border-radius: 22px;
  overflow: hidden;
  /* Было: height: 746px — теперь масштабируется с экраном */
  height: clamp(420px, 53vw, 746px);
  background: linear-gradient(150deg, #daeaf8 0%, #b8d4f0 55%, #a4c8ee 100%);
  position: relative;
  display: flex;
  align-items: stretch;
}

.hero-card {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 52%;
  background: rgba(140, 185, 230, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.4);
  /* Отступы и padding масштабируются с экраном */
  margin: clamp(14px, 2vw, 28px) 0 clamp(14px, 2vw, 28px) clamp(14px, 2vw, 28px);
  padding: clamp(28px, 3.7vw, 52px) clamp(22px, 3.4vw, 48px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-card h1 {
  margin: 0 0 clamp(10px, 1.4vw, 20px);
  font-family: 'Abril Fatface', serif;
  font-weight: 400;
  font-size: clamp(38px, 6.8vw, 100px);
  line-height: 0.96;
  color: #0d2640;
  letter-spacing: -0.02em;
}

.hero-card p {
  margin: 0 0 auto;
  padding-bottom: clamp(20px, 2.8vw, 40px);
  font-family: 'Noto Sans', system-ui, sans-serif;
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.35;
  color: #1a3050;
  font-weight: 400;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: clamp(160px, 16vw, 230px);
  height: clamp(44px, 4.1vw, 58px);
  padding: 0 clamp(20px, 2.5vw, 36px);
  border-radius: clamp(10px, 1vw, 14px);
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-family: 'Noto Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 1.25vw, 18px);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 4px 20px rgba(15,23,42,.10);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15,23,42,.16);
}

.hero-image {
  position: absolute;
  z-index: 3;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 146%;
  width: 62%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.hero-image img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  object-position: right center;
}

/* ── MOBILE ── */
@media (max-width: 780px) {
  .hero {
    padding: 14px 0 6px;
  }

  .hero-box {
    height: auto;
    min-height: 520px;
    border-radius: 20px;
    flex-direction: column;
    overflow: hidden;
    /* Единый фон — изображение растянуто на весь блок */
    background: #b8d4f0;
  }

  /* Изображение занимает весь hero-box как фон */
  .hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    transform: none;
    justify-content: center;
    align-items: center;
    z-index: 1;
  }

  .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  /* Убираем fade — фон теперь единый */
  .hero-image::after {
    display: none;
  }

  .hero-card {
    position: relative;
    z-index: 2;
    width: auto;
    margin: auto 12px 12px 12px;
    padding: 22px 20px 22px;
    border-radius: 18px;
    /* Прозрачная белая карточка поверх фото */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.7);
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 0;
  }

  .hero-card h1 {
    font-size: clamp(34px, 9.5vw, 50px);
    margin-bottom: 10px;
    line-height: 1.0;
    /* Тёмный текст читается на светлой карточке */
    color: #0d2640;
  }

  .hero-card p {
    font-size: 15px;
    line-height: 1.5;
    padding-bottom: 16px;
    margin: 0;
    color: #1a3050;
  }

  .hero-btn {
    display: flex;
    width: 100%;
    min-width: unset;
    height: 50px;
    font-size: 16px;
    border-radius: 12px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid rgba(15,23,42,.12);
    box-shadow: 0 2px 10px rgba(15,23,42,.08);
  }
}

@media (max-width: 400px) {
  .hero-box {
    border-radius: 18px;
    min-height: 460px;
  }

  .hero-card {
    padding: 18px 16px 18px;
    margin: auto 10px 10px 10px;
  }

  .hero-card h1 {
    font-size: clamp(30px, 9vw, 44px);
  }
}