/* Prevent background scrolling while modal is open */
body.modal-open {
  overflow: hidden;
}

.project-modal[hidden] {
  display: none;
}

/* Modal Background */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;
}

/* Dark Background */
.project-modal-overlay {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.75);
}

/* Modal Box */
.project-modal-content {
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);

  width: min(1100px, 100%);
  max-height: 90vh;

  background: #fff;

  border-radius: 8px;
  overflow: hidden;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Project Image */
.project-modal-image {
  background: #111;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 500px;
}

.project-modal-image img {
  width: 100%;
  height: 100%;

  max-height: 90vh;

  object-fit: contain;
}

/* Project Details */
.project-modal-details {
  padding: 45px 40px;

  overflow-y: auto;
}

.project-modal-category {
  margin: 0 0 10px;

  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-modal-details h2 {
  margin: 0 0 10px;

  font-size: 2rem;
}

.project-modal-location {
  margin-bottom: 30px;

  font-size: 0.95rem;
}

.project-modal-description h3,
.project-modal-work h3 {
  margin-bottom: 10px;

  font-size: 1.1rem;
}

.project-modal-work {
  margin-top: 25px;
  /* text-align: left; */
}

.project-modal-work ul {
  margin: 0;
  padding-left: 20px;
  text-align: left;
}

.project-modal-work li {
  margin-bottom: 8px;
  padding-left: 2px;
  text-align: left;
}

/* CTA */
.project-modal-cta {
  display: inline-block;

  margin-top: 30px;
  padding: 12px 22px;

  text-decoration: none;
}

/* Close Button */
.project-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;

  z-index: 2;

  width: 40px;
  height: 40px;

  border: none;
  border-radius: 50%;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;

  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

/* Mobile */
@media (max-width: 768px) {
  .project-modal {
    padding: 15px;
  }

  .project-modal-content {
    display: flex;
    flex-direction: column;

    max-height: 95vh;
  }

  .project-modal-image {
    min-height: 250px;
    max-height: 45vh;
  }

  .project-modal-image img {
    max-height: 45vh;
  }

  .project-modal-details {
    padding: 30px 25px;

    overflow-y: auto;
  }

  .project-modal-details h2 {
    font-size: 1.5rem;
  }
}
