/*************************/
/* BELOW 1344px (Smaller desktop) */
/*************************/

@media (max-width: 84em) {
  .hero {
    max-width: 120rem;
  }

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

  .btn,
  .btn:link,
  .btn:visited {
    font-size: 1.8rem;
  }
}

/*************************/
/* BELOW 1200px (Landscape Tablets) */
/*************************/

@media (max-width: 75em) {
  html {
    font-size: 56.25%;
  }

  .margin-bottom-lg {
    margin-bottom: 4.8rem !important;
  }

  .grid {
    column-gap: 4.8rem;
    row-gap: 6.4rem;
  }

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

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

  .header {
    padding: 0 3.2rem;
  }

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

  .hero {
    gap: 4.8rem;
  }

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

  .services-container {
    padding: 6rem 3.2rem 6.4rem 4.8rem;
  }

  .value-text-box {
    min-height: 55rem;
  }

  .contact-text {
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 1.4rem;
  }
}

/*************************/
/* BELOW 944px (Tablets) */
/*************************/

@media (max-width: 59em) {
  html {
    font-size: 50%;
  }

  html, body {
    overflow-x: hidden; /* Disables the horizonal scrolling on mobile devices */
  }

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

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

  .margin-bottom-lg {
    margin-bottom: 4rem;
  }

  .margin-bottom-md {
    margin-bottom: 3.2rem;
  }

  .margin-bottom-sm {
    margin-bottom: 2.4rem;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 0 8rem;
    gap: 6.4rem;
  }

  .hero-text-box,
  .hero-img-box {
    text-align: center;
  }

  .container {
    padding: 0 4.8rem;
  }

  .logos img {
    height: 2.4rem;
  }

  .value-text-box {
    padding: 2rem;
    min-height: 48rem;
  }

  .value-number {
    font-size: 5.2rem;
  }

  .section-services {
    grid-template-columns: 1fr;
  }

  .services-img {
    grid-row: 1 / 2;
    height: 24rem;
    background-size: cover;
    background-position: 20% 40%;
  }

  .services-tabs {
    grid-template-columns: 40fr 40fr 20fr;
    column-gap: 1rem;
    row-gap: 4.4rem;
  }

  .services-tab-btn {
    grid-column: unset;
    grid-row: 1;
  }

  .services-description {
    grid-column: span 3;
    grid-row: 2;
    justify-self: normal;
  }

  .contact-box {
    grid-template-columns: 1fr;
    max-height: calc(450px + 30rem);
  }

  .contact-text-box {
    align-items: center;
  }

  .map-item {
    width: 100%;
    height: 30rem;
  }

  .email {
    margin-bottom: 3.6rem;
  }

  /* GALLERY CAROUSEL */

  .section-gallery {
    margin: 0 auto;
  }

  .wrapper-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
  }

  .wrapper-carousel .gallery {
    display: block;
    font-size: 0px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
  }

  .gallery-item-hidden {
    display: none;
  }

  .gallery-item img:hover {
    transform: none;
  }

  .gallery-item img {
    max-height: 55rem;
    object-fit: cover;
    width: 100%;
  }

  .caret {
    flex: none;
    font-size: 5.8rem;
    color: #24c688;
    position: absolute;
  }

  .caret-left {
    left: -5.6rem;
  }

  .caret-right {
    right: -5.6rem;
  }

  /* MOBILE NAV */
  .btn-mobile-nav {
    display: block;
    z-index: 9999;
  }

  .main-nav {
    background-color: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform: translateX(100%);

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in;
    opacity: 0;
    pointer-events: none;
    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;
  }
}

/*************************/
/* BELOW 795px (Smaller Tablets) */
/*************************/

@media (max-width: 49.7em) {
  .grid--3-cols {
    grid-template-columns: 1fr;
    gap: 6rem;
  }

  .heading-secondary {
    font-size: 3rem;
  }

  .value-text-box {
    padding: 4rem 4.8rem;
    min-height: 50rem;
    max-width: 40rem;
    justify-self: center;
  }

  .value-description {
    font-size: 2rem;
  }
}

/*************************/
/* BELOW 544px (Phones) */
/*************************/

@media (max-width: 34em) {
  .btn,
  .btn:link,
  .btn:visited {
    padding: 2rem 1.6rem;
  }

  .hero-btn {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .hero-btn a {
    width: 30rem;
    margin-right: 0 !important;
  }

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

  .hero {
    padding: 0 3.2rem;
  }

  .section-why {
    padding: 6.4rem 0 2rem 0;
  }

  .logos img {
    height: 2rem;
  }

  .services-tabs {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .services-tab-btn {
    grid-column: unset;
    grid-row: unset;
  }

  .services-description {
    grid-column: unset;
  }

  .services-description.order-1 {
    grid-row: 2;
  }

  .services-description.order-2 {
    grid-row: 3;
  }

  .services-description.order-3 {
    grid-row: 4;
  }

  .services-description-content {
    border-left: 2px solid #07365c;
    margin-left: 2.2rem;
  }

  .section-gallery {
    padding: 5.6rem 0;
  }

  .section-contact {
    padding: 2rem 0 4.8rem 0;
  }

  .tel {
    flex-direction: column;
    gap: 0.8rem;
  }

  .email {
    display: flex;
  }
}
