* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
}

section {
  padding: 20px;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

@media (min-width: 540px) {
  section {
    padding: 30px 60px;
  }
}

@media (min-width: 990px) {
  section {
    padding: 60px;
  }
}

/* Page-specific styles */
.hero {
  display: grid;
  gap: 20px;
  position: relative;
}

.hero img,
.hero picture {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.hero h1 {
  padding: 0 20px;
  font-size: 34px;
  line-height: 40px;
  font-weight: 500;
  font-family: 'Lato', sans-serif;
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.features {
  display: grid;
  gap: 50px;
}

.features-top,
.features-nested {
  display: grid;
  gap: 25px;
}

.feature,
.feature-nested {
  display: grid;
  gap: 10px;
}

.features-bottom .feature {
  gap: 25px;
  margin-bottom:50px;
}

.feature h3 {
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 5px;
  font-family: 'Lato', sans-serif;
  color: #3f3f3f;
  text-transform: uppercase;
  font-weight: 400;
}

.feature-nested h4 {
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 7px;
  font-family: 'Lato', sans-serif;
  font-weight: 100;
  color: #3f3f3f;
  text-transform: uppercase;
}

.feature p {
  font-size: 15px;
  line-height: 24px;
  font-family: 'Lato', sans-serif;
  max-width: 700px;
}

.gallery h2 {
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 5px;
  font-weight: 400;
  padding: 32px 0;
  text-align: center;
  color: #132f3e;
}

.gallery-images {
  display: grid;
  gap: 16px;
}

.gallery-images picture {
  display: block;
  height: 300px;
}

.gallery-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.gallery-more {
  position: relative;
}

.gallery-more p {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 50px;
  font-weight: 400;
}

.carousel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.carousel-image {
  max-width: 90%;
  max-height: 90%;
}

.close,
.prev,
.next {
  position: absolute;
  color: white;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

.close {
  top: 20px;
  right: 20px;
}

.prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.close:hover,
.prev:hover,
.next:hover {
  color: #ccc;
}

@media (min-width: 540px) {
  .hero {
    gap: 0;
    grid-template-rows: 1fr;
  }

  .hero h1 {
    color: white;
    grid-row: 1;
    grid-column: 1;
    align-self: center;
    padding: 0 60px;
    font-size: 45px;
    font-weight: 100;
  }

  .hero picture {
    grid-column: 1;
    grid-row: 1;
  }

  .gallery h2 {
    text-align: left;
    font-size: 24px;
    line-height: 30px;
  }

  .gallery-images {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .gallery-images picture {
    height: 200px;
  }

  .gallery-images img {
    height: 200px;
  }
}

@media (min-width: 990px) {
  .hero h1 {
    font-size: 58px;
  }

  .features {
    gap: 60px;
  }

  .features-top {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }

  .features-nested-2 {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }

  .features-nested-3 {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 50px;
  }

  .feature h3 {
    font-size: 24px;
    line-height: 30px;
  }

  .feature p {
    line-height: 26px;
  }

  .feature,
  .feature-nested {
    gap: 25px;
  }

  .gallery {
    padding: 60px 0;
  }

  .gallery h2 {
    padding: 32px 60px;
    font-size: 30px;
    line-height: 40px;
  }

  .gallery-images {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 400px 200px;
  }

  .gallery-images picture {
    height: 100%;
  }

  .gallery-images img {
    height: 100%;
  }

  .gallery-images .img-2 {
    grid-column: 2/4;
  }

  .gallery-images .img-4 {
    grid-column: 1/3;
  }

  .gallery-images .gallery-more {
    grid-column: 3/5;
  }

  .gallery-images .img-6 {
    display: none;
  }
}

@media (min-width: 1200px) {
  .hero h1 {
    width: 1200px;
    margin: 0 auto;
  }

  .features {
    width: 1200px;
    margin: 0 auto;
  }

  .gallery h2 {
    width: 1200px;
    margin: 0 auto;
  }
}

@media (min-width: 1320px) {
  .hero h1 {
    padding: 0;
  }

  .features {
    padding: 60px 0;
  }

  .gallery h2 {
    padding: 32px 0;
  }
}

/* Other Projects styles */
.otherProjects h2 {
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 5px;
  font-weight: 400;
  padding: 32px 0;
  text-align: center;
  color: #132f3e;
}

.otherProjects-container {
  display: flex;
  gap: 24px;
  overflow-x: scroll;
  overflow-y: hidden;
}

.otherProjects-container a {
  text-decoration: none;
}

.otherProjects-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.otherProjects-item {
  position: relative;
  display: grid;
  gap: 6px;
}

.otherProjects-item h4 {
  font-size: 12px;
  line-height: 15px;
  font-family: 'Lato', sans-serif;
  color: #132f3e;
  text-align: center;
  z-index: 2;
}

@media (min-width: 540px) {
  .otherProjects h2 {
    text-align: left;
    font-size: 24px;
    line-height: 30px;
  }

  .otherProjects-item:hover {
    cursor: pointer;
  }

  .otherProjects-item img {
    width: 130px;
    height: 100%;
  }

  .otherProjects-item h4 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    line-height: 30px;
    font-weight: 100;
    transition: all 0.3s ease-in-out;
  }

  .overlay {
    display: block;
    transition: all 0.3s ease-in-out;
  }
}

@media (min-width: 990px) {
  .otherProjects-container img {
    width: 220px;
    height: 100%;
  }

  .otherProjects h2 {
    font-size: 30px;
    line-height: 40px;
  }
}

@media (min-width: 1200px) {
  .otherProjects-container,
  .otherProjects h2 {
    width: 1200px;
    margin: 0 auto;
  }
}

@media (min-width: 1320px) {
  .otherProjects-container {
    padding: 0;
  }

  .otherProjects h2 {
    padding: 32px 0;
  }
}
