* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  scroll-behavior: smooth;
  scroll-padding-top: 122px;
}

body {
  font-family: sans-serif;
  font-size: 18px;
}

/* ===== menu ===== */
.header {
  position: fixed;
  width: 100%;
  background: #fa8d8d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

.burger {
  display: none;
}

.links {
  display: flex;
  list-style-type: none;
  gap: 12px;
}

.link {
  position: relative;
  text-decoration: none;
  text-transform: capitalize;
  color: #fff;
  transition: opacity 0.3s;
}

.link:hover {
  opacity: 0.8;
}

.link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  display: block;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s;
}

.link:hover::after {
  width: 100%;
}

.logo {
  width: 60px;
  height: 50px;
  border-radius: 50%;
}

.section {
  padding: 0 32px;
}

#home {
  padding-top: 100px;
  display: flex;
  justify-content: space-between;
  height: 100vh;
  margin-bottom: 64px;
  gap: 16px;
}

.title {
  font-size: 48px;
}

.home-img {
  width: 500px;
  border-radius: 20px;
  object-fit: cover;
}

.text-box .title {
  margin-bottom: 32px;
}

#home .text-box .description {
  max-width: 500px;
}

#home .text-box {
  align-self: center;
}

/* gallery */

#gallery {
  margin-bottom: 64px;
}

#gallery .title {
  margin-bottom: 32px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.grid__img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

/* ===== card ===== */
.card {
  display: flex;
  flex-direction: column;
  width: 400px;
  border: 1px solid black;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  transition: transform 0.3s;
}
.card:hover {
  transform: scale(1.05);
}
.card__title {
  margin: 16px 0;
  font-size: 24px;
}
.card__description {
  color: #858585;
  margin-bottom: 16px;
}
.card__img {
  border-radius: 8px;
}
.card__btn {
  width: fit-content;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  background: #fa8d8d;
  color: white;
  border: none;
  transition: background 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
}

.card__btn:hover {
  background: #000;
  transform: scale(1.05);
}
.card__btn:active {
  background: #5b5b5b;
  transform: scale(0.95);
}

.card__btn .arrow-right {
  fill: #fff;
  margin-left: 8px;
  transition: transform 0.3s;
}

.card__btn:hover .arrow-right {
  transform: translateX(8px);
}

#about .title {
  margin-bottom: 32px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
}

#about {
  margin-bottom: 64px;
}

/* ======= form ======== */
#form {
  display: grid;
}

#form .title {
  text-align: center;
}

.form {
  background: #e8e7e7;
  width: 400px;
  border-radius: 16px;
  padding: 16px;
  transition: transform 0.3s;
  margin: 32px 0;
  justify-self: center;
  display: flex;
  flex-direction: column;
}

.form:hover {
  transform: scale(1.05);
}

#name,
#phone {
  margin-bottom: 12px;
  margin-top: 8px;
  border-radius: 10px;
  padding: 12px;
  border: none;
}

input::placeholder {
  color: #858585;
}

input:focus {
  outline-color: #fa8d8d;
}

/* ====== contacts section ========= */
.contact {
  background: #e8e7e7;
  border-radius: 16px;
  padding: 12px 24px;
  width: fit-content;
  display: flex;
  align-items: center;
  color: #000;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s, color 0.3s;
  font-size: 20px;
}

.contact:hover {
  background: #5b5b5b;
  transform: scale(1.05);
  color: #fff;
}

.contacts {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact .icon {
  margin-right: 8px;
}

#contacts .title {
  margin-bottom: 50px;
}

#contacts {
  margin-bottom: 64px;
}

/* ======== footer ====== */
.footer {
  text-align: center;
  border-radius: 10px;
  background: #5b5b5b;
  margin: 0 20px 32px;
  padding: 20px 24px;
  color: #fff;
}

/* ======== media queries ====== */
@media (max-width: 800px) {
  #home {
    flex-direction: column-reverse;
    justify-content: space-evenly;
    align-items: center;
  }

  .home-img {
    width: 100%;
    max-width: 500px;
  }

  .title {
    font-size: 28px;
  }

  #home .description {
    font-size: 14px;
  }
}

@media (max-width: 426px) {
  .header .nav {
    padding: 8px;
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    background: #fa8d8d;
    transform: translateX(100%);
    transition: transform 0.3s;
  }

  .header .nav.active {
    transform: translateX(0);
  }

  .header .burger {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
  }

  .header .burger .stick {
    position: absolute;
    background: #fff;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.3s;
  }

  .header .burger.active .stick {
    background: transparent;
  }

  .header .burger .stick::before {
    content: "";
    position: absolute;
    background: #fff;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    transform: translateY(-12px);
    left: 0;
    transition: transform 0.3s;
  }

  .header .burger .stick::after {
    content: "";
    position: absolute;
    background: #fff;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    transform: translateY(12px);
    left: 0;
    transition: transform 0.3s;
  }

  .header .burger.active .stick::before {
    transform: rotate(45deg);
  }

  .header .burger.active .stick::after {
    transform: rotate(-45deg);
  }

  .header .links {
    flex-direction: column;
  }

  #gallery .grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }

  #about .card {
    width: 100%;
  }

  #about .card__title {
    font-size: 18px;
  }

  #about .card__description {
    font-size: 14px;
  }

  #order-form {
    width: 100%;
    max-width: 400px;
  }

  #order-form .label {
    font-size: 16px;
  }

  #contacts .contact {
    font-size: 16px;
  }

  #contacts .contacts {
    gap: 16px;
  }

  .footer {
    font-size: 14px;
  }
}
