/* Define header styles */
header {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 50px;
  width: 100%;
}

.header-menu__container {
  display: none;
}

.header-content {
  justify-content: space-between;
}

.header-block {
  gap: 100px;
}

.header-content {
  padding: 20px 0 26px 0;
}

.header-navigator {
  justify-content: space-between;
  border-top: 1px solid var(--color-border-gray);
  border-bottom: 1px solid var(--color-border-gray);
}

.header-address {
  gap: 16px;
  align-items: center;
}

.header-address > img {
  width: 17px;
}

.header-address > div > p {
  width: 150px;
}

.header-social {
  gap: 6px;
  justify-content: center;
}

.header-social > div {
  gap: 6px;
  justify-content: center;
}

.header-contact {
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Define preview styles */
.preview {
  display: flex;
  align-items: center;

  padding: 0 10%;
  width: 100%;
  height: 100vh;

  background: #000;
  background-image: url(../images/home-preview.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
}

.preview-content {
  width: 450px;
  gap: 16px;
}

.preview-content > h2,
h4 {
  color: white;
  line-height: 1.2em;
}

/* Service group block */

.service-group__list {
  display: grid;
  grid-template-areas:
    "sg1 sg2 sg2 sg2 sg2 sg2 sg3"
    "sg4 sg4 sg4 sg5 sg6 sg6 sg6"
    "sg7 sg7 sg8 sg8 sg8 sg9 sg9";
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.service-group {
  position: relative;
  height: 200px;
  padding: 20px;
}

.service-group > p {
  position: relative;
  z-index: 1;
}

.service-group > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Reasons block */
.reasons__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.reason-card {
  gap: 10px;
}

.reason-card__text {
  gap: 10px;
}

.reason-card__mark,
.reason-card__mark > img {
  height: 22px;
  width: 22px;
}

.reasons__button-container {
  display: flex;
  justify-content: center;
}

/* Map section */

.home-map__container {
  display: grid;
  grid-template-areas:
    "map header"
    "map text";
  border: 2px solid rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  padding: 20px 40px;
  margin-bottom: 40px;
}

.home-map__map {
  grid-area: map;
}

.home-map__header {
  grid-area: header;
  justify-content: center;
  align-items: end;
  padding-bottom: 10px;
}

.home-map__text {
  grid-area: text;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.home-map__links {
  gap: 10px;
}

@media (max-width: 1360px) {
  .header-navigator,
  .header-block__contacts,
  .header-address {
    display: none;
  }

  .header-menu__container {
    display: flex;
    align-items: center;
  }
}

@media (max-width: 920px) {
  .home-map__container {
    grid-template-areas:
      "header"
      "map"
      "text";
    gap: 10px;
  }

  .home-map__header {
    padding-bottom: 0;
  }

  .header-content {
    padding: 10px 0;
  }

  .header-block > a > img {
    height: 56px;
  }
}

@media (max-width: 680px) {
  .service-group__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .service-group:nth-child(n + 4) {
    display: none;
  }
}
