/* for 1366, choose between 1300 and 1366, why choose 1350 */

/* 1350 / 16px = 84em (where 16px = default browser font size*/

/* ############ */

/* 1344px and below */

@media (max-width: 84em) {
  .hero {
    max-width: 120rem;
  }

  .h1-heading {
    font-size: 4.4rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1200px and below */

@media (max-width: 75em) {
  html {
    /* 9px / 16px (default) = 0.5625 * 100 = 56.25% */
    font-size: 56.25%;
  }

  .grid {
    column-gap: 4.8rem;
    row-gap: 6.4rem;
  }

  .h2-heading {
    font-size: 3.6rem;
  }

  .h3-heading {
    font-size: 2.4rem;
  }

  .header {
    padding: 0 3.2rem;
  }

  .main-nav-list {
    gap: 3.2rem;
  }

  .hero {
    gap: 4.8rem;
  }

  .meal-attribute {
    line-height: 1.6;
  }

  .testimonials-container {
    padding: 9.6rem 3.2rem;
  }
}

/* 944px and below */

@media (max-width: 59em) {
  html {
    /* 8px / 16px (default) = 0.5 * 100 = 50% */
    font-size: 50%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 0 8rem;
    gap: 8rem;
  }

  .hero-text-box,
  .hero-img-box {
    text-align: center;
  }

  .hero-img {
    width: 60%;
  }

  .delivered-meals {
    justify-content: center;
    margin-top: 4.8rem;
  }

  .logos img {
    height: 2.4rem;
  }

  .step-number {
    font-size: 7.4rem;
  }

  .meal-content {
    padding: 3.2rem;
    padding-top: 2.4rem;
  }

  .testimonials-and-gallery-section {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(6, 1fr);
  }

  .pricing-plan .list {
    line-height: 1.4;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta {
    grid-template-columns: 3fr 2fr;
  }

  .cta-form {
    grid-template-columns: 1fr;
  }

  .button-form {
    margin-top: 1.2rem;
  }

  .menu-button {
    display: block;
    z-index: 1000;
  }

  .main-nav {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    width: 100%;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    /* 1: For invisibility */
    /* 2: For non-clickable */
    /* 3: For hiding from screen readers */

    opacity: 0;
    pointer-events: none;
    visibility: hidden;

    transform: translateX(100%);
    transition: all 0.5s ease-in;
  }

  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;

    transform: translateX(0);
  }

  .nav-open .menu-icon[name="menu-outline"] {
    display: none;
  }

  .nav-open .menu-icon[name="close-outline"] {
    display: block;
  }

  .main-nav-list {
    flex-direction: column;
    gap: 4.8rem;
  }

  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 3rem;
  }

  .main-nav-list .nav-filled-link:link,
  .main-nav-list .nav-filled-link:visited {
    padding: 1.8rem 4.8rem;
  }
}

/* 704px and below */

@media (max-width: 44em) {
  .grid-3-cols,
  .grid-4-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .diets {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .h2-heading {
    margin-bottom: 4.8rem;
  }

  .pricing-plan {
    width: 100%;
  }

  .pricing-plan-complete::after {
    top: 5%;
    right: -20%;
    text-align: left;
  }

  .footer-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .nav-col {
    grid-row: 1;
    grid-column: span 2;
    margin-bottom: 3.2rem;
  }

  .logo-col,
  .contact-col {
    grid-column: span 3;
  }
}

/* 544px and below (For phones) */

@media (max-width: 34em) {
  .grid {
    row-gap: 4.8rem;
  }

  .grid-2-cols,
  .grid-3-cols,
  .grid-4-cols {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 2.4rem 0 6.4rem 0;
  }

  .hero {
    padding: 0 3.2rem;
  }

  .hero-img {
    width: 80%;
  }

  .button {
    padding: 2.4rem 1.6rem;
  }

  .logos img {
    height: 1.2rem;
  }

  .step-img-box:nth-child(2) {
    grid-row: 1;
  }

  .step-img-box:nth-child(6) {
    grid-row: 5;
  }

  .step-img-box {
    transform: translateY(2.4rem);
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
  }

  .plan-select .button {
    padding: 2.4rem 3.2rem;
  }

  .cta {
    grid-template-columns: 1fr;
  }

  .cta-image {
    grid-row: 1;
    height: 32rem;
  }

  .cta-text-box {
    padding: 3.2rem;
  }
}
