/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --teal-dark: #0f766e;
  --amber: #f59e0b;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --white: #ffffff;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #0e7490 100%);
  color: #fff;
  padding: 40px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60%; left: -10%;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; letter-spacing: .5px; }
.hero-subtitle { font-size: 1rem; opacity: .9; margin-bottom: 20px; font-weight: 300; }

.btn-copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s;
  font-family: inherit;
}
.btn-copy:hover { background: rgba(255,255,255,.28); }
.btn-copy.copied { background: rgba(255,255,255,.35); border-color: #fff; }

/* ===== Day Navigation ===== */
.day-nav {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  background: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.day-nav::-webkit-scrollbar { height: 4px; }
.day-nav::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 2px; }

.day-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 20px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  min-width: 80px;
}
.day-tab:hover { border-color: var(--teal-light); background: var(--sky-50); }
.day-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,148,136,.3);
}
.day-tab-date { font-size: .95rem; font-weight: 700; }
.day-tab-week { font-size: .75rem; opacity: .75; }

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.day-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.map-section {
  order: 2;
  position: sticky;
  top: 76px;
}
.day-info { order: 1; }

/* ===== Day Header ===== */
.day-header {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.day-header h2 { font-size: 1.3rem; color: var(--slate-800); margin-bottom: 4px; }
.day-subtitle { font-size: .85rem; color: var(--slate-500); margin-bottom: 10px; }
.day-summary { font-size: .92rem; color: var(--slate-600); line-height: 1.8; }
.day-acc {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--amber);
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 8px;
  font-size: .85rem;
  color: #92400e;
  font-weight: 500;
}

/* ===== Timeline ===== */
.timeline {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}
.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--slate-100);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-time {
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal);
  padding-top: 2px;
  text-align: right;
  white-space: pre-line;
}
.timeline-content { min-width: 0; }
.timeline-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.timeline-item.optional .timeline-title { color: var(--slate-500); }
.timeline-area {
  font-size: .8rem;
  color: var(--slate-500);
  margin-top: 2px;
}
.timeline-desc {
  font-size: .82rem;
  color: var(--slate-600);
  margin-top: 4px;
  line-height: 1.6;
}
.timeline-note {
  font-size: .8rem;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 6px;
  display: inline-block;
}
.badge-optional {
  font-size: .7rem;
  background: var(--slate-100);
  color: var(--slate-500);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 400;
}

.stop-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.btn-gmaps {
  display: inline-block;
  margin-top: 8px;
  font-size: .8rem;
  color: var(--teal);
  border: 1px solid var(--teal-light);
  padding: 5px 14px;
  border-radius: 6px;
  transition: all .2s;
  white-space: nowrap;
}
.btn-gmaps:hover { background: var(--teal); color: #fff; }

/* ===== Map Section ===== */
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.map-header h2 { font-size: 1.1rem; color: var(--slate-800); }
.btn-route {
  font-size: .82rem;
  background: var(--teal);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: background .2s;
}
.btn-route:hover { background: var(--teal-dark); }

.map {
  height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  z-index: 1;
}

.map-stops {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-stop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.map-stop-item .stop-number.general {
  background: var(--slate-400);
  border: 2px dashed #fff;
}
.map-stop-name { font-size: .88rem; font-weight: 600; color: var(--slate-800); }
.map-stop-area { font-size: .76rem; color: var(--slate-500); }
.btn-gmaps-small {
  margin-left: auto;
  font-size: .76rem;
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-gmaps-small:hover { text-decoration: underline; }

/* ===== Leaflet Custom Markers ===== */
.numbered-marker { background: transparent; border: none; }
.marker-pin {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  border: 2.5px solid #fff;
}
.marker-pin.marker-general {
  background: var(--slate-400);
  border-style: dashed;
}
.leaflet-popup-content { font-size: .85rem; line-height: 1.6; }
.leaflet-popup-content a { color: var(--teal); font-weight: 500; }
.leaflet-popup-content strong { font-size: .95rem; }

/* ===== Booking Section ===== */
.booking-section {
  margin-top: 36px;
}
.booking-section > h2 {
  font-size: 1.3rem;
  color: var(--slate-800);
  margin-bottom: 6px;
}
.booking-note {
  font-size: .85rem;
  color: var(--slate-500);
  margin-bottom: 18px;
}
.booking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.booking-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--teal);
  transition: box-shadow .2s;
}
.booking-card:hover { box-shadow: var(--shadow-md); }
.booking-badge {
  display: inline-block;
  font-size: .72rem;
  background: var(--sky-100);
  color: var(--teal-dark);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}
.booking-card h3 { font-size: 1rem; color: var(--slate-800); margin-bottom: 6px; }
.booking-date { font-size: .82rem; color: var(--slate-500); margin-bottom: 8px; }
.booking-note-text { font-size: .82rem; color: var(--slate-600); line-height: 1.6; margin-bottom: 14px; }
.btn-booking {
  display: inline-block;
  font-size: .85rem;
  background: var(--teal);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 500;
  transition: background .2s;
}
.btn-booking:hover { background: var(--teal-dark); }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 30px 16px;
  color: var(--slate-400);
  font-size: .8rem;
  border-top: 1px solid var(--slate-200);
  margin-top: 20px;
}
.footer code {
  background: var(--slate-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .78rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 30px 16px 26px; }
  .hero h1 { font-size: 1.25rem; }
  .hero-subtitle { font-size: .88rem; }

  .day-nav { padding: 10px 12px; }
  .day-tab { padding: 8px 16px; min-width: 70px; }
  .day-tab-date { font-size: .88rem; }

  .container { padding: 16px 12px 30px; }
  .day-layout { grid-template-columns: 1fr; }
  .map-section { order: 1; position: static; }
  .day-info { order: 2; }
  .map { height: 320px; }

  .day-header h2 { font-size: 1.15rem; }
  .timeline-item { grid-template-columns: 72px 1fr; gap: 10px; }
  .timeline-time { font-size: .76rem; }
  .timeline-title { font-size: .9rem; }

  .booking-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .day-layout { grid-template-columns: 1fr; }
  .map-section { position: static; }
  .map { height: 400px; }
}