/* rem and em do NOT depend on html font-size in media queries! Instead, 1rem = 1em = 16px */

/*
- Font sizes (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

- Spacing system (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
*/

/************************************/
/* BELOW 1200px (Landscape tablets) */
/************************************/
@media (max-width: 75em) {
  html {
    /* 9px / 16px = 0.5625 */
    font-size: 56.25%;
  }

  .container--main {
    padding: 0 4.8rem;
  }
}

/**********************************/
/* BELOW 944px (Portrait tablets) */
/**********************************/

@media (max-width: 59em) {
  html {
    /* 8px / 16px = 50% */
    font-size: 50%;
  }
  .hero-content {
    max-width: 100%;
  }

  .grid--services,
  .services-even.grid--services {
    grid-template-columns: 1fr 1fr;
    max-height: none;
  }

  /* MOBILE NAVIGATION */
  .btn-mobile-nav {
    display: block;
    z-index: 1000;
  }
  .navbar {
    position: absolute;
    background-color: var(--green-1-transparent-sticky);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    right: 0;
    width: 40%;
    height: 100vh;
    transform: translateX(100%);
    transition: all 0.4s ease-out;
    z-index: 1;

    /* Hide navigation */
    /* Allows NO transitions at all */
    /* display: none; */

    /* 1) Hide it visually */
    opacity: 0;

    /* 2) Make it unaccessible to mouse and keyboard */
    pointer-events: none;

    /* 3) Hide it from screen readers */
    visibility: hidden;
  }
  .nav-open .navbar {
    /* display: flex; */
    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;
  }

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

  .nav-item:link,
  .nav-item:visited {
    color: var(--yellow-3);
    font-size: 3rem;
  }
}

/*************************************************************/
/* BELOW 704px (Smaller portrait tablets / Landscape phones) */
/*************************************************************/

@media (max-width: 44em) {
  .container--section {
    padding-left: 0;
    padding-right: 0;
  }

  .grid--services,
  .services-even.grid--services {
    display: block;
  }
}

/*********************************/
/* BELOW 544px (Portrait phones) */
/*********************************/

@media (max-width: 34em) {
  .container--main {
    padding: 0 2.4rem;
  }

  .navbar {
    width: 100%;
  }
}

/*****************************/
/* FIXING SAFARI FLEXBOX GAP */
/*****************************/

.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;
  }
}
