/* 16px = 1.6rem = 1em */

/* ********************************* */
/* ABOVE 2000px */
/* 4K Screens */
/* ********************************* */

@media (min-width: 125em) {
  /* HERO SECTION */

  .hero-container--home {
    top: -69rem;
    left: 20rem;
  }

  .hero-container-inner--home {
    width: 34%;
  }
}

/* ********************************* */
/* BELOW 1456px */
/* Smaller desktops */
/* ********************************* */

@media (max-width: 91em) {
  /* HERO SECTION */

  .section-hero--home,
  .hero-img--home {
    height: 65rem;
  }

  .hero-container--home {
    max-width: 75rem;
    left: 15rem;
    top: 22rem;
  }

  .hero-container-inner--home {
    width: 65%;
  }

  /* CLIENTS SECTION */

  .section-clients .container--global {
    padding: 4.8rem 0;
  }

  .clients-logos img {
    height: 3.2rem;
  }

  #lloydHill,
  #geoafrika {
    height: 2.8rem; /* ~0.4rem smaller than clients-logos img */
  }

  #premier {
    height: 4.4rem; /* ~1.2rem bigger than clients-logos img */
  }

  /* HOW WE HELP SECTION */

  .how-text-box::before {
    width: 55rem;
  }

  .grid--how {
    column-gap: 0rem;
  }

  /* TESTIMONIALS SECTION */

  .testimonial-text,
  .testimonial-company {
    font-size: 1.8rem;
  }

  .testimonial-name {
    font-size: 2rem;
  }
}

/* ********************************* */
/* BELOW 1200px */
/* Landscape Tablets */
/* ********************************* */

@media (max-width: 75em) {
  /* HERO SECTION */

  .section-hero--home,
  .hero-img--home {
    height: 55rem;
  }

  .hero-container--home {
    max-width: 75rem;
    left: 15rem;
    top: 20rem;
  }

  .hero-container-inner--home {
    width: 65%;
  }

  /* HOW WE HELP SECTION */

  .how-text-box::before {
    width: 50rem;
  }

  .how-paragraph {
    font-size: 2rem;
  }

  /* TESTIMONIALS SECTION */

  .testimonial-text {
    font-size: 1.6rem;
  }

  /* CTA SECTION */

  .cta-heading {
    font-size: 9.8rem;
  }

  .cta-text-box {
    padding: 4.8rem 4.8rem 4.8rem 6.4rem;
  }

  .cta-text {
    font-size: 2rem;
    padding-bottom: 3.2rem;
  }
}

/* ********************************* */
/* BELOW 1072px */
/* Tablets */
/* ********************************* */

@media (max-width: 67em) {
  /* HERO SECTION */

  .section-hero--home,
  .hero-img--home {
    height: 45rem;
  }

  .hero-container--home {
    max-width: 75rem;
    left: 10rem;
    top: 17rem;
  }

  .hero-container-inner--home {
    width: 65%;
  }

  /* CLIENTS SECTION */

  .section-clients .container--global {
    padding: 3.2rem 0;
  }

  .clients-logos img {
    height: 2.8rem;
  }

  #lloydHill,
  #geoafrika {
    height: 2.4rem; /* ~0.4rem smaller than clients-logos img */
  }

  #premier {
    height: 4rem; /* ~1.2rem bigger than clients-logos img */
  }

  /* VIDEO SECTION */

  .section-video {
    margin-bottom: 6.4rem;
  }

  /* HOW WE HELP SECTION */

  .grid--how {
    grid-template-columns: 1.2fr 1fr 1.2fr;
  }

  .how-text-box::before {
    width: 40rem;
    height: 130%;
    transform: translate(-25%, -10%);
  }

  .how-text-box--2::before {
    transform: translate(-8%, -10%);
  }

  .how-paragraph {
    font-size: 1.6rem;
  }

  /* TESTIMONIALS SECTION */

  .section-testimonials {
    margin-bottom: 8rem;
  }

  /* Change the structure of the testimonial section to be in one column */

  .grid--testimonials {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .testimonial--2 {
    grid-row: 2 / 3;
  }

  .testimonial--3 {
    grid-row: 3 / 4;
  }

  .testimonial {
    align-items: center;

    width: 80%;
    padding: 2.4rem;
  }

  .testimonial-text {
    text-align: center;
  }

  .testimonial-img {
    height: 9.6rem;
    width: auto;
  }

  .testimonial-name {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }

  .testimonial-company {
    font-size: 1.6rem;
  }

  /* CTA SECTION */

  .cta-text-box {
    padding: 3.2rem 3.2rem 3.2rem 6.4rem;
  }

  .cta-text {
    font-size: 1.8rem;
  }
}

