/* ==========================================================================
   WIELKA PIELGRZYMKA GWIAŹDZISTA & ORLE GNIAZDA 2026
   Modern Sacred-Aesthetic Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #0a0f1d;
  --bg-secondary: #131b2e;
  --bg-surface: #1a243c;
  --bg-surface-elevated: #233152;
  --bg-glass: rgba(19, 27, 46, 0.82);
  --bg-glass-light: rgba(255, 255, 255, 0.05);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-light: #ffffff;

  --gold-primary: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #b45309;
  --gold-glow: rgba(245, 158, 11, 0.35);

  --royal-blue: #3b82f6;
  --royal-blue-glow: rgba(59, 130, 246, 0.3);
  --sacred-crimson: #ef4444;
  --sacred-crimson-glow: rgba(239, 68, 68, 0.35);
  --emerald: #10b981;
  --purple: #8b5cf6;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.3);
  --border-focus: rgba(59, 130, 246, 0.6);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Cinzel', serif;

  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  height: 72px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-symbol {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-gold);
}

.brand-symbol i {
  color: var(--gold-light);
  font-size: 20px;
  filter: drop-shadow(0 0 8px var(--gold-light));
}

.star-halo {
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  animation: haloPulse 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes haloPulse {
  0% { transform: scale(0.95); opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0.9; }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-light);
  text-transform: uppercase;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-light);
  background: linear-gradient(90deg, #ffffff, #fde68a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Central Stage Switcher Buttons */
.stages-nav {
  display: flex;
  align-items: center;
  background: rgba(10, 15, 29, 0.7);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 6px;
}

.stage-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: var(--font-main);
  position: relative;
  text-align: left;
}

.stage-btn:hover {
  color: var(--text-light);
  background: var(--bg-glass-light);
}

.stage-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--border-gold);
  color: #fff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.stage-num {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.stage-btn.active .stage-num {
  background: var(--gold-primary);
  color: #000;
}

.stage-info {
  display: flex;
  flex-direction: column;
}

.stage-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.stage-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.stage-btn.active .stage-sub {
  color: var(--gold-light);
}

.stage-badge-highlight {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 9px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.stage-arrow {
  color: var(--text-muted);
  font-size: 10px;
  padding: 0 2px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-main);
  border: none;
}

.live-indicator-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.live-indicator-btn:hover {
  background: rgba(239, 68, 68, 0.28);
  box-shadow: 0 0 20px var(--sacred-crimson-glow);
  color: #fff;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--sacred-crimson);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--sacred-crimson);
  animation: livePing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes livePing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.primary-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.primary-gold:hover {
  background: linear-gradient(135deg, #fde68a, var(--gold-light));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-layout {
  display: flex;
  height: calc(100vh - 72px);
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  width: 440px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 500;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* Hero Stage Banner inside Sidebar */
.stage-hero-banner {
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(35, 49, 82, 0.6) 0%, rgba(19, 27, 46, 0.9) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.banner-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.banner-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.3;
}

.banner-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.banner-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(10, 15, 29, 0.6);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

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

.b-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-light);
}

.b-lbl {
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Sidebar Tab Buttons */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-main);
}

.tab-btn:hover {
  color: var(--text-light);
  background: var(--bg-glass-light);
}

.tab-btn.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.05);
}

/* Scrollable Container */
.sidebar-scrollable-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.tab-pane.active {
  display: flex;
}

/* Filters */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-chip:hover {
  border-color: var(--text-muted);
  color: var(--text-light);
}

.filter-chip.active {
  background: var(--royal-blue);
  color: #fff;
  border-color: var(--royal-blue);
  box-shadow: 0 2px 8px var(--royal-blue-glow);
}

/* Dynamic Routes Cards */
.routes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.route-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--card-color, var(--gold-primary));
}

.route-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
  background: var(--bg-surface-elevated);
}

.route-card.selected {
  border-color: var(--gold-light);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  background: rgba(35, 49, 82, 0.7);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-mode-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-distance {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-light);
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.card-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 4px;
}

