@import url('https://fonts.googleapis.com/css2?family=Exo:wght@500;600;700&display=swap');

:root {
  --header-height: 4rem;

  --first-color: hsl(219, 70%, 55%);
  --first-color-dark: hsl(219, 70%, 40%);
  --title-color: hsl(219, 0%, 90%);
  --text-color: hsl(219, 0%, 65%);
  --body-color: hsl(219, 4%, 4%);
  --container-color: hsl(219, 4%, 8%);

  --body-font: 'Exo', sans-serif;
  --h1-font-size: 2.5rem;
  --h2-font-size: 1.8rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.9rem;
  --tiny-font-size: 0.7rem;

  --font-medium: 500;
  --font-semi: 600;
  --font-bold: 700;
}

@media (max-width: 992px) {
  :root {
    --h1-font-size: 1.8rem;
    --h2-font-size: 1.4rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.9rem;
    --small-font-size: 0.8rem;
    --tiny-font-size: 0.6rem;
  }
}

/* @@@@@@@@@@@@@@@ BASE @@@@@@@@@@@@@@@ */

*,
::after,
::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-decoration: none;
  list-style: none;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
}

main {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-weight: var(--font-bold);
  color: var(--title-color);
}

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

button,
input {
  outline: none;
  border: none;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

button {
  cursor: pointer;
}

/* @@@@@@@@@@@@@@@ CSS REUSABLE CLASSES @@@@@@@@@@@@@@@ */

.container {
  max-width: 1200px;
  width: calc(100% - 3rem);
  margin: 0 auto;
}

.section {
  padding: 7rem 0 2rem;
}

.section-title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: 3rem;
}

.btn {
  display: inline-block;
  background-color: var(--first-color);
  color: var(--title-color);
  padding: 1rem 1.7rem;
  border-radius: 0.2rem;
  transition: 0.3s;
}

.btn:hover {
  background-color: var(--first-color-dark);
}

.card-button {
  position: absolute;
  bottom: 0;
  right: 0;

  background-color: var(--first-color);
  color: var(--title-color);
  display: inline-flex;
  font-size: 1.2rem;
  padding: 0.8rem;
  border-radius: 1rem 0 1rem 0;
  transition: 0.3s;
}

.card-button:hover {
  background-color: var(--first-color-dark);
}

/*@@@@@@@@@@@@@@ HEADER @@@@@@@@@@@@@@*/

.nav__toggle,
.nav__close {
  display: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: 0.3s;
}

/* Change background header */
.scroll-header {
  background-color: var(--body-color);
  box-shadow: 0 3px 3px hsl(0, 0%, 0%);
  border-radius: 0 0 1rem 1rem;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--title-color);
  font-weight: var(--font-bold);
  font-size: 1.1rem;
  transition: 0.3s;
}

.nav__logo:hover,
.footer__logo:hover {
  color: var(--first-color);
}

.nav__logo-img,
.footer__logo-img {
  width: 35px;
  height: 35px;
}

.nav__list {
  display: flex;
  gap: 3rem;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--font-semi);
  position: relative;
}

.nav__link::after {
  position: absolute;
  content: '';
  bottom: -0.5rem;
  right: 0;
  left: 0;
  margin: auto;
  width: 0;
  height: 2px;
  background-color: var(--first-color);
  transition: 0.3s;
}

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

/*@@@@@@@@@@@@@@ HOME @@@@@@@@@@@@@@*/

.home {
  position: relative;
}

.home__shape {
  background: hsl(219, 70%, 15%);
  border-radius: 50%;
  filter: blur(100px);

  position: absolute;
  z-index: -1000;
}

.home__shape-top {
  width: 700px;
  height: 700px;
  top: -7rem;
  left: -7rem;
}

.home__shape-bottom {
  width: 400px;
  height: 400px;
  bottom: -7rem;
  right: -7rem;
}

.home__container {
  padding-top: 9rem;

  display: grid;
  justify-content: center;
  text-align: center;
  gap: 2rem;
}

.home__title {
  font-size: var(--h1-font-size);
  margin-bottom: 1rem;
}

.home__subtitle {
  font-weight: var(--font-medium);
  margin-bottom: 0.2rem;
}

