/* 1. Запобігаємо виходу контенту за межі body */
html {
  /* Дозволяємо вертикальний скрол, але ховаємо горизонтальний */
  overflow-x: hidden;
  /* Видаляємо фіксовану висоту, якщо вона була */
  height: auto;
}

body {
  /* Не обмежуємо висоту body, щоб контент міг тягнутися вниз */
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  margin: 0;
  padding: 0;
  /* Це допоможе уникнути "стрибків" на iOS */
  -webkit-overflow-scrolling: touch;
}

/* 2. Важливо: box-sizing змушує padding і border входити в ширину 100% */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 3. Всі зображення мають бути гумовими за замовчуванням */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero {
  position: relative;
  min-height: 0px;
  overflow: hidden;
  background-image: url('../images/2bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  /* Спочатку префікс для Chrome/Safari/Edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 95%, transparent 160%);

  /* Потім стандартна властивість */
  mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 95%, transparent 160%);
}

.hero__bg,
img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  max-width: 100%;
  max-height: 100%;
}

.hero-title {
  position: relative;
  background-image: url('../images/2bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 10px 0 80px;
  background-attachment: fixed;

  /* Спочатку префікс для Chrome/Safari/Edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 95%, transparent 160%);

  /* Потім стандартна властивість */
  mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 95%, transparent 160%);
}

.hero-title__content {
  text-align: center;
  margin-top: 2vh;
}

.hero-title__text {
  margin: 0;
  text-align: center;
  letter-spacing: .26em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  font-size: 42px;
  text-transform: uppercase;
}

.hero-title__ornament {
  display: block;
  width: auto;
  height: auto;
  max-width: 879px;
  margin: 16px auto 0;
  margin-bottom: 100px;
}

.hero-title__cards {
  margin-top: 34px;
}

