:root {
  --header-container-template: 78px 1fr;
}

* {
  box-sizing: border-box;
}

@keyframes modalopen {
  from {
    opacity: 0;
    transform: translateY(-60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

html {
  background-color: #eaf1ff;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  min-height: 100dvh;
}

.main {
  flex: 1;
}

picture {
  display: block;
}

a {
  text-decoration: none;
  color: currentColor;
}

img {
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.container {
  max-width: 1240px;
  width: 100%;
  padding-inline: 20px;
  margin-inline: auto;
}

/* HEADER */
.header {
  padding-block: 8px;
}

.header__container {
  display: grid;
  align-items: center;
  grid-template-columns: var(--header-container-template);
  gap: 20px;
}

.header__navigation {
  display: flex;
  justify-content: center;
}

.header__navigation-list {
  display: flex;
  gap: 40px;
}

/****************/

/* MAIN  */

.hero-section {
  padding-block: 20px 40px;
}

.hero-section__container {
  display: grid;
  gap: 20px;
}

.hero-section__buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  max-width: 290px;
  width: 100%;
  margin-inline: auto;
  gap: 10px;
}

.advantages-section__container {
  display: grid;
  gap: 26px;
}

.advantages-section__image img {
  width: 100%;
}

.advantage-list {
  display: grid;
  gap: 22px;
}

.advantage-list__item {
  display: grid;
  gap: 15px;
  align-items: center;
  grid-template-columns: 60px 1fr;
}

.advantage-list__logo {
  width: 60px;
  height: 60px;
}

.services-section {
  padding-block-start: 45px;
  overflow: hidden;
}

.services-section__title {
  margin-block-end: 20px;
}

.services-section__title img {
  width: 200px;
}

.services__row {
  display: grid;
  gap: 16px;
}

.warranty-section {
  padding-block-start: 40px;
}

.warranty-section__inner {
  background-color: #435478;
  border-radius: 20px;
  padding: 38px 20px 25px;
  display: grid;
  gap: 15px;
}

.contacts-section {
  padding-block: 22px 35px;
}

.contacts-section__container {
  display: grid;
  gap: 10px;
}

.contacts-section__title img {
  width: 265px;
}

.contacts__list {
  display: grid;
  gap: 15px;
}

.contacts__item {
  background-color: #435478;
  border-radius: 15px;
  padding: 15px;
  display: grid;
  gap: 4px;
}

.contacts__item picture:nth-child(1) img {
  width: 156px;
}

.contacts__item picture:nth-child(2) img {
  width: 145px;
}

.contacts__item picture:nth-child(3) img {
  width: 306px;
}

.contacts-section__image img {
  width: 100%;
}

.about-section {
  padding-block: 20px;
}

.about-section img {
  width: 100%;
}

.map {
  max-height: 518px;
  height: 52vw;
  min-height: 500px;
}

.carousel-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.carousel {
  overflow: hidden;
  margin-block-end: 20px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 calc(100% / 1);
  width: 380px;
  max-width: 100%;
}

.carousel-slide img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.carousel-slide img:hover {
  transform: scale(1.005);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.carousel-prev,
.carousel-next {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: #3498db;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: #2980b9;
  transform: scale(1.1);
}

.carousel-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background-color: transparent;
  border: 2px solid #212121;
}

.carousel-dot.active {
  background-color: #212121;
}

.carousel-slide {
  animation: fadeIn 0.5s ease;
}

.modal-btn {
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(48, 48, 48, 0.8);
  backdrop-filter: blur(9px);
}

.modal-menu .modal-content {
  display: grid;
  gap: 20px;
}

.modal-navigation {
  display: grid;
  justify-content: center;
  gap: 10px;
}

.modal-navigation__link {
  display: flex;
  gap: 40px;
}

.link-pointer {
  cursor: pointer;
}

#modal2 {
  z-index: 777;
}

.modal-content {
  position: relative;

  background-color: #eaf1ff;
  margin: 5% auto;
  padding: 35px 25px 50px;
  border-radius: 30px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0px 4px 10.3px 0px #00000012 inset;
  animation: modalopen 0.4s;
}

.modal-close-button {
  position: absolute;
  inset-block-start: 30px;
  inset-inline-end: 30px;
  transition: opacity 0.3s linear;
  cursor: pointer;
}

.modal-close-button:hover {
  opacity: 0.7;
}

form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

input,
textarea,
#submitBtn {
  border: 1px solid #303030;
  color: #8e99ab;
  font-size: 18px;
  font-family: 'Inter';
  border-radius: 30px;
  line-height: 50px;
  height: 50px;
  max-width: 100%;
  padding-left: 20px;
  letter-spacing: 0.01em;
  background: transparent;
  font-family: 'Sansation', sans-serif;
}

#submitBtn {
  background: #303030;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

textarea {
  min-height: 150px;
}

/* FOOTER */

.footer {
  padding-block: 60px;
  background-color: #435478;
}

.social-list {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-block-end: 20px;
}

/****************/

/* MEDIA QUERIES */

@media screen and (max-width: 767px) {
  .mobile-hide {
    display: none;
  }
}

@media screen and (min-width: 768px) {
  .desktop-hide {
    display: none;
  }

  .hero-section {
    padding-block: 60px 30px;
  }

  .hero-section__container {
    gap: 40px;
  }

  .hero-section__buttons {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    gap: 30px;
  }

  .services-section {
    padding-block-start: 65px;
  }

  .services-section__title {
    margin-block-end: 30px;
  }

  .services-section__title img {
    width: auto;
  }

  .services {
    display: grid;
    gap: 16px;
  }

  .warranty-section {
    padding-block-start: 36px;
  }

  .about-section {
    padding-block: 30px;
  }

  .advantage-list {
    gap: 14px;
  }

  .advantages-section__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .advantage-list__item {
    padding-block: 4px;
  }

  .advantage-list__text {
    width: 100%;
  }

  .advantage-list__item:nth-child(1) .advantage-list__text {
    max-width: 32.6vw;
  }

  .advantage-list__item:nth-child(2) .advantage-list__text {
    max-width: 29.8vw;
  }

  .advantage-list__item:nth-child(3) .advantage-list__text {
    max-width: 32.6vw;
  }

  .advantage-list__item:nth-child(4) .advantage-list__text {
    max-width: 24.8vw;
  }

  .warranty-section__inner {
    padding: 30px 20px;
  }

  .services__row {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .contacts-section {
    padding-block: 30px 60px;
  }

  .contacts-section__container {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts-section__title {
    margin-block-end: 20px;
  }

  .contacts-section__title img {
    width: auto;
  }

  .contacts__item {
    padding-inline: 30px;
    border-radius: 10px;
  }

  .contacts__item picture:nth-child(1) img,
  .contacts__item picture:nth-child(2) img {
    width: 130px;
  }

  .contacts__item picture:nth-child(3) img {
    width: 282px;
  }

  .contacts-section__content {
    padding-block-start: 16px;
  }

  .contacts__list {
    gap: 20px;
  }
}

@media screen and (max-width: 1023px) {
  .header-small-screen-hide {
    display: none;
  }
}

@media screen and (min-width: 1024px) {
  .header {
    --header-container-template: 180px 1fr 180px;

    padding-block: 18px;
  }

  .header-large-screen-hide {
    display: none;
  }

  .contacts-section__container {
    gap: 30px;
  }

  .carousel-track {
    gap: 30px;
  }
  .carousel-slide {
    flex: 0 0 calc(100% / 3 - 20px);
  }
  .carousel-slide:nth-child(4),
  .carousel-slide:nth-child(7) {
    margin-left: -30px;
  }
  .carousel-dots {
    gap: 15px;
  }

  .carousel-dot {
    width: 25px;
    height: 25px;
  }
}

@media screen and (min-width: 1280px) {
  .advantage-list__item {
    padding: 20px;
    grid-template-columns: 80px 1fr;
  }

  .advantage-list__logo {
    width: 80px;
    height: 80px;
  }

  .contacts__item picture:nth-child(1) img,
  .contacts__item picture:nth-child(2) img {
    width: auto;
  }

  .contacts__item picture:nth-child(3) img {
    width: auto;
  }

  .advantage-list__item:nth-child(1) .advantage-list__text {
    max-width: initial;
    width: auto;
  }

  .advantage-list__item:nth-child(2) .advantage-list__text {
    max-width: initial;
    width: auto;
  }

  .advantage-list__item:nth-child(3) .advantage-list__text {
    max-width: initial;
    width: auto;
  }

  .advantage-list__item:nth-child(4) .advantage-list__text {
    max-width: initial;
    width: auto;
  }

  .carousel-slide {
    flex: 0 0 100%;
  }

  .carousel-controls {
    flex-direction: column;
    gap: 15px;
  }

  .carousel-prev,
  .carousel-next {
    width: 40px;
    height: 40px;
  }

  .wrap {
    max-width: 90%;
  }
  .modal-content {
    margin: 5% auto;
  }
  section.h1 div img {
    max-width: 48%;
  }
  section.h1 div img:nth-child(2) {
    transform: scale(0.85);
  }
}
