/* hero */

.hero {
    position: relative;
    content: "";
    z-index: -1;
    background:
    linear-gradient(rgba(0,0,0,.82), rgba(0,0,0,.2)),
    url("/img/intro.webp") center / cover no-repeat;
    width: 100%;
    height: 650px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 2;
    padding: 0 10px;
    text-align: center;
    line-height: 1.5;
}

.hero h1{
  font-size: 36px;
}

.hero h3{
  font-size: 28px;
  max-width: 1130px;
}

.hero input {
    color: black;
    max-width: 500px;
    width: 100%;
    height: 50px;
    border-radius: 10px;
    padding: 5px 10px;
    border: 1px solid #111;
    outline: none; /* 🔑 ключовий рядок */
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero input:focus {
  border-color: #f58220;
  box-shadow: 0 0 0 2px rgba(245, 131, 32, 0.189);
}

.hero div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}


.hero div a {
    border: 1px solid #fb870f;
    border-radius: 10px;
    height: 60px;
    width: 220px;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    margin: 15px;
    color: white;
    text-decoration: none;
}

.bg-orange {
  background-color: #f58220;
}

#hero-link-mobile {
  display: none;
}

#hero-link-desctop {
  display: flex;
}

.bg-blue {
    background-color: #20419A;
}

.search-mobile-btn {
    display: none;
}

.home-categories,.home-advantages {
  justify-content: center;
  display: flex;
  flex-direction: column;
}

.home-categories h2, .home-advantages h2{
  margin: 80px 0 30px 0;
  text-align: center;
  font-size: 42px;
}

.home-categories-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1300px;
  align-self: center;
}

.categories-card {
  text-decoration: none;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  max-width: 500px;
  height: 400px;
  border-radius: 20px;
  padding: 30px 20px;
  margin: 10px;
  color: white;
  font-weight: 900;
  font-size: 32px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease; /* плавне масштабування всієї картки при hover */
}

#card2,#card3 {
  max-width: 700px;
}

.categories-card * {
  position: relative;
  z-index: 1; /* текст і кнопки поверх фонового зображення */
}

/* Псевдо-елемент для фонового зображення + градієнт */
.categories-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.5s ease, filter 0.5s ease;
  z-index: 0;
  filter: brightness(0.85); /* легке рівномірне затемнення */
}

/* Фонові зображення для кожної картки */
.categories-card#card1::before {
  background-image: url('../img/card1.webp');
}

.categories-card#card2::before {
  background-image: url('../img/card2.webp');
}

.categories-card#card3::before {
  background-image: url('../img/card3.webp');
}

.categories-card#card4::before {
  background-image: url('../img/card4.webp');
}

/* Hover ефект: легке збільшення і підсвічування */
.categories-card:hover::before {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* Кнопка на картці */
.card-btn {
  border: 3px solid white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.card-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.card-btn > img {
  width: 30px;
  height: 30px;
}

.home-advantages div {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
.home-advantages h2 {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.advantages-card {
  width: 300px;
  height: 400px;
  /* background-color: #397D64; */
  border: 1px solid #393a7d;
  background-color: #393a7d0c;
  margin: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  border-radius: 10px;
  padding: 20px 10px 0 10px;
  font-size: 18px;
}

.advantages-card-title {
  font-weight: 600;
  font-size: 24px;
}

.advantages-card div{
  width: 100%;
}


.advantages-card img {
  width: 100%;
}

/* Адаптивність */
@media (max-width: 1250px) {
  .categories-card#card1,.categories-card#card4 {
    max-width: 700px;
    height: 350px;
  }
  .home-advantages > div {
    max-width: 950px;
    align-self:  center;
  }
}

@media (max-width: 768px) {

   .categories-card::before {
    filter: brightness(0.75); /* легке рівномірне затемнення */
  }
   .categories-card#card4 { 
    background-size: 80%;
  }
  .categories-card {
    flex-direction: column;
    justify-content: space-between;
    align-items: end;
    height: 300px;
    font-size: 28px;
    padding: 20px;
  }

  .categories-card div{
    width: 100%;
    text-align: start;
  }

  .card-btn {
    width: 45px;
    height: 45px;
  }

  .card-btn > img {
    width: 25px;
    height: 25px;
  }
  
  .categories-card::before {
    filter: brightness(0.75); /* легке рівномірне затемнення */
  }
   .categories-card#card4 { 
    background-size: 80%;
  }
  .categories-card {
    flex-direction: column;
    justify-content: space-between;
    align-items: end;
    height: 300px;
    font-size: 36px;
    padding: 20px;
  }

  .categories-card div{
    width: 100%;
    text-align: start;
  }

  .card-btn {
    width: 45px;
    height: 45px;
  }

  .card-btn > img {
    width: 25px;
    height: 25px;
  }
 
  .hero input {
  /* border: 2px solid #20419a; */
  outline: none; /* 🔑 ключовий рядок */
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#hero-link-mobile {
  display: flex;
  border: 1px solid #fb870f;
  border-radius: 10px;
  height: 60px;
  width: 220px;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  margin: 40px 0;
  color: white;
  text-decoration: none;
}

#hero-link-desctop {
  display: none;
}

  .hero> h3 {
    margin-bottom: 0;
  }
}