/* ********************************* */
/* BELOW 832px */
/* Small Tablets */
/* ********************************* */

@media (max-width: 52em) {
  /* GLOBAL */
  /* This overrides the global_general_queries.css page for all the downloads 
     pages.  This is because of the order of page includes - the last instance 
     will be used. */

  .heading-secondary--global,
  .heading-tertiary--global,
  .subheading--global {
    text-align: left;
  }

  .subheading--clients {
    text-align: center;
  }

  /* HERO SECTION */

  .section-hero--home,
  .hero-img--home {
    height: 55rem;
  }

  /* Replace the hero image with a smaller version for mobile */
  .hero-img--home {
    background-image: linear-gradient(
        to bottom,
        var(--colour--black--transparency-low),
        var(--colour--black--transparency-highest),
        transparent
      ),
      url(/pages/home/images/hero_mobile.webp);

    background-size: cover;
  }

  .hero-container--home {
    max-width: 100vw;
    left: 0rem;
    top: 22rem;
  }

  .hero-container-inner--home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    margin: 0 auto;
    width: 60%;
  }

  /* CLIENTS SECTION */

  .clients-logos img {
    height: 2.4rem;
  }

  #lloydHill,
  #geoafrika {
    height: 2rem; /* ~0.4rem smaller than clients-logos img */
  }

  #premier {
    height: 3.6rem; /* ~1.2rem bigger than clients-logos img */
  }

  /* HOW WE HELP SECTION */

  .section-how {
    margin-bottom: 9.6rem;
  }

  /* Change the grid to a single column */

  .grid--how {
    grid-template-columns: 1fr;
    row-gap: 6.4rem;
  }

  .how-screenshot {
    width: 70%;
  }

  .how-image-box--2 {
    grid-row: 3 / 4;
  }

  .how-text-box--2 {
    grid-row: 4 / 5;
  }

  .how-text-box::before {
    width: 105%;
    height: 130%;
    transform: translate(0, -12.5%);
    border-radius: var(border-radius--box);
  }

  .how-text-box {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .how-paragraph {
    text-align: center;
  }

  /* TESTIMONIALS SECTION */

  .testimonial {
    width: 90%;
  }

  /* CTA SECTION */

  .section-cta {
    margin-bottom: 8rem;
  }

  /* Change the CTA to be a single column */

  .cta {
    flex-direction: column;
  }

  .cta-heading {
    font-size: 7.4rem;
    border-right: none;
    padding: 4.8rem 2.4rem;
  }

  .cta-text-box {
    border-top: solid 1px var(--colour--primary-tint-dark);
    padding: 4.8rem 2.4rem;
  }

  .cta-text {
    text-align: center;
  }

  /* GALLERY SECTION */

  .section-gallery {
    margin-bottom: 9.6rem;
  }
}

/* ********************************* */
/* BELOW 640px */
/* Phones */
/* ********************************* */

