* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  max-width: 1280px;
  min-width: 320px;
  /* margin: 0 auto; */
  text-align: center;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}

a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }

  a:hover {
    color: #747bff;
  }

  button {
    background-color: #f9f9f9;
  }
}

/* header */
#header-container {
  width: 100vw;
  background-color: black;
}

.header {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 1rem;
  width: clamp(320px, 100%, 1680px);
  margin: 0 auto;
}

.header a {
  display: inline-flex;
  align-items: center;
}

.header-logo {
  filter: invert();
  width: 20px;
  height: 20px;
  object-fit: contain;
}

@media (min-width: 1680px) {
  .header {
    padding-right: 0; /*выравниваем по правому краю главной картинки в hero-блоке*/
  }
}

/* nav */
#nav-container {
  width: 100vw;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 2.5rem;
  padding: 0.25rem 1rem;
  position: relative;
  width: clamp(320px, 100%, 1680px);
  margin: 0 auto;
}

.nav-logo-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
}

.nav-logo {
  vertical-align: middle;
}

.nav-country {
  margin-left: auto;
  margin-right: 15vw;
  cursor: pointer;
}

.nav-country-text {
  font-size: 14px;
  font-weight: 500;

  &:hover {
    color: #5ad0cb;
  }
}

.nav-country-logo {
  margin-left: 8px;
  width: 20px;
}

/* nav. модалка */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

@media (prefers-color-scheme: dark) {
  .modal-content {
    background: rgb(44, 43, 43);
  }
}

.modal-title {
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
}

.countries-container {
  display: flex;
  gap: 2rem;
}

.countries-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.country-item:hover {
  background-color: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  .country-item:hover {
    background-color: inherit;
  }

  .country-item span:hover {
    opacity: .5;
  }
}

.country-flag {
  width: 1.8rem;
  height: 1.2rem;
  object-fit: cover;
}

/* nav. адаптив */
@media (max-width: 480px) {
  .nav-logo-container {
    position: static;
    transform: none;
  }

  .nav-country {
    margin-right: 0;
  }

  .modal-content {
    width: 85%;
    padding: 1.5rem;
  }

  .countries-container {
    flex-direction: column;
    gap: 0.8rem;
  }
}

/* hero */
#hero-container {
  width: 100vw;
}

.hero-block {
  display: flex;
  flex-direction: column;
  width: clamp(320px, 100%, 1680px);
  margin: 0 auto;
}

.hero-img-desk {
  width: 100%;
}

.hero-inner {
  margin: 0 0 20px 0;
}

@media screen and (max-width: 480px) {
  .half_screen {
    flex-direction: column;
  }

  .hero-inner {
    margin: 0px 0 10px 0;
  }
}

/* infoblock */
#infoblock-container {
  width: 100vw;
}

.infoblock {
  display: flex;
  justify-content: center;
  gap: 1rem;
  width: clamp(320px, 100%, 1680px);
  margin: 3rem auto 5rem;
}

.infoitem {
  width: calc(100% / 6); /* чтобы в линию на десктопе поместилось 6 элементов*/
  border-radius: 16px;
  padding-bottom: 1.5rem;
  transition: box-shadow 0.3s ease; /* добавляем плавный переход */
  background-color: #fff;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.infoitem:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: scale(1.01);
  cursor: pointer;
}

.infoitem__image {
  width: 100%;
  border-radius: 16px 16px 0 0;
}

.infoitem__title {
  font-weight: bold;
  width: 65%;
  margin: 1.5rem 0;
}

.infoitem__description {
  width: 80%;
}

/* infoblock. темная тема */
@media (prefers-color-scheme: dark) {
  .infoitem {
    background-color: transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.15);
  }
}

/* infoblock. адаптив */
@media (max-width: 1024px) {
  .infoitem {
    width: calc(100% / 5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.15);
    padding-bottom: 3rem;
  }

  .infoitem__title {
    width: 85%;
  }
}

@media (max-width: 480px) {
  .infoblock {
    flex-direction: column;
    width: 90%;
    gap: 2.5rem;
  }

  .infoitem {
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.15);
    padding-bottom: 3rem;
  }

  .infoitem__title {
    width: 60%;
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 2rem;
  }

  .infoitem__description {
    width: 50%;
  }
}

/* reasons */
#reasons-container {
  width: 100vw;
}

.reasons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  width: clamp(320px, 100%, 1680px);
  margin: 3rem auto;
}

.reasons-title {
  font-size: 2.5rem;
  font-weight: 400;
  margin: 0 0 3.5rem;
}

.reasons-items-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.reasons-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: calc(100% / 6); /* чтобы в линию на десктопе поместилось 6 элементов*/
  padding-bottom: 1.5rem;
  cursor: pointer;
}

.reasons-item__image {
  height: 80px;
}

.reasons-item__title {
  font-weight: bold;
  width: 55%;
  margin: 1.5rem 0;
}

.reasons-item__description {
  width: 80%;
}

@media (prefers-color-scheme: dark) {
  .reasons-item__image {
    filter: brightness(0) invert(1);
  }
}

/* reasons. адаптив */
@media (max-width: 1024px) {
  .reasons-item {
    width: calc(100% / 5);
    padding-bottom: 3rem;
  }

  .reasons-item__title {
    width: 85%;
  }
}

@media (max-width: 480px) {
  .reasons {
    flex-direction: column;
    width: 90%;
  }

  .reasons-items-container {
    flex-direction: column;
  }

  .reasons-item {
    width: 100%;
    padding-bottom: 3rem;
  }

  .reasons-item__title {
    width: 60%;
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 2rem;
  }

  .reasons-item__description {
    width: 60%;
  }
}

/* partnership */
#partnership-container {
  width: 100vw;
}

.partnership-block {
  background-color: black;
  color: white;
  padding: 2.5rem 0 4.5rem;
}

.partnership-title {
  font-size: 2.5rem;
  font-weight: 400;
}

.partnership-description {
  width: 33%;
  margin: 1rem auto 3rem;
}

.partnership-block button {
  font-size: 1.5rem;
}

.black-button-hover {
  padding: 0.5rem 2.5rem;
  color: white;
  border: none;
  border-radius: 30px;
  background-color: transparent;
  outline: 2px solid white;
  cursor: pointer;
}

.black-button-hover:hover {
  background-color: rgb(116, 216, 216);
  outline: none;
}

/* partnership. адаптив */
@media (max-width: 480px) {
  .partnership-title {
    font-size: 1.5rem;
    width: 70%;
    margin: 0 auto 2rem;
    line-height: 0.9;
  }

  .partnership-description {
    width: 90%;
    font-size: 0.8rem;
  }
}
