/* ============================================
   MODAL - Clean & Professional
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-content::-webkit-scrollbar {
  width: 4px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.modal-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  padding: 4px 10px;
  margin: -8px -8px 0 0;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg-card-hover);
  transform: rotate(90deg);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-image-wrapper {
  width: 100%;
  max-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.modal-image {
  width: 100%;
  height: 100%;
  max-height: 55vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.3;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-meta-item i {
  color: var(--primary);
  width: 16px;
  font-size: 0.85rem;
}

/* ============================================
   MODAL RESPONSIVE - MOBILE FIRST
   ============================================ */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 16px;
  }

  .modal-content {
    padding: 24px;
    max-width: 98vw;
    max-height: 95vh;
    border-radius: var(--radius);
  }

  .modal-image-wrapper {
    max-height: 40vh;
  }

  .modal-image {
    max-height: 40vh;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-desc {
    font-size: 0.85rem;
  }

  .modal-meta {
    gap: 12px;
  }

  .modal-meta-item {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 8px;
  }

  .modal-content {
    padding: 16px;
    max-width: 100vw;
    max-height: 98vh;
    border-radius: var(--radius-sm);
  }

  .modal-image-wrapper {
    max-height: 35vh;
  }

  .modal-image {
    max-height: 35vh;
  }

  .modal-title {
    font-size: 0.95rem;
  }

  .modal-desc {
    font-size: 0.8rem;
  }

  .modal-meta {
    flex-direction: column;
    gap: 8px;
  }

  .modal-meta-item {
    font-size: 0.75rem;
  }
}
