@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400&display=swap');

:root {
  /*========== Colors ==========*/
  --primary-color: #fff;
  --secondary-color: #2f2f2f;
  --accent-color: #232323;

  /*========== Font and typography ==========*/
  --body-font: 'Roboto', sans-serif;

  --big-font-size-1: 72px;
  --big-font-size-2: 56px;
  --big-font-size-3: 48px;
  --normal-font-size-1: 36px;
  --normal-font-size-2: 32px;
  --normal-font-size-3: 30px;
  --small-font-size-1: 18px;
  --small-font-size-2: 15px;
  --small-font-size-3: 14px;

  /*========== Font weight ==========*/
  --font-thin: 100;
  --font-light: 300;
  --font-regular: 400;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/*==================== BASE ====================*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* border: 1px solid red; */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size-2);
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: var(--font-thin);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
}

textarea,
input {
  width: 100%;
  font-style: italic;
  border: 0;
  outline-width: 0;
}

/*==================== LAYOUT ====================*/
.wrapper {
  width: 100%;
  overflow: hidden;
}

.header {
  width: 100%;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: rgba(0, 0, 0, 0.5);
}

.icon {
  width: 32px;
  height: 32px;
}

/*==================== NAV ====================*/
.nav {
  width: 100%;
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0px 20px;
}

.nav__menu {
  position: fixed;
  right: -100%;
  top: 0;
  width: 35%;
  height: 100%;
  background-color: var(--accent-color);
  box-shadow: -10px 0 10px -10px rgba(0, 0, 0, 0.5);
  transition: all 1s ease 0s;
}

.nav__logo,
.nav__socials,
.nav__toggle {
  color: var(--primary-color);
  cursor: pointer;
}

