/* Below 1344px (small desktop) */
@media screen and (max-width: 84em) {
  .contact-info {
    gap: 2.4rem;
  }
  .main-nav {
    gap: 2.4rem;
  }

  .hero-content--text p {
    font-size: 2.4rem;
  }
  .hero-content--text h1 {
    font-size: 4.8rem;
  }

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

  /* footer */
  .footer-container {
    padding: 8rem 4rem;
    grid-template-columns: repeat(4, 1fr) 1.5fr;
  }
  .footer-logo img {
    margin-top: 1rem;
    width: 85%;
  }
  .section-popup {
    min-width: 80%;
  }
}

/* Below 1200px (landscape tablets) */
@media screen and (max-width: 75em) {
  .header-nav {
    padding: 0.5rem 1.6rem;
  }
  .main-nav {
    gap: 1rem;
  }
  .hero-content {
    top: 20%;
    padding: 1.2rem 3.2rem;
  }
  .hero-content--text p {
    font-size: 1.8rem;
  }
  .hero-content--text h1 {
    font-size: 4.2rem;
  }
  .hero-cta-container {
    margin-top: 6.2rem;
  }

  /* footer */
  .footer-container {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;

    row-gap: 3.2rem;
  }
  .footer-phone {
    font-size: 1rem;
  }
  .map-col {
    grid-column: 1/5;
  }
}

/* below 944px (tablets) */
@media screen and (max-width: 62em) {
  html {
    font-size: 76%;
  }
  .contact-info {
    gap: 2.6rem;
  }

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

    display: none;

    align-items: center;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(100%);
    opacity: 0;

    pointer-events: none;
    z-index: 2;
    visibility: hidden;

    transition: all 0.4s ease-in-out;
  }
  .nav-open .main-nav {
    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;
  }

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

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

  .btn-mobile-nav {
    display: block;
  }
  .hero-content {
    top: 25%;
  }
  .hero-content--text h1 {
    margin-top: 1.4rem;
    font-size: 4.8rem;
  }

  /* Section classes */
  .class-card-container {
    grid-template-columns: 1fr 1fr;
    row-gap: 8rem;
  }
  .class-card h3 {
    font-size: 1.8rem;
  }
  .section-class p {
    font-size: 1.6rem;
    margin-top: 1.4rem;
  }
  .section-popup {
    min-width: 90%;
  }
}

/* Below 704px (portrait tablets and phones) */
@media screen and (max-width: 44em) {
  html {
    font-size: 50%;
  }
  .contact-info {
    gap: 4.2rem;
  }

  .section-heading h2 {
    font-size: 4.2rem;
  }
  /* Section classes */
  .class-card-container {
    grid-template-columns: 1fr;
  }
  .class-card {
    margin: 0 auto;
    max-width: 80%;
  }

  .class-card h3 {
    font-size: 2.4rem;
    margin-top: 1rem;
  }
  .section-class p {
    font-size: 2.4rem;
    margin-top: 1rem;
  }

  .section-motivation p {
    font-size: 2rem;
  }

  /* why us  */
  .why-card-container {
    grid-template-columns: 1fr;
    row-gap: 4.8rem;
  }
  .why-card h3 {
    font-size: 2.8rem;
  }

  /* principal section */
  .section-principal {
    flex-direction: column;
    padding: 6rem 2.4rem;
  }

  .principal-context p {
    margin-top: 1.6rem;
    font-size: 1.8rem;
  }

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

  /* footer */
  .footer-container {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .map-col {
    grid-column: 2/4;
  }
  .contact-info-footer a:link ion-icon {
    font-size: 2.8rem;
  }
  .footer-container .quicklinks-col {
    justify-self: center;
  }
  .footer-heading {
    font-size: 2.4rem;
  }
  .footer-container p {
    font-size: 1.6rem;
  }
  .footer-phone {
    font-size: 1.4rem;
  }
  .footer-nav a {
    font-size: 1.8rem;
  }
  .copyright {
    font-size: 1.4rem;
  }
  .section-popup {
    min-width: 95%;
  }
}

/* Below 544px (phones) */
@media screen and (max-width: 34em) {
  .hero-content {
    top: 8%;
  }

  .copyright {
    padding: 1.2rem 2.4rem;
  }
}

/* Below 350px (phones) */

@media screen and (max-width: 21.875em) {
  .hero-content {
    top: 5%;
  }
  .hero-content--text p {
    font-size: 1.4rem;
  }
  .hero-content--text h1 {
    font-size: 2.4rem;
  }
  .hero-cta-container {
    flex-direction: column;
    gap: 3.2rem;
  }
  .hero-cta-main {
    width: 100%;
  }
  .hero-cta-secondary {
    width: 100%;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  .map-col {
    grid-column: 1/3;
  }
}
