/* reset */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-size: 16px;
  vertical-align: baseline;
}

body,
html {
  background-color: #fefefe;
  font-size: 20px;
  line-height: 1em;
  scroll-behavior: smooth;
}

img {
  object-fit: cover;
}

h1 {
  margin-top: 45vh;
  margin-left: 0.2em;
  font-family: "din-next-bold", Helvetica, sans-serif;
  font-weight: 700;
  font-size: 2.5em;
  line-height: 1em;
}

h2 {
  margin-top: 1em;
  margin-bottom: 1.6rem;
  font-family: "din-next-bold", Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.8em;
  line-height: 1em;
  text-decoration: underline;
}

h3 {
  font-size: 1em;
  margin-bottom: 0.2em;
  text-transform: uppercase;
  text-decoration: underline 2px;
}

p.paragraph {
  margin: 1em 0.2em;
}

strong {
  font-weight: bold;
}

a:hover,
a:focus {
  text-decoration: underline solid 1px;
}

a:active {
  opacity: 0.5;
}

header {
  position: sticky;
  top: 0;
  background-color: #fefefe;
  padding: 0.5em;
  padding-top: 1em;
  z-index: 99;
}

.logo {
  font-size: 1.6em;
}

.logo:hover,
.logo:focus,
.logo:active {
  text-decoration: none;
}

.header-right {
  float: right;
}

div.header-right a {
  font-size: 1em;
}

div.divider img {
  width: 100vw;
  position: relative;
  top: 15px;
  display: block;
  margin: 0 auto;
}

.news {
  position: absolute;
  left: 70vw;
  top: 20vh;
  width: 340px;
  height: 245px;
  background-color: #fff;
  padding: 20px 15px;
}

.news-img {
  margin: 10px 0;
  width: 100%;
}

.news-title {
  font-size: 20px;
  font-weight: bold;
}
.news-paragraph {
  font-size: 14px;
}

.hero-img {
  background-image: url("../img/groupemeca-hero-img.jpg");
  object-fit: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  overflow: hidden;
  height: 75vh;
  width: 100%;
}

div.gradient {
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0)
  );
}

h1 {
  padding: 0.4em 0;
}

section {
  margin-top: 1em;
  padding: 1em 0.5em;
}

.section-background {
  /* background-color: #00030c; */
  background-color: #4b4b4a;
  color: #fff;
}

picture.graph {
  display: block;
  margin: 3em 1em 2em;
  object-fit: cover;
  overflow: hidden;
}

div.img-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  margin-top: 2.5em;
  margin-left: 0.2em;
}

figure {
  margin-bottom: 2em;
  border-radius: 50%;
}

figcaption {
  text-align: center;
  font-size: 1.3em;
}

div.zoom {
  display: block;
  margin: auto;
  margin-bottom: 1em;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
}

img.centered {
  display: block;
  /* margin: .5em auto; */
  width: 200px;
  height: 200px;
  object-fit: cover;
  overflow: hidden;
  min-width: 100%;
  min-height: 100%;
  scale: 1.2;

  -webkit-transition: all 0.4s ease-in-out;
  -moz-transition: all 0.4s ease-in-out;
  -ms-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
}

div.zoom:hover img,
div.zoom:focus img {
  /* there seems to be a glitch in safari when transform and border-radius work together; therefore using width and height to zoom-in on hover effect */
  width: 115%;
  height: 115%;
  /* -webkit-transform:scale(1.2);
  -moz-transform:scale(1.2);
  -ms-transform:scale(1.2);
  -o-transform:scale(1.2);
  transform: scale(1.2); */
  transform-origin: center;
}

img.wheel {
  display: block;
  margin: 0.5em auto;
  padding-top: 2em;
  width: 70%;
}

h4.cptn-certification {
  text-align: center;
  margin: 0 auto;
}

.cptn-certifications {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 2em;
  margin: 0 auto;
}

.cptn-certifications button {
  display: block;
  border: none;
  background-color: #4b4b4a;

  margin: 0 10px;
  padding: 10px;
  width: 20%;
  transition: opacity 0.2s ease-in;
}

.cptn-certifications button:hover {
  opacity: 0.8;
}

.cptn-certifications button a {
  font-size: 1em;
  color: white;
  font-family: din-next-bold, arial, sans-serif;
  text-transform: uppercase;
}

/* img.round-img {
  border-radius: 50%;
} */

img.timeline {
  width: 100%;
}

div.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2.5em;
  margin-left: 0.2em;
}

