/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #171717;
  background-color: #FAFAFA;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
header {
  background: #FFFFFF;
  color: #171717;
  padding: 2rem 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E82127 0%, #C41E1A 100%);
  border-radius: 12px;
  color: white;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(232, 33, 39, 0.2);
}

header h1 {
  font-size: 2rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

header .subtitle {
  font-size: 1rem;
  color: #525252;
  font-weight: 400;
  margin-left: 64px;
}

/* Header Navigation */
header nav {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

header nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: #171717;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

header nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border-color: rgba(0,0,0,0.05);
}

header nav a.active,
header nav a:active {
  background: linear-gradient(135deg, #E82127 0%, #C41E1A 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(232, 33, 39, 0.3);
}

/* Main Content */
main {
  padding: 4rem 0;
  max-width: 1600px;
  margin: 0 auto;
}

section {
  background: white;
  padding: 3rem;
  margin-bottom: 3rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
}

section h2 {
  margin-bottom: 2rem;
  color: #171717;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

section h2::before {
  content: '';
  width: 4px;
  height: 28px;
  background: linear-gradient(135deg, #E82127 0%, #C41E1A 100%);
  border-radius: 2px;
}

/* Map */
.map-section {
  padding: 0 !important;
  overflow: hidden;
}

.map-section h2 {
  padding: 3rem 3rem 2rem 3rem;
  margin: 0;
}

#map {
  height: 600px;
  border-radius: 0;
  border: none;
  width: 100%;
}

.map-legend {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 1000;
  font-size: 0.875rem;
}

.map-legend-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: #171717;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Table */
.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
}

.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.price-table thead {
  background-color: #FAFAFA;
  border-bottom: 2px solid #E5E5E5;
}

.price-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #525252;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-table th .small {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
  text-transform: none;
  letter-spacing: normal;
  display: block;
  margin-top: 4px;
}

.price-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid #F5F5F5;
  font-size: 0.95rem;
}

.price-table tbody tr {
  transition: all 0.2s ease;
}

.price-table tbody tr:hover {
  background-color: #FAFAFA;
  transform: translateX(4px);
}

.price-table .price {
  font-family: 'SF Mono', 'Courier New', monospace;
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.price-table .price-eur {
  text-align: center;
}

.price-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}

.price-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.price-badge.green {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

.price-badge.yellow {
  background: linear-gradient(135deg, #FCD34D 0%, #FBBF24 100%);
  color: #78350F;
}

.price-badge.orange {
  background: linear-gradient(135deg, #FB923C 0%, #F97316 100%);
  color: white;
}

.price-badge.red {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
}

/* Chart */
.chart-section {
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
}

#priceChart {
  max-height: 420px;
  background: white;
  padding: 24px;
  border-radius: 8px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 3rem;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.875rem;
  color: #525252;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #171717;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 1rem;
  color: #737373;
  font-weight: 400;
}

/* Footer */
footer {
  background-color: #171717;
  color: #A3A3A3;
  padding: 3rem 0;
  text-align: center;
  margin-top: 4rem;
  border-top: 1px solid #262626;
}

footer a {
  color: #E82127;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #FF3B3F;
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }

  section {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  header {
    padding: 1.5rem 0;
  }

  header h1 {
    font-size: 1.5rem;
  }

  header .subtitle {
    font-size: 0.875rem;
    margin-left: 0;
    margin-top: 4px;
  }

  .logo {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  main {
    padding: 2rem 0;
  }

  section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  .map-section h2 {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }

  #map {
    height: 400px;
  }

  .map-legend {
    bottom: 12px;
    right: 12px;
    padding: 12px 16px;
    font-size: 0.8rem;
  }

  .price-table th,
  .price-table td {
    padding: 12px 8px;
    font-size: 0.85rem;
  }

  .price-table th {
    font-size: 0.75rem;
  }

  .price-badge {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-value {
    font-size: 1.75rem;
  }
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 8px;
  border: 1px solid rgba(0,0,0,0.05);
}

.leaflet-popup-tip {
  background: white;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.leaflet-popup-content {
  margin: 8px;
  line-height: 1.5;
}

.leaflet-container a.leaflet-popup-close-button {
  color: #737373;
  font-size: 24px;
  font-weight: 300;
  padding: 8px 12px;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: #171717;
}

/* Pulse animation for map markers */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 33, 39, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(232, 33, 39, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 33, 39, 0);
  }
}

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
/* Map Page Styles */
.custom-map-marker {
  transition: transform 0.2s ease;
}

.custom-map-marker:hover {
  transform: scale(1.1);
  z-index: 1000 !important;
}

/* Cluster Customization (Override Default) */
.marker-cluster-small {
  background-color: rgba(232, 33, 39, 0.6);
}

.marker-cluster-small div {
  background-color: rgba(232, 33, 39, 0.9);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.marker-cluster-medium {
  background-color: rgba(232, 33, 39, 0.6);
}

.marker-cluster-medium div {
  background-color: rgba(232, 33, 39, 0.9);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.marker-cluster-large {
  background-color: rgba(232, 33, 39, 0.6);
}

.marker-cluster-large div {
  background-color: rgba(232, 33, 39, 0.9);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* Modal Scrollbar */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 16px 16px 0;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Back Nav Hover */
.back-nav a {
  transition: color 0.2s ease;
}

@media (max-width: 600px) {
  .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
  }
}