@media (max-width: 40em) {
  /* HERO SECTION */

  .section-hero--home,
  .hero-img--home {
    height: 50rem;
  }

  .section-hero--home {
    margin-bottom: 0rem;
  }

  .hero-container--home {
    max-width: 100vw;
    left: 0rem;
    top: 18rem;
  }

  .hero-container-inner--home {
    width: 70%;
  }

  /* CLIENTS SECTION */

  .section-clients .container--global {
    padding: 4.8rem 0;
  }

  .subheading--clients {
    margin-bottom: 2.4rem;
  }

  /* Change the client logos to a grid structure so that they do not become too small */

  .clients-logos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-items: center;
    align-items: center;
    column-gap: 0rem;
    row-gap: 1.6rem;
  }

  #blom {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
  }

  #lloydHill {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
  }

  #geoafrika {
    grid-column: 5 / 7;
    grid-row: 1 / 2;
  }

  #ossmap {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
  }

  #premier {
    grid-column: 4 / 6;
    grid-row: 2 / 3;
  }

  /* VIDEO SECTION */

  .section-video {
    margin-bottom: 2.4rem;
  }

  /* HOW WE HELP SECTION */

  .how-screenshot {
    width: 80%;
  }

  .heading-tertiary--how {
    margin-bottom: 0.8rem;
  }

  .how-paragraph {
    font-size: 1.4rem;
  }

  /* TESTIMONIALS SECTION */

  .section-testimonials {
    margin-bottom: 4.8rem;
  }

  .testimonial {
    padding: 1.6rem;
  }

  .testimonial-text {
    margin-bottom: 1.2rem;
  }

  .testimonial-text,
  .testimonial-company {
    font-size: 1.4rem;
  }

  .testimonial-name {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
  }

  /* CTA SECTION */

  .cta {
    width: 100%;
    transform: translate(0, 0);
  }

  .cta-heading {
    font-size: 5.2rem;
    padding: 2.4rem 1.6rem;
  }

  .cta-text-box {
    padding: 2.4rem 1.6rem;
  }

  .cta-text {
    font-size: 1.4rem;
  }

  /* GALLERY SECTION */

  .section-gallery {
    margin-bottom: 8rem;
  }

  /* Change the structure of the grid for the gallery */

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

  .gallery-item--1 {
    grid-column: 1 / 3;
    grid-row: 1 / 4;
  }

  .gallery-item--2 {
    grid-column: 1 / 3;
    grid-row: 5 / 6;
  }

  .gallery-item--3 {
    grid-column: 3 / 5;
    grid-row: 2 / 4;
  }

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

  .gallery-item--5 {
    grid-column: 1 / 2;
    grid-row: 6 / 7;
  }

  .gallery-item--6 {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
  }

  .gallery-item--7 {
    grid-column: 4 / 5;
    grid-row: 4 / 5;
  }

  .gallery-item--8 {
    grid-column: 3 / 5;
    grid-row: 5 / 6;
  }

  .gallery-item--11 {
    grid-column: 2 / 5;
    grid-row: 6 / 7;
  }
}

/* ********************************* */
/* BELOW 368px */
/* Small Phones */
/* ********************************* */

@media (max-width: 23em) {
  /* HERO SECTION */

  .section-hero--home,
  .hero-img--home {
    height: 45rem;
  }

  .hero-container--home {
    left: 0rem;
    top: 15rem;
  }

  /* CLIENTS SECTION */

  .section-clients .container--global {
    padding: 2.4rem 0;
  }

  .subheading--clients {
    font-size: 1.2rem;
    margin-bottom: 2.4rem;
  }

  .clients-logos img {
    height: 2rem;
  }

  #lloydHill,
  #geoafrika {
    height: 1.6rem; /* ~0.4rem smaller than clients-logos img */
  }

  #premier {
    height: 3.2rem; /* ~1.2rem bigger than clients-logos img */
  }

  /* HOW WE HELP SECTION */

  .section-how {
    margin-bottom: 8rem;
  }

  .how-screenshot {
    width: 90%;
  }

  .how-paragraph {
    font-size: 1.4rem;
  }

  /* TESTIMONIALS SECTION */

  .testimonial-text,
  .testimonial-company {
    font-size: 1.2rem;
  }

  .testimonial-name {
    font-size: 1.4rem;
    margin-bottom: 0rem;
  }

  /* CTA SECTION */

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

  .cta-text {
    font-size: 1.4rem;
    padding-bottom: 2.4rem;
  }
}
