/* Project modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}
.project-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.project-modal.visible .pm-overlay { opacity: 1; }

.pm-dialog {
  position: relative;
  width: 1000px;
  max-width: calc(100% - 40px);
  max-height: 90vh;
  margin: 0;
  overflow-y: auto;
  background: #fff;
  outline: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.project-modal.visible .pm-dialog {
  opacity: 1;
  transform: none;
}

.pm-close {
  position: absolute;
  top: 8px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 34px;
  line-height: 40px;
  color: #000;
  background: none;
  border: 0;
  cursor: pointer;
}

.pm-content { min-height: 200px; }
.pm-content.loading::after {
  content: "";
  display: block;
  width: 36px;
  height: 36px;
  margin: 80px auto;
  border: 3px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: pm-spin 0.8s linear infinite;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }

body.pm-open { overflow: hidden; }

/* Make sure the gallery slides behave inside the modal */
.pm-content .gallery-item { display: none; }
.pm-content .gallery-item.active { display: block; }
.pm-content .work_thumb { max-width: 100%; height: auto; }

@media (max-width: 768px) {
  .project-modal { display: none !important; } /* mobile uses normal page links */
}

/* Fixed two-column layout: text left, image right, regardless of image size */
.pm-content #ws-row {
  display: flex;
  width: 100%;
  min-height: 600px;
}
.pm-content .ws-right,
.pm-content .ws-left {
  float: none;
  width: 50%;
  flex: 0 0 50%;
  box-sizing: border-box;
}
.pm-content .ws-left {
  position: relative;
  min-height: 600px;
}
.pm-content .work-thumbs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pm-content .gallery-item { height: 100%; }
.pm-content .gallery-item .work_thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
