/* rem and em do NOT depend on html font-size in media queries! Instead, 1rem = 1em = 16px */

/**************************/
/* BELOW 1344px (Smaller desktops) */
/**************************/

@media (max-width: 84em) {
  .hero,
  * {
    max-width: 120rem;
  }

  .logo {
    width: 15rem;
  }

  .heading-primary {
    font-size: 4.4rem;
  }

  .gallery {
    grid-template-columns: repeat(1fr);
  }

  .gallery img {
    width: 100%;
  }

  .testimonial-text {
    font-size: 1.6rem;
  }
}

/*****************************************************/

/* BELLOW 944px (Tablets)*/

/*****************************************************/

@media (max-width: 59em) {
  /*8px/16px = 50% */
  html {
    font-size: 50%;
  }

  .header {
    padding: 1% 1%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 0 8rem;
    gap: 6.4rem;
  }

  .hero-text-box,
  .hero-img-box {
    text-align: center;
  }

  .hero-img {
    width: 60%;
  }

  .logos img {
    height: 2.4rem;
  }

  /* MOBILE NAVIGATION*/

  .btn-mobile-nav {
    display: block;
    z-index: 9999;
  }

  .main-nav {
    background-color: rgba(9, 221, 237, 0.97);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /*100 view port height unit*/
    transform: translateX(100%);

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in;

    /*Hide navigation*/
    /*Allows NO transitions at allow*/
    /* display: none; */

    /*1) Hide it visually*/
    opacity: 0;

    /*2) Make it unnaccessible to mouse and keyboard */
    pointer-events: none;

    /*3) Hide it form screen readers*/
    visibility: hidden;
  }

  .nav-open .main-nav {
    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;
  }

  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 3rem;
  }
}

@media (max-width: 22.5em) {
  html {
    font-size: 31%;
  }

  .testimonials,
  .grid--3-cols {
    grid-template-columns: 1fr;
    align-items: center;
    width: 100%;
  }

  .how-program {
    align-items: center;
  }

  .logo {
    width: 10%;
  }

  .heading-primary {
    font-size: 3.2rem;
  }
  .program-img {
    width: 60%;
  }

  .testimonial-text {
    width: 100%;
  }

  .nav-cta {
    font-size: 1rem;
  }

  .btn--form {
    margin-top: 2rem;
    margin-left: 25rem;
  }

  .other-names ul li {
    font-size: 1rem;
  }

  .checkbox-program ul li label,
  .other-names {
    font-size: 1.2rem;
  }

  .footer {
    padding: 2rem;
  }

  .grid--footer {
    grid-template-columns: 1fr 1fr;
    font-size: 1.6rem;
  }
}

/*****************************************************/

/* BELLOW 704px (Smaller Tablets)*/

/*****************************************************/

/*
Calculos
704px/16px que 43.75 --> 44% 

*/

@media (max-width: 44em) {
  .sticky .header {
    width: 100%;
    height: 15rem;
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 4rem;
  }

  .grid--footer,
  .grid--3-cols {
    grid-template-columns: 1fr 1fr;
    column-gap: 3.2rem;
    row-gap: 3.2rem;
  }

  .logo {
    width: 20%;
    padding: 1rem;
    margin-left: 5rem;
  }

  .logo-col:nth-child(3),
  .how-program:nth-child(3),
  .section-def:nth-child(3) {
    grid-column: 1/ -1;
    /*No confundir con align*/
    justify-self: center;
  }

  .how-program:nth-child(3) img {
    width: 50%;
    justify-self: center;
    /* margin-left: 20rem; */
    transform: translateX(50%);
  }

  .testimonials {
    padding: 2rem;
  }

  .testimonials-container {
    padding: 3rem;
    background-color: #2ebdd61b;
  }
}

/******************************/
/*   BELOW 544 px (Phones) */

/* 550/16 -. 34.37% - > 34%*/

@media (max-width: 34em) {
  .header {
    height: 10rem;
  }
  .sticky .header {
    height: 10rem;
  }

  .grid {
    row-gap: 4.8rem;
  }
  .grid--footer,
  .grid--3-cols {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 0 3.2rem;
  }

  .section-hero {
    padding: 2.4rem 0 4.8rem 0;
    margin: 0 auto;
  }

  .btn,
  .btn:link,
  .btn:visited {
    padding: 2.4rem 1.6rem;
  }

  .testimonials-container {
    padding: 2.6rem;
  }

  .hero-img,
  .program-img {
    width: 60%;
  }

  .program-img {
    width: 60%;
    border-radius: 20%;
  }

  .how-program {
    align-items: center;
    justify-content: center;
  }

  .how-program:nth-child(3) img {
    width: 60%;
    justify-self: center;
    /* margin-left: 20rem; 
    */
    transform: translateX(2%);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    margin: 1rem;
  }

  .gallery-item img {
    width: 80%;
  }

  .logo-col {
    align-items: center;
  }
}

/*****************************************************/
/* BELLOW 428px (Phones Group )*/

/*****************************************************/

/*
  Calculos
  428px/16px que 26.75 --> 27% 

  */

@media (max-width: 34em) {
  .heading-primary {
    font-size: 3.2rem;
  }

  .heading-secondary {
    font-size: 2.8rem;
  }

  .heading-tertiary {
    font-size: 2.4rem;
  }

  .heading-featured-in {
    font-size: 2rem;
  }

  .grid--footer .address,
  .li-footer2,
  .footer-link,
  .call-email {
    font-size: 1.4rem;
  }

  .btn,
  .btn:link,
  .btn:visited {
    font-size: 1.6rem;
  }
}
