@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --light-blue: #e8f1ff;
  --blue: #0020bf;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  position: relative;
  user-select: none;
}

/* ------------------
HEADER
------------------ */

.head-bar {
  width: 100%;
  min-height: 3.5rem;
  background-color: var(--light-blue);
  position: sticky;
  top: 0;
  /* margin-top: 2rem; */
  display: flex;
  padding: 0 max(3rem, 10%);
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.home-logo img {
  height: 2.8rem;
  position: relative;
  top: 0.1rem;
}

.navbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  color: var(--blue);
  margin-left: 4rem;
  justify-content: center;
}

.nav-menu {
  flex: 1 1 auto;
  text-align: center;
  padding: 0 2rem;
}

.nav-btn {
  display: inline;
}

.nav-btn.active {
  font-weight: 800;
}

.home-logo img,
.nav-btn {
  cursor: pointer;
  transition: all 0.3s;
}

.home-logo img:hover,
.nav-btn:hover {
  transform: scale(1.05);
  font-weight: 800;
}

/* ------------------
MAIN
------------------ */

.title {
  font-size: min(4rem, 7vw);
  font-weight: 900;
  color: var(--blue);
}

.description {
  line-height: 1.6;
  font-size: max(1.1rem, 0.9vw);
  text-align: justify;
  margin-top: 2rem;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

#about-block,
#services-block,
#contact-block {
  display: grid;
  grid-template-columns: 1fr;
  place-content: center;
  min-height: 90vh;
  width: 100vw;
}

/* ------------------
HOME
------------------ */

.main-logo {
  display: block;
  width: min(70vw, 45rem);
  margin: 10rem auto min(5rem, 10vh);
  text-align: center;
}

.welcome-block {
  margin: 3rem auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 90%;
}

.bar {
  height: 3px;
  flex: 1 0 auto;
  background-color: var(--blue);
}

.animation-field {
  height: 3rem;
  width: 100vw;
  position: absolute;
  bottom: 5.5rem;
  overflow: hidden;
}

.home-truck {
  height: 3.5rem;
  position: relative;
  bottom: 0;
  animation: truck 5s linear infinite;
  left: -5vw;
}

@keyframes truck {
  0% {
    left: -10vw;
  }
  10% {
    left: -10vw;
  }
  100% {
    left: 100vw;
  }
}

/* ------------------
ABOUT
------------------ */

#about-block {
  width: min(80rem, 80vw);
  margin: 0 auto;
  padding: 3rem 0 8rem;
  display: flex;
  gap: 3rem;
  flex-direction: row;
  flex-wrap: wrap-reverse;
}

.photos {
  flex: 1 1 20rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.about-photo {
  width: 100%;
}

.about-text {
  flex: 20 1 20rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.description span {
  font-weight: 700;
}

/* ------------------
SERVICE
------------------ */

#services-block {
  width: min(85rem, 65vw);
  margin: 0 auto;
  padding: 3rem 0 8rem;
}

.title-block {
  text-align: center;
}

.subtitle {
  font-weight: 600;
  line-height: 1.5;
  font-size: clamp(1.2rem, 1.5rem, 2vw);
}

.card-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
  margin-top: 5rem;
}

.card {
  background-color: var(--light-blue);
  padding: 2rem;
  border-radius: 1.5rem;
  text-align: center;
  color: var(--blue);
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 800;
  min-height: 4.5rem;
  display: grid;
  place-content: center;
}

.card img {
  height: 3rem;
  margin: 0 auto 1rem;
}

.card-description {
  flex: 1 0 auto;
  line-height: 1.5;
  font-size: 1.15rem;
}

/* ------------------
SERVICE
------------------ */

#gallery-block {
  width: min(85rem, 80vw);
  margin: 0 auto;
  padding: 3rem 0 8rem;
  display: grid;
  grid-template-columns: 1fr;
}

#gallery-block .title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  grid-auto-rows: 15rem;
  gap: 1rem;
}

.grid-cell {
  border: solid 5px var(--blue);
  border-radius: 1rem;
  cursor: zoom-in;
  transition: 0.5s;
  overflow: hidden;
}

.cell-img {
  width: 100%;
  height: 100%;
  background-position: bottom;
  background-repeat: no-repeat;
  background-size: cover;
  transition: 0.5s;
}

