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

:root {
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-light: #252542;
  --accent: #e8613c;
  --accent-soft: rgba(232, 97, 60, 0.15);
  --blue: #4a90c4;
  --blue-soft: rgba(74, 144, 196, 0.15);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-soft: rgba(255, 255, 255, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== HERO ===== */
.hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background:
    linear-gradient(180deg, transparent 0%, var(--bg-dark) 100%),
    linear-gradient(135deg, rgba(232,97,60,0.1) 0%, rgba(74,144,196,0.1) 100%),
    url('../images/general/hero-portugal.jpg') center/cover;
}

.hero-content {
  max-width: 600px;
}

.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-dark);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== NAV ===== */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-light);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ===== MAP ===== */
.map-section {
  margin-bottom: 48px;
}

.map-section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.map-section h2 i {
  color: var(--accent);
}

#map {
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.map-btn:hover { opacity: 0.85; }

.map-btn-primary {
  background: var(--accent);
  color: white;
}

/* ===== ITINERARY TABLE ===== */
.itinerary-overview {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2 i {
  color: var(--accent);
}

.table-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.table-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.family-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.family-both {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(232, 97, 60, 0.3);
}

.table-wrapper {
  overflow-x: auto;
}

.itinerary-table {
  width: 100%;
  border-collapse: collapse;
}

.itinerary-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}

.itinerary-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.itinerary-table tr:last-child td {
  border-bottom: none;
}

.itinerary-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.day-final {
  background: var(--blue-soft);
  color: var(--blue);
}

.night-cell {
  font-weight: 600;
  color: var(--text);
}

.drive-cell {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.drive-cell i {
  color: var(--blue);
  margin-right: 4px;
}

.row-final td {
  background: rgba(74, 144, 196, 0.05);
}

/* ===== CTA ===== */
.cta-detail {
  margin-top: 16px;
}

.btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent), #f07a5a);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-detail:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ===== SUMMARY ===== */
.summary {
  margin-bottom: 48px;
}

.summary h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary h2 i {
  color: var(--accent);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.summary-card i {
  font-size: 1.5rem;
  color: var(--accent);
}

.summary-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.summary-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 48px 24px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== ITINERARY DETAIL ===== */
.itinerary-timeline {
  position: relative;
  padding-left: 32px;
}

.itinerary-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-stop {
  position: relative;
  margin-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot i {
  font-size: 0.6rem;
  color: white;
}

.stop-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stop-card-header {
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.stop-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stop-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stop-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-nights {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-drive {
  background: var(--blue-soft);
  color: var(--blue);
}

.stop-card-body {
  padding: 20px 24px;
}

.activities-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activities-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.activities-list li i {
  color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
  width: 14px;
}

/* ===== ROADBOOK ===== */
.roadbook-day {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.roadbook-day-header {
  padding: 16px 24px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.day-info h3 {
  font-size: 1rem;
  font-weight: 600;
}

.day-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.roadbook-day-body {
  padding: 20px 24px;
}

.time-block {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.time-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  min-width: 80px;
  padding-top: 2px;
}

.time-content {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

/* ===== RESERVATIONS ===== */
.reservations-section {
  margin-bottom: 40px;
}

.reservations-section h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reservations-section h2 i {
  color: var(--accent);
}

.reservation-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.reservation-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.reservation-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-confirmed {
  background: rgba(72, 199, 142, 0.15);
  color: #48c78e;
}

.status-pending {
  background: rgba(255, 185, 0, 0.15);
  color: #ffb900;
}

.status-todo {
  background: var(--bg-light);
  color: var(--text-muted);
}

/* ===== BUDGET ===== */
.budget-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.budget-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.budget-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.budget-card-amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.budget-card-sub {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 4px;
}

.budget-table-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.budget-table-section h3 {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
}

.budget-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}

.budget-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.budget-table tr:last-child td {
  border-bottom: none;
}

.amount-cell {
  font-weight: 600;
  color: var(--accent);
  text-align: right;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-soft);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    flex-direction: column;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-mobile-toggle {
    display: block;
  }

  .hero-stats {
    gap: 24px;
  }

  .itinerary-timeline {
    padding-left: 20px;
  }

  .timeline-dot {
    left: -20px;
    width: 18px;
    height: 18px;
  }

  .itinerary-timeline::before {
    left: 8px;
  }
}

/* ===== LEAFLET OVERRIDES ===== */
.leaflet-container {
  background: var(--bg-card) !important;
}
