/* ===== CSS VARIABLES ===== */
:root {
  --sun:    #F5A623;
  --sea:    #1A6B8A;
  --night:  #0D1B2A;
  --sand:   #F7F0E6;
  --accent: #E84855;
  --green:  #2D9B6F;
  --warn:   #E07B39;
  --grey:   #6B7280;
  --light:  #F0F4F8;
  --white:  #FFFFFF;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.15);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--sand);
  color: var(--night);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--night) 0%, var(--sea) 100%);
  color: var(--white);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}
.header-inner { max-width: 800px; margin: 0 auto; }
.site-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}
.site-subtitle {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

/* Progress bar */
.progress-bar-wrap {
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--sun);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-label {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: var(--night);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  justify-content: center;
}
.tab-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.tab-btn.active { background: var(--sun); color: var(--night); }

/* ===== TAB CONTENT ===== */
.tab-content { max-width: 800px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== DAY CARDS ===== */
.day-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.day-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: linear-gradient(90deg, var(--night) 0%, #1a3a5c 100%);
  color: var(--white);
  user-select: none;
  transition: background 0.2s;
}
.day-header:hover { background: linear-gradient(90deg, #0a1520 0%, #142e4a 100%); }
.day-meta {
  display: flex;
  flex-direction: column;
  min-width: 3.5rem;
}
.day-number {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sun);
}
.day-date {
  font-size: 0.78rem;
  opacity: 0.75;
}
.day-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
}
.day-toggle {
  font-size: 0.85rem;
  opacity: 0.6;
  transition: transform 0.25s;
}
.day-card.collapsed .day-toggle { transform: rotate(-90deg); }
.day-body { padding: 0; }
.day-card.collapsed .day-body { display: none; }

/* Warning banners */
.warning-banner {
  background: #FFF3CD;
  border-left: 4px solid var(--warn);
  color: #7a4f00;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
}
.warning-banner.warning-night {
  background: #EDE7F6;
  border-left-color: #7B1FA2;
  color: #4a1070;
}

/* Map embed */
.map-embed {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid #e5e7eb;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== TIMELINE TABLE ===== */
.timeline { table-layout: fixed; }
.timeline tbody tr:not(:last-child) { border-bottom: 1px solid #f0f0f0; }
.timeline-row { transition: background 0.15s; }
.timeline-row:hover { background: #fafafa; }
.timeline-row.main-activity { background: #FFFBF0; }
.timeline-row.main-activity:hover { background: #FFF5D6; }

.time-col {
  width: 60px;
  padding: 0.9rem 0.5rem 0.9rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sea);
  vertical-align: top;
  white-space: nowrap;
}
.dot-col {
  width: 28px;
  padding: 0.9rem 0;
  vertical-align: top;
  text-align: center;
  padding-top: 1.1rem;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-sun   { background: var(--sun); }
.dot-sea   { background: var(--sea); }
.dot-night { background: var(--night); }
.dot-accent { background: var(--accent); }
.dot-green { background: var(--green); }

.activity-col {
  padding: 0.85rem 1rem 0.85rem 0.25rem;
  vertical-align: top;
}

/* Activity content */
.activity-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.activity-detail {
  font-size: 0.82rem;
  color: #4b5563;
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.activity-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-confirmed {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}
.tag-optional {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

/* Highlight badge */
.main-badge {
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--sun);
  color: var(--night);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Buttons */
.btn-maps, .btn-walk {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-maps {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}
.btn-maps:hover { background: #DBEAFE; border-color: #93C5FD; }
.btn-walk {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}
.btn-walk:hover { background: #DCFCE7; border-color: #86EFAC; }

/* Checkbox */
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--grey);
  margin-top: 0.15rem;
}
.activity-check {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
  cursor: pointer;
}
.check-text { transition: color 0.15s; }
.activity-check:checked + .check-text {
  color: var(--green);
  font-weight: 600;
  text-decoration: line-through;
}
.timeline-row.done { opacity: 0.55; }
.timeline-row.done .activity-name { text-decoration: line-through; color: var(--grey); }

/* ===== INFO CARDS (used in tabs) ===== */
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.info-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--night);
}
.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--night);
}
.info-note {
  font-size: 0.82rem;
  color: var(--grey);
  margin-top: 0.75rem;
}

/* ===== BUDGET TABLE ===== */
.budget-table th {
  background: var(--night);
  color: var(--white);
  font-size: 0.8rem;
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.budget-table td {
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}
.budget-confirmed td { background: #F0FDF4; }
.budget-total td {
  background: var(--night);
  color: var(--white);
  font-size: 0.95rem;
}

/* ===== NIGHTLIFE GRID ===== */
.nightlife-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.nightlife-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--night);
}
.nightlife-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.nightlife-meta {
  font-size: 0.78rem;
  color: var(--sea);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.nightlife-detail {
  font-size: 0.82rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
}

/* ===== FREE TOURS TABLE ===== */
.freetours-table th {
  background: var(--sea);
  color: var(--white);
  font-size: 0.8rem;
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.freetours-table td {
  font-size: 0.83rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}
.tour-highlight td {
  background: #FFF9E6;
  font-weight: 600;
}

/* ===== BOOKING ITEMS ===== */
.booking-item {
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  border-left: 4px solid transparent;
}
.booking-confirmed {
  background: #F0FDF4;
  border-left-color: var(--green);
}
.booking-optional {
  background: #FFFBEB;
  border-left-color: var(--warn);
}
.booking-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.booking-detail {
  font-size: 0.82rem;
  color: #374151;
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

/* ===== SOLO TIPS ===== */
.tips-list { padding: 0; }
.tips-list li {
  font-size: 0.875rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.55;
}
.tips-list li:last-child { border-bottom: none; }
.tips-list li strong { color: var(--night); }

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--grey);
  border-top: 1px solid #e5e7eb;
  background: var(--white);
  margin-top: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .site-title { font-size: 2.5rem; }
  .nightlife-grid { grid-template-columns: 1fr 1fr; }
  .map-embed { height: 220px; }
  .time-col { width: 72px; font-size: 0.85rem; }
}
@media (max-width: 400px) {
  .tab-btn { font-size: 0.75rem; padding: 0.35rem 0.6rem; }
  .day-title { font-size: 0.88rem; }
  .activity-name { font-size: 0.88rem; }
  .btn-maps, .btn-walk { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
}