img.icon {
  display: block;
  margin: 0.5em auto;
  width: 100px;
  height: 100px;
  object-fit: cover;
  overflow: hidden;
  opacity: 0.5;
}

img.timeline {
  grid-column: span 2;
}

div.quality {
  margin-top: 4em;
}

h3.quality-title {
  margin-bottom: 0.6em;
}

h3.cptn-certifications {
  display: inline-block;
  text-align: center;
  margin: 2em auto;
}

div.quality ul li {
  list-style-type: disc;
  margin-top: 0.2em;
  margin-left: 1.5em;
  font-size: 0.9em;
}

.center {
  text-align: center;
  justify-content: center;
}

footer {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  padding: 2em 0.5em;
  background-color: #4b4b4a;
  color: #fff;
}

div.footer-column {
  margin-bottom: 0.5em;
}

div.footer-column p {
  font-size: 0.6em;
  line-height: 1.2em;
}

p.links-email {
  margin-top: 0.8em;
}

span.title-links-email {
  display: block;
  margin-bottom: 0.1em;
  font-weight: bold;
}

a.footer-link {
  color: #fff;
}

a.footer-link:hover,
a.footer-link:focus {
  text-decoration: underline solid 1px;
}

a.footer-link:active {
  opacity: 0.5;
}

/********************
  MEDIA QUERIES
********************/

@media screen and (min-width: 320px) {
  div.img-grid,
  footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news {
    left: 10vw;
    width: 80vw;
    height: auto;
    font-size: 12px;
  }

  h1 {
    margin-top: 60vh;
    margin-left: 0.4em;
  }
  p.paragraph {
    width: 70%;
  }

  div.gradient {
    padding-bottom: 2em;
  }

  figcaption {
    font-size: 1.4em;
  }

  .logo,
  h2,
  p.paragraph,
  div.img-grid,
  div.icon-grid,
  .footer-column {
    margin-left: 0.8em;
  }

  div.quality {
    margin-top: 100px;
    margin-left: 1.6em;
  }

  .quality-title {
    font-family: "din-next-bold";
    font-weight: 700;
  }

  div.quality ul li {
    margin-top: 1em;
  }

  .header-right {
    margin-right: 0.8em;
  }
}

@media screen and (max-width: 600px) {
  .cptn-certifications button a {
    font-size: 0.6em;
  }
  button.pledge {
    width: 100%;
  }
}

@media screen and (min-width: 768px) {
  div.img-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  button.pledge {
    width: 100%;
  }  

  .news {
    left: 40vw;
    width: 50vw;
    height: auto;
    font-size: 12px;
  }

  div.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logo,
  h1,
  h2,
  p.paragraph,
  div.img-grid,
  div.icon-grid,
  .footer-column {
    margin-left: 1em;
  }

  div.quality {
    margin-left: 2em;
  }

  h3.quality-title {
    margin-bottom: 1em;
    font-size: 1.2em;
  }

  div.quality ul li {
    list-style-type: disc;
    margin-top: 0.5em;
    margin-left: 1.5em;
    font-size: 1.2em;
  }

  .header-right {
    margin-right: 1em;
  }

  div.header-right a {
    font-size: 1.4em;
  }

  div.icon-grid,
  .our-clients {
    margin-bottom: 2em;
  }

  h1 {
    margin-top: 60vh;
  }

  h2 {
    font-size: 2em;
  }

  p.paragraph {
    width: 65%;
    font-size: 1.6em;
    line-height: 1.6em;
    margin-left: 1.2em;
  }

  img.centered {
    width: 180px;
    height: 180px;
  }

  picture.graph {
    width: 90%;
    margin: 4em auto;
  }

  figcaption {
    text-align: center;
    margin-top: 0.8em;
    margin-bottom: 2em;
    font-size: 1.5em;
    line-height: 1em;
  }

  img.wheel {
    margin-bottom: 3em;
    width: 40%;
  }

  img.icon {
    display: block;
    margin: auto;
    width: 120px;
    height: 120px;
  }

  img.icon:hover,
  img.icon:focus {
    opacity: 0.9;
    transition: 0.3s ease-in-out;
  }

  img.timeline {
    grid-column: span 3;
  }

  div.footer-column p {
    font-size: 0.8em;
    line-height: 1.2em;
  }
}

@media screen and (min-width: 1024px) {
  div.img-grid,
  div.icon-grid,
  footer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .news {
    left: 50vw;
    width: 40vw;
    height: auto;
    font-size: 12px;
  }

  img.timeline {
    grid-column: span 2;
  }
  div.footer-column {
    grid-column: span 1;
  }
}
