/* Jakarta Integrated Public Transit - Design System & Core Stylesheet */
:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-dark: #075985;
  --accent: #d92d20;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-focus: #38bdf8;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --success: #16a34a;
  --warning: #eab308;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --container-max: 1240px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Accessibility screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation Bar */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.938rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: #f0f9ff;
}

/* Language Selector Dropdown */
.lang-dropdown-wrapper {
  position: relative;
}

.lang-current-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.lang-current-btn:hover {
  background: #e2e8f0;
}

.lang-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  width: 220px;
  display: none;
  z-index: 1001;
  grid-template-columns: 1fr;
  max-height: 340px;
  overflow-y: auto;
}

.lang-dropdown-menu.show {
  display: block;
}

.lang-item-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.lang-item-btn:hover, .lang-item-btn.active {
  background: #f0f9ff;
  color: var(--primary);
  font-weight: 700;
}

/* Mobile Nav Toggle */
.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.hero-content {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Route Planner Card Widget */
.route-planner-widget {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 1.75rem;
  margin-top: 1.5rem;
  text-align: left;
}

.planner-form-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-label {
  font-size: 0.813rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.station-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.938rem;
  font-weight: 600;
  background-color: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1em;
}

.station-select:focus {
  border-color: var(--primary);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-swap {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: all 0.2s;
}

.btn-swap:hover {
  background: #e2e8f0;
  color: var(--text-main);
  transform: rotate(180deg);
}

.btn-search-route {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-search-route:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
}

/* Quick destination chips */
.quick-destinations {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.813rem;
}

.quick-label {
  color: var(--text-muted);
  font-weight: 700;
}

.chip-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
}

.chip-btn:hover {
  background: #e0f2fe;
  color: var(--primary);
  border-color: #7dd3fc;
}

/* Route Result Panel */
.route-result-container {
  display: none;
  margin-top: 1.5rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.route-result-container.show {
  display: block;
}

.route-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Route timeline steps */
.route-steps-timeline {
  list-style: none;
  position: relative;
  padding-left: 2rem;
}

.route-steps-timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #cbd5e1;
}

.route-step-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.route-step-item:last-child {
  margin-bottom: 0;
}

.step-marker {
  position: absolute;
  left: -2rem;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.step-marker.origin {
  border-color: var(--success);
  background: var(--success);
}

.step-marker.dest {
  border-color: var(--danger);
  background: var(--danger);
}

.step-marker.transfer {
  border-color: var(--warning);
}

.step-body {
  background: white;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.step-action-title {
  font-weight: 700;
  font-size: 0.938rem;
  margin-bottom: 0.25rem;
}

.step-subtext {
  font-size: 0.813rem;
  color: var(--text-muted);
}

/* Filter Badges Bar */
.mode-filters-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem 0;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.filter-btn {
  background: white;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.filter-btn.active {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

.badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* Section Common Styles */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background-color: #f1f5f9;
}

.section-header {
  margin-bottom: 2.25rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Transit Hubs Grid */
.hubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.hub-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.hub-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.hub-location {
  font-size: 0.813rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.hub-modes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.mode-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-main);
}

.badge-mrt { background: #fee2e2; color: #b91c1c; }
.badge-lrt { background: #e0f2fe; color: #0369a1; }
.badge-krl { background: #dbeafe; color: #1d4ed8; }
.badge-whoosh { background: #ffe4e6; color: #881337; }
.badge-air, .badge-kabandara { background: #e0e7ff; color: #3730a3; }
.badge-tj, .badge-transjakarta { background: #ffedd5; color: #c2410c; }

.hub-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.hub-transfers-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.hub-transfers-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.transfer-tag {
  font-size: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: #334155;
}

/* Tourism Landmark Cards */
.tourism-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.tourism-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.tourism-category {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.tourism-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.tourism-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.tourism-transit-box {
  background: #f0f9ff;
  border-left: 3px solid var(--primary);
  padding: 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.813rem;
  color: #0369a1;
  font-weight: 600;
}

/* Google AdSense Responsive Wrapper (Valuable Inventory & No-CLS Guaranteed) */
.ad-slot-wrapper {
  margin: 2rem 0;
  padding: 0.5rem;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  overflow: hidden;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label {
  font-size: 0.688rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

/* Consent Management Platform Banner (Funding Choices & GDPR/UU PDP) */
.cmp-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  color: white;
  padding: 1.25rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.cmp-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.cmp-text {
  flex: 1 1 500px;
}

.cmp-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.cmp-text p {
  font-size: 0.813rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.cmp-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cmp-btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.813rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

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

.cmp-btn-primary:hover {
  background: var(--primary-hover);
}

.cmp-btn-secondary {
  background: #334155;
  color: white;
}

.cmp-btn-secondary:hover {
  background: #475569;
}

.cmp-link {
  color: #93c5fd;
  font-size: 0.813rem;
  text-decoration: underline;
}

/* Modal Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1.25rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: modalPop 0.2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Preference Item in Privacy Modal */
.preference-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.pref-label {
  display: flex;
  flex-direction: column;
}

.pref-desc {
  font-size: 0.813rem;
  color: var(--text-muted);
}

.pref-footer-note {
  margin-top: 1.25rem;
  font-size: 0.813rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand h4 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-col h5 {
  color: white;
  font-size: 0.938rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.813rem;
}

.btn-privacy-settings {
  background: none;
  border: none;
  color: #38bdf8;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.813rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .planner-form-grid {
    grid-template-columns: 1fr;
  }
  .btn-swap {
    margin: -0.5rem auto;
  }
  .btn-search-route {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }
  .nav-menu {
    display: none;
  }
  .mobile-toggle-btn {
    display: block;
  }
  .nav-menu.mobile-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
