/* ... existing styles ... */

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Slide up from bottom on mobile */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 500px; /* Desktop constraint */
  height: 85vh; /* Almost full screen */
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
}

.modal-hero {
  height: 250px;
  background-color: #eee;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Gradient overlay for text readability if needed */
.modal-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.modal-content {
  padding: 24px;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.modal-title h2 {
  font-size: 1.8rem;
  margin-bottom: 4px;
  line-height: 1.1;
}

.modal-rating {
  display: inline-flex;
  align-items: center;
  background: #fff8e1;
  color: #f39c12;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.modal-rating .material-icons-round {
  font-size: 16px;
  margin-right: 4px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.modal-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
}

.why-box {
  background: #f0f7ff;
  border-left: 4px solid var(--c-blue);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.why-box p {
  font-style: italic;
  color: #333;
  margin: 0;
}

/* Mini Map placeholder */
.mini-map-container {
  height: 150px;
  background: #eef;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="%23ddd"><rect width="100" height="100" fill="%23f2f2f2"/><path d="M0 0 L100 100 M100 0 L0 100" stroke="%23ddd" stroke-width="2"/></svg>'); /* Placeholder pattern */
  background-size: 50px 50px;
}

.mini-map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-btn-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  color: var(--c-blue);
  display: flex;
  align-items: center;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  padding-bottom: 40px; /* Bottom spacing */
}

.action-btn {
  flex: 1;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: var(--c-blue);
  color: white;
}

.btn-secondary {
  background: #f1f3f5;
  color: var(--text-main);
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center; /* Center on desktop */
  }
  .modal-card {
    height: auto;
    max-height: 80vh;
    border-radius: 24px;
    transform: scale(0.9);
    opacity: 0;
  }
  .modal-overlay.active .modal-card {
    transform: scale(1);
    opacity: 1;
  }
}
