:root {
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #27272a;
  --muted: #71717a;
  --border: #e4e4e7;
  --ring: #18181b;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Inter", sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fafafa;
  color: var(--primary);
}

/* ─── Header & Footer ─────────────────────────────────── */
.site-header {
  background-color: white;
  color: var(--primary);
  padding: 1.2rem;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.site-header img {
  height: 64px;
}
.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}
.site-footer {
  background-color: white;
  color: var(--primary);
  padding: 2.5rem;
  text-align: center;
  margin-top: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.site-footer a {
  color: var(--primary);
  text-decoration: underline;
  transition: opacity 0.2s;
}
.site-footer a:hover {
  opacity: 0.7;
}
.footer-social {
  margin-top: 1.5rem;
}
.footer-social a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--primary);
}

/* ─── Back link ───────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--primary);
}

/* ─── Weather ─────────────────────────────────────────── */
.weather-container {
  background-color: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}
.weather-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.weather-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.weather-toggle {
  color: var(--muted);
  transition: transform 0.2s ease;
}
.weather-toggle.open {
  transform: rotate(180deg);
}
.weather-cards {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.weather-cards.open {
  display: grid;
}
@media (max-width: 600px) {
  .weather-cards {
    grid-template-columns: 1fr;
  }
}
.weather-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.weather-date {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--primary);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.weather-times {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.weather-time-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}
.weather-time-label {
  color: var(--muted);
  width: 65px;
}
.weather-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.weather-temp {
  font-weight: 500;
  color: var(--primary);
}
.weather-icon {
  display: flex;
  align-items: center;
  color: var(--primary);
}

/* ─── Map ─────────────────────────────────────────────── */
.map-container {
  position: relative;
  width: 100%;
  height: clamp(300px, 50vh, 400px);
  margin-bottom: 24px;
}
#map {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}
.fullscreen-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  padding: 5px;
  cursor: pointer;
}
.fullscreen-button:hover {
  background: #f4f4f4;
}
.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999;
  margin: 0;
}
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  font-family: "Inter", sans-serif;
}
.leaflet-popup-content {
  margin: 0;
  padding-right: 22px;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}
.map-marker {
  background-color: #18181b;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.map-marker:hover {
  background-color: #27272a;
}

/* ─── Days ────────────────────────────────────────────── */
h1 {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--primary);
}
.day-container {
  background-color: white;
  border-radius: 12px;
  padding: clamp(16px, 4vw, 24px);
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}
.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.day-header h2 {
  margin: 0;
  padding: 0;
  border: none;
  color: var(--primary);
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 600;
}
.distance {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.distance i {
  font-size: 1.1rem;
}
.day-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}
.duration {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.duration i {
  font-size: 1.1rem;
}

/* ─── Places ──────────────────────────────────────────── */
.place-item {
  background-color: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 12px 0;
  transition: all 0.2s ease;
}
.place-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}
.place-content {
  padding: clamp(12px, 3vw, 16px);
}
.place-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: nowrap;
  justify-content: space-between;
}
.left-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 36px;
}
.place-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: clamp(0.75rem, 2vw, 0.875rem);
}
.ticket-checkbox {
  margin-top: 0;
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ticket-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.ticket-checkbox label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.number {
  background-color: var(--primary);
  color: var(--primary-foreground);
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0;
}
.place-name {
  flex: 1;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  word-break: break-word;
}
.ticket-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.ticket-link:hover {
  opacity: 0.9;
}
.ticket-link.free {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.ticket-link.free:hover {
  opacity: 1;
  background-color: #e5e7eb;
}
.time-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── Ticket cash badge ───────────────────────────────── */
.ticket-link.cash {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.ticket-link.cash:hover {
  opacity: 1;
  background-color: #fde68a;
}

/* ─── Day selector ────────────────────────────────────── */
.day-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.day-selector-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.day-selector-buttons {
  display: flex;
  gap: 6px;
}
.day-selector-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f4f4f5;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: all 0.15s ease;
}
.day-selector-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.day-selector-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* ─── Home page ───────────────────────────────────────── */
.home-intro {
  text-align: center;
  margin-bottom: 2rem;
}
.home-intro p {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.city-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.city-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}
.city-card-banner {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.city-card-banner.rome {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #dc2626 100%);
}
.city-card-banner.marrakech {
  background: linear-gradient(135deg, #fed7aa 0%, #ea580c 50%, #9a3412 100%);
}
.city-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.city-card-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}
.city-card-country {
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.city-card-tagline {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}
.city-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.city-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}
.city-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}
.city-card:hover .city-card-cta {
  opacity: 0.85;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  body {
    padding: 12px;
  }
  .place-header {
    gap: 8px;
  }
  .ticket-link {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  .number {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }
}
@media (max-width: 375px) {
  body {
    padding: 8px;
  }
  .day-container {
    padding: 12px;
  }
  .place-content {
    padding: 10px;
  }
}