.btn-card-action {
  font-size: 11px;
  font-weight: 600;
  color: var(--royal-blue);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-card-action:hover {
  text-decoration: underline;
  color: #93c5fd;
}

.btn-card-live {
  font-size: 10px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.btn-card-live:hover {
  background: var(--sacred-crimson);
  color: #fff;
}

/* Day-by-Day Stage 2 Cards */
.day-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.day-card:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.day-card.selected {
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.day-card.highlight-fathers-day {
  border: 1px solid #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.08));
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.day-num-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.day-date-tag {
  font-size: 11px;
  color: var(--text-secondary);
}

.day-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.day-route {
  font-size: 12px;
  color: #93c5fd;
  margin-bottom: 8px;
}

.day-highlights-list {
  list-style: none;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}

.day-highlights-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-highlights-list li i {
  color: var(--gold-primary);
  font-size: 9px;
}

/* Ojców Special Banner */
.ojcow-special-alert {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ojcow-special-alert .alert-icon {
  font-size: 22px;
  color: #f87171;
}

.ojcow-special-alert .alert-body strong {
  color: #fff;
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.ojcow-special-alert .alert-body p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.btn-micro {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-micro:hover {
  background: var(--gold-primary);
  color: #000;
}

/* Lodging List */
.lodging-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lodging-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.lodging-card:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.lodging-type-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  margin-bottom: 4px;
}

.lodging-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.lodging-details {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.lodging-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.amenity-pill {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* Multimedia POI Grid */
.poi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.poi-card {
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.poi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-light);
}

.poi-img-wrap {
  height: 130px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.poi-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.poi-card:hover .poi-img-wrap img {
  transform: scale(1.05);
}

.poi-category {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.7);
  color: var(--gold-light);
  backdrop-filter: blur(4px);
}

.poi-content {
  padding: 10px 12px;
}

.poi-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.poi-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Intentions Tab */
.intentions-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.intentions-header h3 {
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.intentions-header p {
  font-size: 11px;
  color: var(--text-muted);
}

.intention-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 15, 29, 0.4);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.form-group input, .form-group textarea, .form-group-row select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 12px;
  transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus, .form-group-row select:focus {
  outline: none;
  border-color: var(--gold-light);
}

.form-group-row {
  display: flex;
  gap: 6px;
}

.form-group-row select {
  flex: 1;
}

.btn-submit-intention {
  padding: 8px 14px;
  background: var(--gold-primary);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-submit-intention:hover {
  background: var(--gold-light);
}

.intentions-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intention-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.intention-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.intention-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
}

.intention-time {
  font-size: 10px;
  color: var(--text-muted);
}

.intention-body {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
  font-style: italic;
}

.intention-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 6px;
}

.btn-amen {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  padding: 2px 8px;
  font-size: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-amen:hover {
  color: var(--sacred-crimson);
  border-color: var(--sacred-crimson);
}

/* ==========================================================================
   MAP SECTION
   ========================================================================== */
.map-section {
  flex: 1;
  height: 100%;
  position: relative;
}

#pilgrimage-map {
  width: 100%;
  height: 100%;
  background: #0b1220;
}

/* Map Layer Selector Floating Control */
.map-layer-selector {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 800;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-md);
}

.selector-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.layer-pill {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.layer-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.layer-pill.active {
  background: var(--gold-primary);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Floating Status HUD */
.map-hud-overlay {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 800;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.text-gold { color: var(--gold-light); }
.text-primary { color: var(--royal-blue); }
.text-red { color: var(--sacred-crimson); }

.hud-live-tag {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: #fca5a5;
  transition: all var(--transition-fast);
}

.hud-live-tag:hover {
  background: var(--sacred-crimson);
  color: #fff;
}

.live-dot-mini {
  width: 6px;
  height: 6px;
  background: var(--sacred-crimson);
  border-radius: 50%;
  animation: livePing 1.5s infinite;
}

/* Virtual Walk Simulator Bar */
.digital-sim-bar {
  position: absolute;
  top: 18px;
  left: 24px;
  z-index: 800;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-gold);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sim-info {
  display: flex;
  flex-direction: column;
}

.sim-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.sim-step {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.sim-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: var(--radius-full);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sim-btn:hover {
  background: var(--royal-blue);
  border-color: var(--royal-blue);
}

.sim-play-btn {
  width: auto;
  padding: 0 14px;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  background: var(--gold-primary);
  color: #000;
  border-color: var(--gold-primary);
}

.sim-play-btn:hover {
  background: var(--gold-light);
}

.sim-speed {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.sim-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.sim-close:hover {
  color: #fff;
}

/* Custom Leaflet Marker Styling */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pin-bg, #3b82f6);
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: transform 0.2s ease;
}

.pin-icon:hover {
  transform: scale(1.15);
}

.pin-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--pin-bg, #3b82f6);
  animation: pinPulse 2s infinite;
  opacity: 0;
}

@keyframes pinPulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

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

.modal-close-btn:hover {
  color: #fff;
}

/* YouTube Live Multi-Screen Modal */
.modal-live {
  width: 1080px;
  height: 640px;
}

.modal-live-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.video-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000;
}

.iframe-wrapper {
  flex: 1;
  width: 100%;
  position: relative;
  background: #050505;
}

.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-meta {
  padding: 12px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sacred-crimson);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.video-channel-info h4 {
  font-size: 13px;
  color: #fff;
}

.video-channel-info p {
  font-size: 11px;
  color: var(--text-secondary);
}

.video-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewers-count {
  font-size: 12px;
  color: #fca5a5;
}

.btn-live-share {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

/* Live Sidebar */
.live-sidebar {
  width: 340px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.live-sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.live-sidebar-header h4 {
  font-size: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.streams-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-subtle);
}

.stream-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stream-item:hover {
  background: var(--bg-surface);
}

.stream-item.active {
  background: rgba(239, 68, 68, 0.12);
  border-left: 3px solid var(--sacred-crimson);
}

.stream-group-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.stream-viewers {
  font-size: 10px;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mini Live Chat */
.live-chat-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
}

.chat-msg {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.chat-msg.highlight {
  border-left: 2px solid var(--gold-light);
  background: rgba(245, 158, 11, 0.08);
}

.chat-user {
  font-weight: 700;
  color: var(--gold-light);
  margin-right: 4px;
}

.chat-txt {
  color: var(--text-primary);
}

.chat-input-bar {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  border-top: 1px solid var(--border-subtle);
}

.chat-input-bar input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 11px;
  color: #fff;
}

.chat-input-bar button {
  background: var(--sacred-crimson);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #fff;
  cursor: pointer;
}

/* Digital Certificate Modal */
.modal-digital {
  width: 680px;
}

.digital-form-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.btn-generate-cert {
  padding: 12px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #000;
  font-weight: 800;
  font-size: 13px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-generate-cert:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

/* Certificate Preview */
.certificate-preview {
  margin-top: 16px;
}

.cert-border {
  border: 4px double var(--gold-primary);
  padding: 8px;
  background: #fdfbf7;
  color: #1e293b;
  border-radius: var(--radius-md);
}

.cert-inner {
  border: 1px solid #d4af37;
  padding: 24px;
  text-align: center;
}

.cert-cross {
  font-size: 28px;
  color: #b45309;
  margin-bottom: 8px;
}

.cert-headline {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: #78350f;
  margin-bottom: 4px;
}

.cert-subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #92400e;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

.cert-presented {
  font-size: 12px;
  font-style: italic;
  color: #64748b;
  margin-bottom: 4px;
}

.cert-pilgrim-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  border-bottom: 2px solid #d4af37;
  display: inline-block;
  padding: 0 20px 4px 20px;
  margin-bottom: 12px;
}

.cert-text {
  font-size: 12px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 16px auto;
  color: #334155;
}

.cert-details {
  display: flex;
  justify-content: space-around;
  font-size: 11px;
  background: #f8fafc;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px dashed #cbd5e1;
  margin-bottom: 16px;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.cert-stamp {
  font-size: 11px;
  font-weight: 800;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-quote {
  font-size: 11px;
  font-style: italic;
  color: #64748b;
}

.cert-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Detail Modal */
.modal-detail {
  width: 520px;
}

.modal-body {
  padding: 20px;
  font-size: 13px;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-layout {
    flex-direction: column-reverse;
  }
  .sidebar {
    width: 100%;
    height: 48%;
  }
  .map-section {
    height: 52%;
  }
  .app-header {
    height: auto;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .stages-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .modal-live {
    width: 95vw;
    height: 85vh;
  }
  .modal-live-layout {
    flex-direction: column;
  }
  .live-sidebar {
    width: 100%;
    height: 240px;
  }
}

/* Lodging Search Input Box */
.lodging-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  margin-top: 4px;
  transition: all var(--transition-fast);
}

.lodging-search-box:focus-within {
  border-color: var(--gold-light);
  box-shadow: 0 0 12px var(--gold-glow);
}

.lodging-search-box i {
  color: var(--text-muted);
  font-size: 13px;
}

.lodging-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  font-family: var(--font-main);
  width: 100%;
  outline: none;
}

/* Floating FAB Action Buttons on Map */
.map-fab-bar {
  position: absolute;
  top: 76px;
  right: 18px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-fab-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
  position: relative;
}

.map-fab-btn:hover {
  background: var(--gold-primary);
  color: #000;
  transform: scale(1.08);
  box-shadow: var(--shadow-gold);
}

.map-fab-btn.active {
  background: var(--sacred-crimson);
  color: #fff;
  border-color: #f87171;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.fab-tooltip {
  position: absolute;
  right: 50px;
  background: rgba(10, 15, 29, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: all var(--transition-fast);
  border: 1px solid var(--border-subtle);
}

.map-fab-btn:hover .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* GPS User Marker on Map */
.user-gps-marker {
  position: relative;
}

.gps-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid #ffffff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.gps-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid #60a5fa;
  animation: gpsPulse 2s infinite;
}

@keyframes gpsPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