.nav__list {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.nav__link {
  display: flex;
  font-size: var(--normal-font-size-1);
  color: var(--primary-color);
  font-weight: var(--font-light);
  opacity: 1;
}

.nav__link:hover {
  opacity: 0.8;
}

.nav__link > span {
  padding: 15px 20px;
}

.nav__link > span::after {
  content: '';
  display: block;
  width: 50%;
  height: 1px;
  border-radius: 5px;
  opacity: 1;

  background-color: #fff;

  position: relative;
  top: 100%;
  left: 0;
  margin: 0 auto;
  z-index: var(--z-tooltip);

  transition: all 0.5s ease;
}

.nav__link > span:hover::after {
  width: 100%;
}

.nav__close {
  position: absolute;
  top: 30px;
  right: 20px;
  font-size: var(--normal-font-size-1);
  cursor: pointer;
  color: var(--primary-color);
  z-index: 999;
  transition: all 0.5s linear;
}

.nav__close:hover {
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

.nav__btns {
  width: 250px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* show menu */
.show-menu {
  right: 0;
}

/*==================== HOME + SLIDER ====================*/
.home__container {
  width: 100%;
  display: flex;
}

.slide {
  height: 100vh;
  flex: 1;
  cursor: pointer;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  transition: all 500ms ease-in-out;
}

.slide::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  transition: all 0.5s ease 0s;
}

.slide.active::before {
  background-color: rgba(0, 0, 0, 0);
}

.slide h3 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  margin: 0;
  opacity: 0;
  font-size: var(--normal-font-size-1);
  font-weight: var(--font-light);
}

.slide p {
  position: absolute;
  bottom: -5%;
  left: 20px;
  right: 20px;
  font-size: var(--normal-font-size-3);
  text-align: justify;
  opacity: 0;
  visibility: hidden;
  transition: all 0.7s ease-in-out 0.2s;
}

.slide.active {
  flex: 2;
}

.slide.active h3 {
  opacity: 1;
  transition: all 0.7s ease-in-out 0.2s;
}

.slide.active:hover h3 {
  bottom: 350px;
  left: 20px;
  opacity: 1;
}

.slide.active:hover p {
  bottom: 80px;
  left: 20px;
  opacity: 1;
  visibility: visible;
}

/*==================== PREVIEW ====================*/
.preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.preview__container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.preview__card {
  display: flex;
}

.preview__card:nth-child(1) {
  margin-top: -100px;
}

.preview__card:nth-child(2) {
  margin-top: -80px;
}

.preview__card:nth-child(3) {
  margin-top: -50px;
}

.preview__card:nth-child(4) {
  margin-top: 100px;
}

.preview__card:nth-child(5) {
  margin-left: 100px;
}

.preview__card:nth-child(6) > .preview__img > .prev-image {
  width: 1000px;
}

.preview__card:nth-child(7) {
  margin-top: 50px;
  margin-left: -100px;
}

.preview__title {
  text-align: center;
  font-size: var(--big-font-size-2);
  font-weight: var(--font-thin);
  margin: 150px 0px;
}

.prev-image {
  height: 800px;
  width: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.preview__description {
  margin-top: 30px;
}

.preview__data {
  color: #565656;
  font-size: var(--small-font-size-1);
  font-weight: var(--font-regular);
}

.preview__subtitle {
  margin-top: 10px;
  font-size: var(--normal-font-size-3);
  font-weight: var(--font-light);
}
/*==================== CONTACT ====================*/
.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

.contact__title {
  margin-top: 100px;
  font-size: var(--big-font-size-1);
  font-weight: var(--font-light);
}

.contact__subtitle {
  margin-top: 15px;
  font-size: var(--big-font-size-3);
  font-weight: var(--font-thin);
}

.contact__button {
  padding: 20px 40px;
  margin: 100px 0px;
  font-size: var(--small-font-size-2);
  font-weight: var(--font-regular);
  text-transform: uppercase;
  border: 1px solid var(--accent-color);
  transition: all 0.5s ease-in-out 0s;
  cursor: pointer;
}

.contact__button:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}
/*==================== CAR ====================*/
.car__container {
  display: flex;
  flex-direction: row;
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.car__image {
  height: 100vh;
  width: 50%;
  background-position: left;
  background-size: cover;
  background-repeat: no-repeat;
}

.car__description {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin: 0px 50px;
}

.car__description > p {
  margin-top: 25px;
}

.car__props {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.car__block-left {
  width: 60%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 50px;
}

.car__props-title {
  font-weight: var(--font-regular);
}

.car__props-text {
  margin: 50px 0px;
}

.car__props-image {
  height: 100vh;
  width: 40%;
  background-position: left;
  background-size: cover;
  background-repeat: no-repeat;
}

.car__info {
  width: 100%;
  margin: 20px 0px;
  font-size: var(--small-font-size-1);
}

.car__info-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info__bar,
.info__percentage {
  height: 5px;
  border-radius: 4px;
}

.info__number {
  padding: 5px;
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.info__bar {
  background-color: var(--primary-color);
}

.info__percentage {
  display: block;
  background-color: var(--accent-color);
}

.car-speed {
  width: 80%;
}

.car-power {
  width: 90%;
}

.car-style {
  width: 100%;
}

/*==================== CONTACTS ====================*/
.form {
  width: 70%;
  margin-top: 50px;
}

.contact__inputs {
  width: 100%;
  display: flex;
  flex-direction: row;
}

.contact__item {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 25px;
}

.contact__item > input,
.contact__item > textarea {
  padding-bottom: 25px;
  border-bottom: 1px solid #565656;
}
/*==================== GALLERY ====================*/
.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

/*==================== FOOTER ====================*/
.nav__list > footer {
  text-align: center;
}
.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 0px;
  background-color: var(--accent-color);
  font-size: var(--small-font-size-1);
  color: var(--primary-color);
}

/*==================== TOOLTIPS ====================*/
.tooltip::after {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px 8px 8px 0px;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: var(--small-font-size-1);
  content: attr(data-tooltip);
  margin-top: 40px;
  opacity: 0;
  padding: 3px 7px;
  position: absolute;
  visibility: hidden;

  transition: all 0.4s ease-in-out;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* animation */

.element-animation {
  /* Скроем элемент в начальном состоянии */
  opacity: 0;
  transform: translateY(20px);
}

.element-animation.element-show {
  opacity: 1;
  transition: all 1.5s;
  transform: translateY(0%);
}

/* .nav__close:hover {
  animation-name: spin;
  animation-duration: 1.5s;
  animation-iteration-count: 1;
} */

/* @keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  100% {
    transform: rotate(-180deg);
  }
} */

/*==================== MEDIA QUARIES ====================*/
@media (min-width: 320px) and (max-width: 768px) {
  .slide p {
    font-size: var(--small-font-size-3);
    text-align: center;
  }

  .slide.active {
    flex: 50%;
  }

  .slide h3 {
    text-align: center;
  }

  .slide.active:hover h3 {
    bottom: 260px;
  }

  .slide.active:hover p {
    bottom: 80px;
    left: 20px;
    opacity: 1;
    visibility: visible;
  }

  .nav__logo {
    text-align: center;
  }

  .nav__menu {
    width: 100%;
  }

  .preview__title {
    font-size: var(--normal-font-size-2);
    margin: 50px 0px;
  }

  .preview {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .preview__container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .preview__img {
    width: 100%;
  }

  .preview__card {
    display: flex;
  }

  .preview__card:nth-child(1),
  .preview__card:nth-child(2),
  .preview__card:nth-child(3),
  .preview__card:nth-child(4) {
    margin-top: 0px;
  }

  .preview__card:nth-child(5) {
    margin-left: 0px;
  }

  .preview__card:nth-child(6) > .preview__img > .prev-image {
    width: 100%;
  }

  .preview__card:nth-child(7) {
    margin-top: 0px;
    margin-left: 0px;
  }

  .prev-image {
    height: 50vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .preview__description {
    text-align: center;
    margin-top: 10px;
  }

  .preview__data {
    font-size: var(--small-font-size-2);
  }

  .preview__subtitle {
    margin-top: 5px;
    font-size: var(--small-font-size-1);
  }

  .contact__title {
    margin-top: 50px;
    font-size: var(--normal-font-size-2);
  }

  .contact__subtitle {
    margin-top: 15px;
    font-size: var(--normal-font-size-3);
  }

  .contanct__button {
    margin: 20px 0px;
  }

  /*==================== CAR ====================*/
  .car__container {
    flex-direction: column;
  }

  .car__image {
    height: 50vh;
    width: 100%;
  }

  .car__description {
    width: 100%;
    margin: 0px 5px;
  }

  .car__description > p {
    margin-top: 10px;
    padding: 0px 10px;
  }

  .car__props {
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
  }

  .car__block-left {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
  }

  .car__props-title {
    font-weight: var(--font-regular);
    padding: 0px 10px;
  }

  .car__props-text {
    margin: 15px 0px;
    padding: 0px 10px;
  }

  .car__props-image {
    height: 50vh;
    width: 100%;
  }

  .car__info {
    width: 100%;
    margin: 20px 0px;
    padding: 0px 10px;
  }

  /*==================== CONTACTS ====================*/
  .form {
    width: 100%;
    margin-top: 25px;
    padding: 0px 10px;
  }

  .contact__inputs {
    flex-direction: column;
  }

  .contact__item {
    padding-left: 0px;
  }

  /*==================== GALLERY ====================*/
  .gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .footer {
    text-align: center;
    padding: 25px 0px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .nav__menu {
    width: 50%;
  }

  .slide.active:hover h3 {
    bottom: 500px;
  }

  .preview__title {
    margin: 50px 0px;
  }

  .preview__description {
    text-align: center;
    margin-top: 10px;
  }

  .preview__card:nth-child(1),
  .preview__card:nth-child(2),
  .preview__card:nth-child(3),
  .preview__card:nth-child(4) {
    margin-top: 10px;
  }

  .preview__card:nth-child(5) {
    margin-left: 0px;
  }

  .preview__card:nth-child(7) {
    margin-top: 0px;
    margin-left: 0px;
  }

  .contanct__button {
    margin: 50px 0px;
  }

  .contact__inputs {
    flex-direction: row;
  }

  .form {
    width: 100%;
    padding: 0px 10px;
  }

  .contact__item {
    padding-left: 10px;
  }
}
