:root {
  --primary-color: #0f172a;
  --accent-color: #2563eb;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

header {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

header nav a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

header nav a:hover {
  text-decoration: underline;
}

.view-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* MAP VIEW LAYOUT */
#map-view {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  height: 75vh;
}

#map {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.location-sidebar {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.25rem;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.location-sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.location-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.location-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.location-card h3 {
  font-size: 1.05rem;
  color: var(--accent-color);
  margin-bottom: 0.3rem;
}

.location-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover {
  background-color: #1d4ed8;
}

/* DETAIL VIEW LAYOUT */
#detail-view {
  display: none;
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.back-btn {
  margin-bottom: 1.5rem;
  background-color: #64748b;
}

.back-btn:hover {
  background-color: #475569;
}

.detail-header {
  margin-bottom: 1.5rem;
}

.detail-header h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
}

.detail-header .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* PHOTO MOSAIC / GALLERY GRID */
.detail-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mosaic-item {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mosaic-item img:hover {
  transform: scale(1.05);
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.detail-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  margin-top: 1.2rem;
}

.detail-content ul {
  margin-left: 1.25rem;
  line-height: 1.6;
}

.detail-meta {
  background-color: #f1f5f9;
  padding: 1.25rem;
  border-radius: 8px;
}

.detail-meta h4 {
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  #map-view {
    grid-template-columns: 1fr;
    height: auto;
  }
  #map {
    height: 400px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-mosaic {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  .mosaic-item {
    height: 160px;
  }
}