.home__description {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.home__description i {
  color: var(--first-color);
}

.home__img {
  width: 500px;
}

.home__group {
  display: flex;
  justify-content: space-between;
}

.home__group-box {
  display: grid;
}

.home__group-icon {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.home__group-number {
  font-size: var(--h1-font-size);
  font-weight: var(--font-bold);
  color: var(--title-color);
}

.home__group-name {
  font-size: var(--tiny-font-size);
}

.small-circle,
.big-circle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.small-circle {
  width: 80px;
  height: 80px;
  border: 1px solid hsl(158, 90%, 30%);
  color: var(--title-color);
}

.big-circle {
  width: 110px;
  height: 110px;
  border: 3px solid hsl(158, 90%, 30%);
  box-shadow: 0 0 20px hsl(158, 90%, 30%);
  animation: startButton 2s infinite linear;
}

@keyframes startButton {
  0% {
    transform: scale(1);
    box-shadow: 0 0 20px hsl(158, 90%, 30%);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 40px hsl(158, 90%, 30%);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px hsl(158, 90%, 30%);
  }
}

/*@@@@@@@@@@@@@@ ABOUT @@@@@@@@@@@@@@*/

.about__container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 5rem;
}

.about__group {
  position: relative;
  display: flex;
}

.about__img {
  border-radius: 1rem;
}

.about__card {
  background: hsla(0, 0%, 100%, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: 1rem;

  position: absolute;
  right: 0;
  bottom: -3rem;
}

.about__card-title {
  margin-bottom: 0.5rem;
}

.about__card-description {
  font-size: var(--small-font-size);
}

.about__title {
  font-size: var(--h2-font-size);
  margin-bottom: 2rem;
}

.about__description {
  margin-bottom: 2rem;
  line-height: 1.5;
}

/*@@@@@@@@@@@@@@ POPULAR @@@@@@@@@@@@@@*/

.popular .swiper {
  max-width: 992px;
}

.popular .swiper-wrapper {
  margin-bottom: 4rem;
}

.swiper-pagination-bullet {
  background: var(--first-color);
}

.popular__card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 2rem 1.5rem 1.5rem;
  width: 280px;
  display: grid;
  gap: 0.2rem;
  margin: 0 auto;
}

.popular__card:hover .popular__img {
  transform: translateX(-10px);
}

.popular__shape {
  background: hsl(219, 70%, 20%);
  border-radius: 50%;
  filter: blur(80px);
  position: absolute;
  z-index: -100;
}

.popular__shape {
  width: 250px;
  height: 250px;
  top: 0;
  left: 0;
}

.popular__subtitle {
  color: var(--text-color);
  font-weight: var(--font-medium);
  margin-bottom: 0.5rem;
}

.popular__img {
  width: 200px;
  justify-self: end;
  margin-bottom: 1.5rem;
  transition: 0.3s;
}

.popular__specs {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.popular__spec {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--title-color);
  font-size: var(--small-font-size);
}

.popular__spec i {
  font-size: 1.2rem;
}

/*@@@@@@@@@@@@@@ FEATURES @@@@@@@@@@@@@@*/

.features__map {
  position: relative;
  max-width: 765px;
  margin: auto;
}

.features__map-img {
  transform: rotate(-20deg);
}

.features__car {
  position: absolute;
  top: 5rem;
  right: 0;
  left: 0;
  margin: auto;
  width: 200px;
}

.features__card {
  position: absolute;
  background-color: hsla(0, 0%, 100%, 0.1);
  backdrop-filter: blur(15px);
  text-align: center;
  border-radius: 1rem;
  padding: 0.5rem 2.5rem;
  width: 130px;
}

.features__title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.3rem;
}

.features__description {
  font-size: var(--tiny-font-size);
  color: var(--title-color);
}

.features__card-top {
  top: 4rem;
  left: -5rem;
}

.features__card-middle {
  right: -5rem;
  top: 12rem;
}

.features__card-bottom {
  bottom: 5rem;
  left: -5rem;
}

/*@@@@@@@@@@@@@@ FEATURED @@@@@@@@@@@@@@*/

.featured.section {
  padding-top: 0;
  padding-bottom: 4rem;
}

.featured .container {
  /* for layout of cards when we click filters button */
  max-width: 940px;
}