.hero__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: start;
  margin-top: 160px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card__media {
  background-size: cover;
  overflow: hidden;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__media img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__content {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 340px;
}

.card__title {
  margin: 30px 16px 0;
  font-size: 17px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  flex-shrink: 0;
  text-align: center;
}

.card__title_middle {
  margin: 30px 16px 0;
  font-size: 17px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  flex-shrink: 0;
  text-align: center;
}

.card__text {
  margin: 40px 16px 0;
  font-size: 16px;
  line-height: 1.55;
  color: #7C7C7C;
  flex: 1;
  text-align: center;
}

.card__text_middle {
  margin: 20px 16px 0;
  font-size: 16px;
  line-height: 1.55;
  color: #7C7C7C;
  flex: 1;
  text-align: center;
}

.card__link {
  display: inline-block;
  margin: 14px 16px 16px;
  font-size: 16px;
  font-weight: 600;
  color: rgb(0, 0, 0);
  text-decoration: none !important;
  flex-shrink: 0;
  text-align: center;
}

.card__link:hover {
  text-decoration: underline !important;
}

.card__bottom-media {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__bottom-media img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map {

  background-image: url('../images/2bg.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #1f2a2e;
  background-attachment: fixed;

  /* Спочатку префікс для Chrome/Safari/Edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 90%, transparent 160%);

  /* Потім стандартна властивість */
  mask-image: linear-gradient(to bottom, transparent 0%, black 0%, black 95%, transparent 160%);

  overflow: hidden;
  z-index: 2;
}

.map__container,
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media {
  /* background: #fff; */
  background-image: url('../images/2bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  border-top: 1px solid rgba(0, 0, 0, .08);
  padding: 46px 0 38px;
}

.media__container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.media__title {
  margin-bottom: 10px;
  text-align: center;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(31, 42, 46, .70);
  font-size: 42px;
}

/*.media__ornament{
  width: 260px;
  height: 10px;
  margin: 14px 0 22px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(20,168,107,.65) 0 8px,
      rgba(20,168,107,0) 8px 12px
    );
  border-radius: 999px;
  opacity: .75;
}*/
.media__ornament {
  margin-bottom: 20px;
}

.video {
  width: min(980px, 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, .08);
  position: relative;
  text-decoration: none !important;
}

.video__thumb {
  height: 480px;
  background-image: url('../images/img1.jpeg');
  width: 100%;
  /* ВИПРАВЛЕННЯ: */
  background-position: center;
  /* Центрує картинку і по вертикалі, і по горизонталі */
  background-repeat: no-repeat;
  /* Щоб картинка не дублювалася, якщо вона маленька */
  background-size: cover;
  /* Важливо: картинка заповнить весь блок без дир, обрізаючи краї */

}

/*.video__play{
  position:absolute;
  left:50%;
  top:50%;
  width: 74px;
  height: 74px;
  transform: translate(-50%,-50%);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
.video__play::after{
  content:"";
  position:absolute;
  left: 30px;
  top: 23px;
  width: 0;
  height: 0;
  border-left: 22px solid rgba(31,42,46,.82);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}*/

/* --- СТИЛІ КНОПКИ СКРОЛУ (винесено окремо для безпеки) --- */

.scroll-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  width: 100%;
  /* margin-top регулюйте обережно, щоб не штовхати інші блоки */
  margin-top: -80px;
}

.scroll-btn {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

/* Використовуйте тільки специфічні класи, щоб не зачепити хедер */
.mouse-icon {
  width: 26px;
  height: 42px;
  border: 2px solid #A42C1E;
  border-radius: 15px;
  position: relative;
}

/* Стилі для коліщатка мишки - тільки всередині .mouse-icon */
.mouse-icon .wheel {
  width: 4px;
  height: 8px;
  background-color: #A42C1E;
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-inner 1.6s infinite ease-out;
}

/* Стрілки - ТІЛЬКИ всередині .arrow-wave, щоб не зламати бургер-меню */
.arrow-wave span {
  display: block;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid #A42C1E;
  border-right: 2px solid #A42C1E;
  transform: rotate(45deg);
  margin: -4px 0;
  animation: arrow-glow 1.6s infinite;
}

@media (max-width: 703px) {
  .hero__cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .hero-title {
    padding: 40px 0;
  }

  .card--raised {
    transform: none;
  }

  .card__bottom-media {
    height: 180px;
  }

  .video__thumb {
    height: 280px;
  }

  .hero {
    min-height: unset;
  }
}

@media (max-width: 1024px) {
  .hero__bg {
    width: 100%;
    height: 100%;
    aspect-ratio: 800/700;
    object-fit: cover;
  }

  .hero-title__text {
    font-size: 34px;
    font-weight: 400;
    letter-spacing: .14em;
    margin-top: 0px;
  }

  .hero-title__ornament {
    width: 100%;
    height: 20px;
  }

  .hero__cards {
    margin-top: 220px;
  }

  .scroll-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    margin-top: 50px;
    width: 100%;
  }

  .scroll-btn {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s;
  }

  .scroll-btn:active {
    transform: scale(0.95);
    /* Відгук на дотик на мобілці */
  }

  .scroll-label {
    font-family: sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #A42C1E;
    margin-bottom: 12px;
    font-weight: 600;
  }

  /* Кінець Кнопка для прокрутки вниз, яка веде до наступного розділу.*/
  /* Анімована іконка "мишки" або капсули */
  .mouse-icon {
    width: 26px;
    height: 42px;
    border: 2px solid #A42C1E;
    border-radius: 15px;
    position: relative;
    margin-bottom: 8px;
  }

  .wheel {
    width: 4px;
    height: 8px;
    background-color: #A42C1E;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-inner 1.6s infinite ease-out;
  }

  /* Стрілки, що пливуть донизу */
  .arrow-wave {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .arrow-wave span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #A42C1E;
    border-right: 2px solid #A42C1E;
    transform: rotate(45deg);
    margin: -4px 0;
    animation: arrow-glow 1.6s infinite;
  }

  .arrow-wave span:nth-child(2) {
    animation-delay: 0.2s;
  }

  /* Кінець Кнопка для прокрутки вниз, яка веде до наступного розділу.*/

  /* Карта картинка*/
  .map__container img {
    width: 100%;
    height: 100%;
    aspect-ratio: calc(1.0);
    height: auto;
    display: block;
  }

  /* Кінець Карта картинка*/

  .card__content {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 450px;
  }

  .media__title {
    margin-bottom: 10px;
    text-align: center;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(31, 42, 46, .70);
    font-size: 30px;
  }

  .card__title {
    margin: 30px 16px 0;
    font-size: 15px;
  }

  .card__title_middle {
    margin: 30px 16px 0;
    font-size: 15px;
  }

  .card__text {
    margin: 80px 16px 0;
  }

  .media__ornament {
    width: 100%;
    height: 20px;
    margin-top: 14px;
  }
}

@media (max-width: 430px) {
  .hero__bg {
    width: 100%;
    height: 100%;
    aspect-ratio: 800/700;
    object-fit: cover;
  }

  .hero-title__text {
    font-size: 34px;
    font-weight: 400;
    letter-spacing: .14em;
    margin-top: 0px;
  }

  .hero-title__ornament {
    width: 100%;
    height: 20px;
  }

  .hero__cards {
    margin-top: 120px;
    grid-template-columns: 1fr;
  }

  .scroll-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .scroll-btn {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s;
  }

  .scroll-btn:active {
    transform: scale(0.95);
    /* Відгук на дотик на мобілці */
  }

  .scroll-label {
    font-family: sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #A42C1E;
    margin-bottom: 12px;
    font-weight: 600;
  }

  /* Кінець Кнопка для прокрутки вниз, яка веде до наступного розділу.*/
  /* Анімована іконка "мишки" або капсули */
  .mouse-icon {
    width: 26px;
    height: 42px;
    border: 2px solid #A42C1E;
    border-radius: 15px;
    position: relative;
    margin-bottom: 8px;
  }

  .wheel {
    width: 4px;
    height: 8px;
    background-color: #A42C1E;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-inner 1.6s infinite ease-out;
  }

  /* Стрілки, що пливуть донизу */
  .arrow-wave {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .arrow-wave span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #A42C1E;
    border-right: 2px solid #A42C1E;
    transform: rotate(45deg);
    margin: -4px 0;
    animation: arrow-glow 1.6s infinite;
  }

  .arrow-wave span:nth-child(2) {
    animation-delay: 0.2s;
  }

  /* Кінець Кнопка для прокрутки вниз, яка веде до наступного розділу.*/

  /* Карта картинка*/
  .map__container img {
    width: 100%;
    height: 100%;
    aspect-ratio: calc(1.0);
    height: auto;
    display: block;
  }

  /* Кінець Карта картинка*/

  .hero__cards {
    margin-top: 140px;
  }

  .card__title {
    margin-bottom: 10px;
    text-align: center;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(31, 42, 46, .70);
    font-size: 30px;
  }

  .card__text {
    margin: 20px 10px 10px;
  }

  .card__content {
    min-height: 250px;
  }

  .media__ornament {
    width: 100%;
    height: 20px;
    margin-top: 14px;
  }
}


@media (max-width: 375px) {
  .hero__bg {
    width: 100%;
    height: 300px;
    aspect-ratio: 800/700;
    object-fit: cover;
  }

  .hero-title__text {
    font-size: 30px;
    font-weight: 400;
    letter-spacing: .14em;
    margin-top: 0px;
  }

  .hero-title__ornament {
    width: 100%;
    height: 20px;
  }

  .hero__cards {
    margin-top: 130px;
    grid-template-columns: 1fr;
  }

  .scroll-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    margin-top: -60px;
    width: 100%;
  }

  .scroll-btn {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s;
  }

  .scroll-btn:active {
    transform: scale(0.95);
    /* Відгук на дотик на мобілці */
  }

  .scroll-label {
    font-family: sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #A42C1E;
    margin-bottom: 12px;
    font-weight: 600;
  }

  /* Кінець Кнопка для прокрутки вниз, яка веде до наступного розділу.*/
  /* Анімована іконка "мишки" або капсули */
  .mouse-icon {
    width: 26px;
    height: 42px;
    border: 2px solid #A42C1E;
    border-radius: 15px;
    position: relative;
    margin-bottom: 8px;
  }

  .wheel {
    width: 4px;
    height: 8px;
    background-color: #A42C1E;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-inner 1.6s infinite ease-out;
  }

  /* Стрілки, що пливуть донизу */
  .arrow-wave {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .arrow-wave span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #A42C1E;
    border-right: 2px solid #A42C1E;
    transform: rotate(45deg);
    margin: -4px 0;
    animation: arrow-glow 1.6s infinite;
  }

  .arrow-wave span:nth-child(2) {
    animation-delay: 0.2s;
  }

  /* Кінець Кнопка для прокрутки вниз, яка веде до наступного розділу.*/

  /* Карта картинка*/
  .map__container img {
    width: 100%;
    height: 100%;
    aspect-ratio: calc(1.0);
    height: auto;
    display: block;
  }

  /* Кінець Карта картинка*/
  .card__content {
    min-height: 270px;
  }

  .card__text {
    margin-top: 1px;
  }

  .media__title {
    margin-bottom: 10px;
    text-align: center;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(31, 42, 46, .70);
    font-size: 30px;
  }

  .media__ornament {
    width: 100%;
    height: 20px;
    margin-top: 14px;
  }

}

/* --- КІНЕЦЬ ВСІХ ТВОЇХ СТИЛІВ --- */
/* Анімації */
/* Ці анімації будуть працювати ВЮДИ: і на ПК, і на iPhone, і на Android */
@keyframes scroll-inner {
  0% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 15px);
  }
}

@keyframes arrow-glow {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-5px, -5px);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(45deg) translate(5px, 5px);
  }
}