/* 1rem = 1em = 16px in media query */

/* *****************1350px and less*********************** */
@media (max-width: 84em) {
  .hero {
    max-width: 120rem;
  }

  .header-primary {
    font-size: 4.4rem;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .list {
    gap: 1rem;
  }
}

/* *****************1250px and less*********************** */
@media (max-width: 80em) {
  .card {
    width: 90%;
  }

  .meals-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 75em) {
  html {
    font-size: 56.25%;
  }

  .btn,
  btn:link,
  .btn:visited {
    margin-bottom: 2rem !important;
  }

  .heading-secondary,
  .header-tertiary {
    font-size: 3.6rem;
    margin-bottom: 2.4rem;
    letter-spacing: -0.5px;
    font-weight: 600;
  }

  div .header-tertiary {
    font-size: 2.4rem;
  }
  .diet-options .header-tertiary {
    margin-bottom: 2.4rem;
    margin-top: 0;
  }

  .grid {
    column-gap: 4.8rem;
    row-gap: 6.4rem;
  }

  .meal-content-box {
    padding: 1.6rem 2.4rem 2.4rem 2.4rem;
  }

  .header-section {
    padding: 0 3.2rem;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }

  .hero {
    gap: 4.8rem;
  }

  .testimonials-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 4.8rem;
    padding: 4.8rem 4.8rem 8rem 4.8rem;
  }

  .form-content {
    grid-template-columns: 1fr;
  }
}

/* *********900px********* */
@media (max-width: 56.25em) {
  html {
    font-size: 50%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 0 12rem;
  }

  .hero-image {
    width: 60%;
  }

  .hero-text-box {
    text-align: center;
  }

  .hero-image-box {
    text-align: center;
  }

  .delivered-meals {
    justify-content: center;
  }

  .step-number {
    font-size: 6.4rem;
    font-weight: 600;
    color: #ddd;
    margin-bottom: 0;
  }

  .testimonials-content {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: repeat(6, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    column-gap: 3.4rem;
  }

  .adress-col {
    padding-right: 3.4rem;
  }

  .logo-col {
    padding-right: 3.4rem;
  }

  .form-container {
    grid-template-columns: 3fr 2fr;
  }

  .meals-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .diet-options {
    grid-column: 1/-1;
    justify-self: center;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .card {
    max-width: 50rem;
    justify-self: center;
  }

  .btn-mobile-nav {
    display: block;
    z-index: 999;
  }
  .main-nav {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;

    /* display none does not allow to use 
    animations so thats not the best way 
    to hide the elements we will be 
    calling with JS later */
    /* display: none; */

    /* opacity will make the menu overlay transpatent */
    opacity: 0;
    /* to make overlay unaccessible for mouse and keybord 
    we need to use pointer-evente property*/
    pointer-events: none;
    /* and finaly need to  hide it from screen readers*/
    visibility: hidden;
    transform: translateX(100%);

    transition: all 0.5s;
  }

  .nav--open .main-nav {
    opacity: 1;
    /* setting all the properties we used to hide the element back to default  */
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
  }

  .nav--open .icon-mobile-nav[name="close-outline"] {
    display: block;
  }
  .nav--open .icon-mobile-nav[name="menu-outline"] {
    display: none;
  }

  .main-nav-list {
    flex-direction: column;
    gap: 4.8rem;
  }

  .nav-link:link,
  .nav-link:visited {
    font-size: 4rem;
  }
}

/* *********700px********* */
@media (max-width: 44em) {
  html {
    font-size: 40%;
  }

  .features.centered-container {
    grid-template-columns: 1fr 1fr;
    gap: 3.4rem;
  }
}

/* *********500px********* */
@media (max-width: 31.25em) {
  .footer-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .account-col {
    grid-row: 1;
    grid-column: span 2;
  }
  .logo-col {
    grid-column: 1/4;
    grid-row: 2;
  }
  .adress-col {
    grid-column: 4/-1;
    grid-row: 2;
  }

  .meals-content {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .meal {
    max-width: 50rem;
  }

  .form-box .heading-secondary {
    text-align: center;
    font-size: 4rem;
  }

  .form-container {
    grid-template-columns: 1fr;
  }

  .form-image-box {
    display: none;
  }
}

/* *********400px********* */
@media (max-width: 31.25em) {
  html {
    font-size: 30%;
  }

  .hero {
    padding: 3.4rem;
  }

  .subheading,
  .heading-secondary {
    display: flex;
    justify-content: center;
    text-align: center !important;
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.no-flexbox-gap .main-nav-list li:not(:last-child) {
  margin-right: 4.8rem;
}

.no-flexbox-gap .list-item:not(:last-child) {
  margin-bottom: 1.6rem;
}

.no-flexbox-gap .list-icon:not(:last-child) {
  margin-right: 1.6rem;
}

.no-flexbox-gap .delivered-faces {
  margin-right: 1.6rem;
}

.no-flexbox-gap .meal-attribute:not(:last-child) {
  margin-bottom: 2rem;
}

.no-flexbox-gap .meal-icon {
  margin-right: 1.6rem;
}

.no-flexbox-gap .footer-row div:not(:last-child) {
  margin-right: 6.4rem;
}

.no-flexbox-gap .social-links li:not(:last-child) {
  margin-right: 2.4rem;
}

.no-flexbox-gap .footer-nav li:not(:last-child) {
  margin-bottom: 2.4rem;
}

@media (max-width: 75em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 3.2rem;
  }
}

@media (max-width: 59em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 0;
    margin-bottom: 4.8rem;
  }
}