.cell-img:hover {
  transform: scale(1.1);
}

/* ------------------
CONTACT
------------------ */
#contact-block {
  width: 100%;
  margin: 0 auto;
  padding: 3rem 0 8rem;
  text-align: center;
}

.contact-grid {
  display: flex;
  row-gap: 2rem;
  margin-top: 2rem;
}

.left-block,
.right-block {
  padding: 0 min(8rem, 7vw);
  flex: 1 1 0;
}

#contact-block .subtitle {
  margin-bottom: min(3.5rem, 3vw);
}

.contact-logo {
  width: clamp(23rem, 38vw, 33rem);
}

.contacts {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1.5rem auto;
  gap: 0.5rem;
  grid-template-rows: 2rem 2rem;
  justify-content: center;
  align-items: center;
  font-size: min(1.7rem, 6vw);
  text-align: left;
}

.contacts p {
  user-select: text;
  font-size: clamp(1.2rem, 1.5rem, 2vw);
}

.vertical-bar {
  background-color: var(--blue);
  flex: 0 0 3px;
}

/* ------------------
MODAL
------------------ */
dialog {
  background-color: transparent;
  z-index: 3;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px);
  border: none;
  place-content: center;
  padding-top: 5rem;
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fullsize-img {
  position: relative;
}

dialog img {
  border: 5px solid var(--blue);
  border-radius: 1rem;
  max-width: 80vw;
  max-height: 70vh;
}

dialog button {
  position: absolute;
  top: 2rem;
  right: 2rem;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1.5rem;
  background-color: var(--blue);
  font-family: "Montserrat", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
}

/* ------------------
FORM
------------------ */

form {
  background-color: var(--light-blue);
  padding: 2rem;
  border-radius: 1rem;
  width: min(45rem, 100%);
  margin: 0 auto;
  display: grid;
  text-align: left;
}

form label {
  color: var(--blue);
  font-weight: 700;
}

form input,
form button,
form textarea {
  border: 3px solid var(--blue);
  width: 100%;
  margin: 0.3rem auto 1rem;
  border-radius: 1.25rem;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
}

form input,
form button {
  height: 2.5rem;
  padding: 0 0.7rem;
}

form input:focus,
form textarea:focus {
  outline: none;
}

form textarea {
  min-height: 8rem;
  padding: 0.5rem 0.7rem;
  resize: none;
  line-height: 1.4;
}

form button {
  border: none;
  background-color: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

form button:hover {
  background-color: #1038ff;
}

form button:focus,
form button:focus-visible {
  outline: none;
}

form textarea::-webkit-scrollbar {
  width: 1rem;
}

/* Track */
form textarea::-webkit-scrollbar-track {
  box-shadow: none;
  border-radius: 10px;
  margin: 1rem;
}

/* Handle */
form textarea::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 20px;
}

/* Handle on hover */
form textarea::-webkit-scrollbar-thumb:hover {
  background: #1038ff;
}

/* ------------------
FOOTER
------------------ */

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 5.5rem;
  padding: 1rem max(3rem, 10%);
  background-color: var(--blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #fff;
}

.left-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: 3rem;
}

/* ------------------
MEDIA QUERY
------------------ */

@media screen and (max-width: 1020px) {
  .contact-grid {
    flex-direction: column;
  }
  .nav-menu {
    padding: 0 1.5rem;
  }
}

@media screen and (max-width: 700px) {
  .head-bar {
    flex-direction: column;
    margin-top: 0;
    padding: 1rem 0 0;
  }
  .navbar {
    margin: 0;
    border-top: var(--blue) solid 2px;
    width: 100%;
    padding: 1rem 3rem;
    justify-content: space-between;
  }
  .nav-menu {
    text-align: center;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    grid-auto-rows: 7rem;
  }
}

@media screen and (max-width: 550px) {
  .navbar {
    flex-direction: column;
    padding: 0.5rem;
  }
  .nav-menu {
    flex: 0 0 2rem;
    justify-items: center;
    line-height: 2;
  }
  .animation-field {
    bottom: 7rem;
  }
  footer {
    flex-direction: column;
    height: 7rem;
  }
  .right-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
  }
}