.featured__filters {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

.featured__filter {
  width: 50px;
  height: 50px;
  background-color: var(--container-color);
  border-radius: 0.5rem;
  color: var(--title-color);
  cursor: pointer;
  transition: 0.3s;

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.7rem;
}

.featured__filter img,
.featured__filter span {
  opacity: 0.5;
  transition: 0.3s;
}

.featured__filter:hover {
  background-color: var(--first-color);
}

.featured__filter:hover img,
.featured__filter:hover span {
  opacity: 1;
}

.featured__container {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 3rem;
}

.featured__card {
  position: relative;
  width: 280px;
  background-color: var(--container-color);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-radius: 1rem;

  display: grid;
  row-gap: 0.2rem;
}

.featured__card:hover .featured__img {
  transform: translateX(10px);
}

.featured__subtitle {
  color: var(--text-color);
  font-weight: var(--font-medium);
  margin-bottom: 1.5rem;
}

.featured__img {
  width: 220px;
  margin-bottom: 1.5rem;
  transition: 0.3s;
}

/* Active link featured */
.active-featured {
  background-color: var(--first-color);
}

.active-featured span,
.active-featured img {
  opacity: 1;
}

/*@@@@@@@@@@@@@@ OFFER @@@@@@@@@@@@@@*/

.offer.section {
  padding-bottom: 3rem;
}

.offer {
  background-image: url('/assets/img/offer-bg.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.offer__container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-content: center;
  align-items: center;
}

.offer__title {
  font-size: var(--h2-font-size);
  margin-bottom: 1.5rem;
}

.offer__description {
  margin-bottom: 2.5rem;
  width: 80%;
}

/*@@@@@@@@@@@@@@ LOGOS @@@@@@@@@@@@@@*/

.logos.section {
  padding: 5rem 0;
}

.logos__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 50px));
  justify-content: space-between;
  align-items: center;
  gap: 3rem;

  padding: 0 2rem;
}

.logos__img {
  opacity: 0.5;
  transition: 0.2s;
}

.logos__img:hover {
  opacity: 1;
}

/*@@@@@@@@@@@@@@ FOOTER @@@@@@@@@@@@@@*/

.footer {
  position: relative;
  overflow: hidden;
}

.footer__shape {
  position: absolute;
  border-radius: 50%;
  z-index: -1000;

  background: hsl(219, 70%, 10%);
  filter: blur(100px);
}

.footer__shape-top {
  top: -5rem;
  left: -8rem;

  width: 400px;
  height: 400px;
}

.footer__shape-bottom {
  bottom: -4rem;
  right: -4rem;

  width: 200px;
  height: 200px;
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: space-between;
}

.footer__logo {
  margin-bottom: 0.5rem;
}

.footer__title {
  margin-bottom: 1rem;
}

.footer__list {
  display: grid;
  row-gap: 0.5rem;
}

.footer__link {
  color: var(--text-color);
  display: block;
  width: max-content;
  transition: 0.3s;
}

.footer__link:hover {
  transform: translateX(-10px);
  color: var(--first-color);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer__social-link {
  color: var(--text-color);
  font-size: 1.3rem;
  transition: 0.3s;
}

.footer__social-link:hover {
  color: var(--first-color);
}

.footer__copy {
  margin-top: 5rem;
  text-align: center;
  font-size: 0.6rem;
}

.footer__copy a {
  color: var(--first-color);
}

/*@@@@@@@@@@@@@@ SCROLL UP @@@@@@@@@@@@@@*/

.scrollup {
  position: fixed;
  bottom: -30%;
  right: 1.5rem;

  background-color: hsla(219, 4%, 8%, 0.7);
  color: var(--title-color);
  display: inline-flex;
  font-size: 1.3rem;
  padding: 0.5rem;
  border-radius: 0.2rem;
  z-index: 99;
  transition: 0.3s;
}

.scrollup:hover {
  /* because transition does not work on opacity */
  background-color: hsla(219, 4%, 8%, 1);
}

.show-scrollup {
  bottom: 5rem;
}

/*@@@@@@@@@@@@@@ SCROLL BAR @@@@@@@@@@@@@@*/

::-webkit-scrollbar {
  width: 0.6rem;
  background-color: hsl(219, 4%, 15%);
  border-radius: 1rem;
}

::-webkit-scrollbar-thumb {
  background-color: hsl(219, 4%, 25%);
  border-radius: 1rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(219, 4%, 35%);
}

/*@@@@@@@@@@@@@@@@ PRELOADER @@@@@@@@@@@@@@@@*/

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;

  display: grid;
  place-items: center;

  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(30px);
}
