/* Project Popup Wrapper */
.project-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 1;
}

/* Close Button */
.popup-close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 32px;
  color: black;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.popup-close:hover {
  background: rgba(0,0,0,0.05);
  color: #333;
}

/* Animation */
@keyframes popupFade {
  from { opacity: 0; transform: translateY(-15px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Project Modal */
.project-modal {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1140px;
  max-height: 90vh;
  overflow-y: auto;
  animation: popupFade 0.3s ease;
  border-radius: 16px;
}

/* Modal Body */
.project-modal .modal-content {
  position: relative;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

.project-modal .modal-body {
  padding: 0;
  background: #f7f7fb;
}

/* Layout */
.project-modal .pm-layout {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 520px;
}

/* Left Section */
.project-modal .pm-left {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal .pm-image {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.15);
}

.project-modal .pm-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Section */
.project-modal .pm-right {
  padding: 26px;
  background: #ffffff;
}

.project-modal .pm-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1f2340;
  margin-bottom: 8px;
}

.project-modal .pm-address {
  font-size: .95rem;
  color: #4b5563;
  display: flex;
  gap: 8px;
}

/* Badge */
.project-modal .pm-badge {
  display: inline-block;
  padding: 6px 12px;
  background: #e9e1ff;
  color: #5b21b6;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
}

/* Info Rows */
.project-modal .pm-list {
  margin: 14px 0 8px 0;
  border-top: 1px solid #eef0f5;
  border-bottom: 1px solid #eef0f5;
  padding: 12px 0;
}

.project-modal .pm-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
  padding: 8px 0;
  font-size: .95rem;
}

.project-modal .pm-row .label {
  color: #6b7280;
  font-weight: 600;
}

.project-modal .pm-row .value {
  color: #111827;
}

/* About Section */
.project-modal .pm-about {
  background: #f7f7fb;
  border: 1px solid #eef0f5;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 12px;
}

/* Actions */
.project-modal .pm-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.project-modal .pm-btn {
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
}


/* -------------------------------------------------- */
/* 📱 MOBILE RESPONSIVENESS — PERFECT ON SMALL SCREENS */
/* -------------------------------------------------- */

@media (max-width: 992px) {
  .project-modal {
    max-width: 92%;
  }

  .project-modal .pm-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-modal .pm-left {
    min-height: 260px;
  }
}

@media (max-width: 600px) {

  .project-modal {
    max-width: 94%;
    max-height: 92vh;
    border-radius: 14px;
  }

  .popup-close {
    top: 10px;
    right: 10px;
    font-size: 26px;
    width: 32px;
    height: 32px;
  }

  .project-modal .pm-left {
    padding: 12px;
    min-height: 200px;
  }

  .project-modal .pm-right {
    padding: 18px;
  }

  .project-modal .pm-title {
    font-size: 1.35rem;
  }

  .project-modal .pm-row {
    grid-template-columns: 1fr;
  }

  .project-modal .pm-badge {
    font-size: .78rem;
    padding: 5px 10px;
  }

  .project-modal .pm-about {
    padding: 12px 14px;
  }

  .project-modal .pm-btn {
    padding: 10px 16px;
    font-size: .9rem;
  }
}
