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

/**** Below 1344px (small laptops) ****/
@media (max-width: 84em) {
  .hero-section {
    max-width: 120rem;
  }

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

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

/**** Below 1200px (landscape Tablets) ****/
@media (max-width: 75em) {
  html {
    /* 9px/16px = 56.25% */
    font-size: 56.25%;
  }

  .main-nav-list {
    gap: 3.2rem;
  }

  .hero-section {
    padding: 2.4rem 3.2rem 6.4rem 3.2rem;
  }

  .heading-secondary {
    font-size: 3.6rem;
    margin-bottom: 3.2rem;
  }

  .heading-tertiary {
    font-size: 2.4rem;
  }

  .hero-description {
    margin-bottom: 3.2rem;
  }

  .who-description {
    margin-bottom: 2.4rem;
  }

  .why-text-box {
    margin-top: 8rem;
  }

  .why-us-header {
    margin-top: 2.4rem;
  }

  .why-us-highlights {
    padding: 4.8rem 0;
  }

  .why-description {
    margin-bottom: 2.4rem;
  }

  .heading-primary {
    margin-bottom: 2.4rem;
  }

  .our-mission-box {
    top: 50%;
    width: 55%;
    transform: translate(-5%, -60%);
  }
}

/**** Below 944px (Tablets) ****/

@media (max-width: 59em) {
  html {
    /* 8px = 1 rem , 8px/16px = 0.5= 50%*/
    font-size: 50%;
  }

  .hero-section {
    background-color: rgba(240, 248, 255, 0.583);
    grid-template-columns: 1fr;
    text-align: center;
  }

  .services-img {
    height: 30rem;
  }

  .who-we-are-container {
    grid-template-columns: 1fr;
  }

  .our-mission-box {
    top: 55%;
    width: 45%;
    transform: translate(-5%, -15%);
  }

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

  .why-us-container {
    display: flex;
    flex-direction: column;
  }

  .why-text-box {
    padding: 4.8rem;
  }

  .why-blank {
    padding: 0 5rem;
  }

  .why-us-highlights {
    gap: 4.8rem;
    grid-template-columns: repeat(2, 1fr);
  }

  /*Mobile Navigation*/
  .btn-mobile-nav {
    display: block;
    z-index: 1000;
  }

  .main-nav {
    background-color: rgba(255, 255, 255, 0.97);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateX(100%);

    transition: all 0.5s ease-in;

    /*Hide Navigation*/
    /* No animation */
    /* display: none; */

    /* allows animation */
    /* 1. hide it visually */
    opacity: 0;

    /* 2. make it unaccessible to mouse and keyboards */
    pointer-events: none;

    /* 3. hide it from screen readers */
    visibility: hidden;
  }

  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translate(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;
  }

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

/* Below 704px, for smaller tablets, 700/16 = 704 */
/* Everything thats 3 & 4 columns to 2 columns */
@media (max-width: 44rem) {
  .grid--3-cols,
  .grid--4-cols,
  .grid--footer,
  .filters-list{
    grid-template-columns: repeat(2, 1fr);
  }

  .heading-secondary {
    margin-bottom: 4.8rem;
  }

  .gallery {
    padding: 0;
  }

  .nav-col {
    grid-row: 1;
  }

  .services-img {
    height: 30rem;
  }
}

/* Below 544px, for phones, 550/16 = 34 */
/* all grids to 1 column */
@media (max-width: 34em) {
  .grid--2-cols,
  .grid--3-cols,
  .grid--4-cols,
  .gallery,
  .grid--footer,
  .filters-list{
    grid-template-columns: 1fr;
  }

  .why-us-highlights {
    grid-template-columns: 1fr;
  }

  .grid {
    row-gap: 4.8rem;
  }

  .services-img {
    height: 40rem;
  }

  .hero-section {
    padding: 2.4rem 0 6.4rem 0;
  }

  .grid-we-offer {
    grid-template-columns: 1fr;
  }

  .our-mission-box {
    top: 45%;
    width: 55%;
    transform: translate(-5%, -10%);
  }

  .our-mission {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
  }

  .mission-description {
    font-size: 1.2rem;
    line-height: 1.2;

    margin-bottom: 1.2rem;
  }

  .icon {
    height: 5.2rem;
    width: 5.2rem;
  }

  .section-who-we-are {
    padding: 4.8rem 0;
  }

  .section-why-us {
    padding: 2.4rem 0;
  }

  .btn:link,
  .btn:visited {
    padding: 2.4rem 1.6rem;
  }
}
