:root {
  /* ------------PRIMARY COLORS------------ */
  --pale-blue: hsl(225, 100%, 94%);
  --bright-blue: hsl(245, 75%, 52%);

  /* ------------NEUTRAL COLORS------------ */
  --very-pale-blue: hsl(225, 100%, 98%);
  --desaturated-blue: hsl(224, 23%, 55%);
  --dark-blue: hsl(223, 47%, 23%);

  /* ------------FONTS------------ */
  --font: 'Red Hat Display', sans-serif; /* 500, 700, 900 */
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  margin: 0;
  margin-left: auto;
  margin-right: auto;
  padding-top: 3.2rem;
  max-width: 1440px;
  font-family: var(--font);
  font-size: 16px;
  background: var(--pale-blue)
    url('../assets/images/pattern-background-mobile.svg') top center no-repeat;
}

@media screen and (min-width: 768px) {
  body {
    padding-top: 6.3rem;
    background: var(--pale-blue)
      url('../assets/images/pattern-background-desktop.svg') top center
      no-repeat;
  }
}

/* ------------CARD------------ */
.card {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
  width: 20.44rem;
  height: 35.44rem;
  overflow: hidden;
  text-align: center;
  background-color: #fff;
  border-radius: 1.2rem;
  -webkit-box-shadow: 2px 18px 22px rgba(0, 0, 0, 0.1);
  box-shadow: 2px 18px 22px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 768px) {
  .card {
    width: 28.13rem;
    height: 43.63rem;
  }
}

/* ------------CARD-HEADER------------ */
.card-head {
  margin-bottom: 1.5rem;
}

.card-head__img {
  margin-bottom: 2rem;
  width: 100%;
  height: 10rem;
  background: url('../assets/images/illustration-hero.svg') top center no-repeat;
  background-size: 100%;
}

.card-head__title {
  font-size: 1.42em;
  font-weight: 900;
  color: var(--dark-blue);
}

.card-head__text {
  padding: 0 2rem;
  font-size: 0.95em;
  line-height: 1.6;
  color: var(--desaturated-blue);
}

@media screen and (min-width: 768px) {
  .card-head {
    margin-bottom: 1rem;
  }

  .card-head__img {
    margin-bottom: 2.7rem;
    height: 14rem;
  }

  .card-head__title {
    margin-bottom: 1rem;
    font-size: 1.78em;
  }

  .card-head__text {
    padding: 0 3rem;
    font-size: 1.02rem;
  }
}

/* ------------CARD-MAIN------------ */
.card-main {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin: 0 1.5rem 1.5rem 1.5rem;
  padding: 1rem;
  width: auto;
  max-height: 6.22rem;
  background-color: var(--very-pale-blue);
  border-radius: 0.7rem;
}

.card-main__text {
  margin-left: -1.7rem;
}

.card-main__title {
  margin-bottom: 0.1rem;
  font-size: 0.9em;
  font-weight: 900;
  color: var(--dark-blue);
}

.card-main__price {
  margin-top: 0;
  font-size: 0.9em;
  color: var(--desaturated-blue);
}

.card-main__link {
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: underline;
  color: var(--bright-blue);
  -webkit-transition: opacity 0.3s, -webkit-text-decoration 0.3s;
  transition: opacity 0.3s, -webkit-text-decoration 0.3s;
  -o-transition: opacity 0.3s, text-decoration 0.3s;
  transition: opacity 0.3s, text-decoration 0.3s;
  transition: opacity 0.3s, text-decoration 0.3s, -webkit-text-decoration 0.3s;
}

@media screen and (min-width: 768px) {
  .card-main {
    margin: 0 3.05rem 2rem 3.05rem;
    padding: 1.5rem;
  }

  .card-main__text {
    margin-left: -4.5rem;
    padding-top: 0.5rem;
  }

  .card-main__title {
    margin-bottom: 0.4rem;
    font-size: 1.02em;
  }

  .card-main__price {
    font-size: 1.02em;
  }

  .card-main__link {
    font-size: 0.9em;
  }

  .card-main__link:hover {
    text-decoration: none;
    opacity: 0.6;
    cursor: pointer;
  }
}

/* ------------CARD-FOOTER------------ */
.card-footer {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.card-footer__pay {
  margin: 0 1.5rem 1.5rem;
  padding: 1em 0;
  font-size: 0.97em;
  background-color: var(--bright-blue);
  color: var(--very-pale-blue);
  border-radius: 0.7em;
  -webkit-box-shadow: 0 16px 22px hsla(245, 75%, 52%, 0.3);
  box-shadow: 0 16px 22px hsla(245, 75%, 52%, 0.3);
  -webkit-transition: opacity 0.3s;
  -o-transition: opacity 0.3s;
  transition: opacity 0.3s;
}

.card-footer__cancel {
  font-size: 0.94em;
  font-weight: 900;
  text-decoration: none;
  color: var(--desaturated-blue);
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}

@media screen and (min-width: 768px) {
  .card-footer__pay {
    margin: 0 3.05rem 1.9rem 3.05rem;
  }

  .card-footer__pay:hover {
    opacity: 0.7;
    cursor: pointer;
  }

  .card-footer__cancel:hover {
    color: var(--dark-blue);
  }
}

/* ------------FOOTER------------ */
.attribution {
  font-size: 0.65em;
  text-align: center;
}

.attribution a {
  color: var(--bright-blue);
}

@media screen and (min-width: 768px) {
  .attribution {
    font-size: 0.75em;
  }
}
