@import "_global.css";

#project-page {
  padding-top: 80px;

  .content-wrap {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
  }
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
  padding-bottom: 80px;
}

.project-details {
  h1 {
    margin-bottom: 32px;
  }

  h2 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  section + section {
    margin-top: 56px;
  }
}

.project-content {
  max-width: 720px;
}

.project-image {
  position: sticky;
  top: 32px;
  overflow: hidden;
  border-radius: var(--rounding-medium);
  background-color: color-mix(in srgb, var(--primary-color) 8%, var(--white));

  img {
    display: block;
    width: 100%;
    min-height: 520px;
    object-fit: cover;
    border-radius: 0;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;

  figure {
    margin: 0;
    overflow: hidden;
    border-radius: var(--rounding-medium);
    aspect-ratio: 4 / 3;
  }

  figure:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }

  img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }
}

.products-used {
  padding: 32px;
  border-radius: var(--rounding-medium);
  background-color: color-mix(in srgb, var(--primary-color) 7%, var(--white));

  ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 32px;
    margin: 0;
    padding-left: 22px;
  }
}

.customer-testimonial blockquote {
  margin: 0;
  padding: 32px;
  border-left: 5px solid var(--primary-color);
  border-radius: 0 var(--rounding-medium) var(--rounding-medium) 0;
  background-color: color-mix(in srgb, var(--secondary-color) 12%, var(--white));

  p {
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-style: italic;
  }

  footer {
    font-weight: 700;
  }
}

#project-map {
  padding: 0 20px 80px;

  .map-embed {
    max-width: var(--content-max-width);
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--rounding-medium);
    background-color: color-mix(in srgb, var(--primary-color) 8%, var(--white));
  }

  iframe {
    display: block;
    width: 100%;
    min-height: 380px;
    border: 0;
  }
}

@media (max-width: 850px) {
  #project-page {
    padding-top: 56px;
  }

  #project-map {
    padding-bottom: 56px;
  }

  .project-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 56px;
  }

  .project-image {
    position: static;
    order: -1;

    img {
      min-height: 0;
      max-height: 560px;
    }
  }
}

@media (max-width: 560px) {
  .gallery-grid,
  .products-used ul {
    grid-template-columns: 1fr;
  }

  .gallery-grid figure:first-child {
    grid-column: auto;
  }

  .products-used,
  .customer-testimonial blockquote {
    padding: 24px;
  }
}
