.about-section {
  position: relative;
  width: 85%;
  aspect-ratio: 21 / 9;
  margin: clamp(15px, 10vw, 45px) auto 0;
  border-radius: clamp(80px, 5vw, 115px);
  overflow: hidden;
  border: 1px solid rgb(255, 255, 255);
  box-shadow:
      inset 0 1px 4px #00000013,
      inset 0 -1px 4px #00000013;
  background: none;
  transition: box-shadow 0.5s ease;
}

.about-image {
  position: absolute;
  inset: 0;
  border-radius: clamp(80px, 5vw, 115px);
  overflow: hidden;
  z-index: 1;
}

.about-image::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: clamp(80px, 5vw, 115px);
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, 0.145),
    inset 0 0 8px rgba(0, 0, 0, 0.265);
  z-index: 2;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease-in-out;
  position: relative;
  filter: brightness(1.1);
  z-index: 1;
}

.about-section:hover .about-image img {
  transform: scale(1.03);
}

.about-text {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 45%;
  height: 80%;
  padding: clamp(25px, 3.1vw, 50px);
  border-radius: clamp(60px, 5vw, 100px);
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  background: #a2deffbc;
  border: 1px solid rgba(228, 245, 255, 0.55);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
  transition: transform 0.35s ease-in-out, box-shadow 0.5s ease;
}

.about-section:hover .about-text {
  transform: translateX(15px);
}

.about-section:active .about-text {
  transform: translateX(-4px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-text h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 2.5vw, 46px);
  font-weight: 600;
  color: #2b72a5;
}

.about-text hr {
  border: none;
  border-top: 2px solid rgba(255,255,255,0.3);
  margin: 10px 0;
  width: 50%;
}

.about-text p {
  margin: 0 0 10px;
  color: #484d7d;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Хедер теперь привязан к тексту */
.about-heading {
  position: absolute;
  top: calc(5px + 2%);
  left: calc(25px + 2%);
  padding: clamp(5px, 0.7vw, 15px) clamp(12px, 1.5vw, 25px);
  border-radius: 80px;
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  background: #a2deffbc;
  border: 1px solid rgba(228, 245, 255, 0.55);
  z-index: 11;
  transition: transform 0.35s ease-in-out, box-shadow 0.5s ease;
}

.about-heading h2 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 42px);
  font-weight: 600;
  color: #01406c;
}

.about-section:hover .about-heading {
  transform: translateX(30px);
}

@media (orientation: landscape) {
  .about-section {
    aspect-ratio: 21 / 9;
    width: 85%;
    max-width: none;
  }
}

@media (orientation: portrait) {
  .about-section {
    aspect-ratio: 1 / 1;
    width: 80%;
    max-width: 800px;
    margin: auto;
  }

  /* Текст снизу, с одинаковыми отступами слева и справа */
  .about-text {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 6%;
    width: auto;
    height: auto;
    padding: 6%;
    border-radius: inherit;
    transform: none !important;
  }

  /* Заголовок по центру сверху, ширина по содержимому */
  .about-heading {
    position: absolute;
    top: 6%;
    left: 50%;
    padding: clamp(8px, 3vw, 14px) clamp(14px, 4vw, 22px);
    transform: translateX(-50%) !important;
    border-radius: 50px;
    width: auto;
    text-align: center;
  }

  .about-heading h2 {
    display: inline-block;
  }

  /* отключаем hover-анимации на телефонах */
  .about-section:hover .about-text,
  .about-section:hover .about-image img,
  .about-section:hover .about-heading {
    transform: none !important;
  }
  .about-section:hover .about-heading {
    transform: translateX(-50%) !important;
  }
}
