/* =========================================
   iWantToExplore - Mobile Tour UI
   Redesigned for cleaner WalkingCap-style UX
   ========================================= */

:root {
  /* Light theme */
  --bg: #f9fafb;
  --bg-card: #ffffff;
  --bg-elevated: #f3f4f6;
  --fg: #111827;
  --fg-muted: #6b7280;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-glow: rgba(234, 88, 12, 0.2);
  --success: #10b981;
  --warning: #f59e0b;
  --border: #e5e7eb;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #e5e7eb;
  z-index: 1000;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #ea580c, #10b981);
  width: 0%;
  transition: width var(--transition);
}

/* App Header */
.app-header {
  position: fixed;
  top: var(--safe-top);
  left: 0;
  right: 0;
  height: 56px;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #f9fafb, transparent);
  z-index: 100;
  pointer-events: none;
}

.app-header > * {
  pointer-events: auto;
}

.app-header__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.app-header__city {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b7280;
}

.app-header__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.app-header__btn:hover {
  background: #f3f4f6;
}

.app-header__btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-selector__current {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-selector__current:hover {
  background: #f3f4f6;
  border-color: #ea580c;
}

.lang-selector__current svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.lang-selector__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 80px;
}

.lang-selector__option {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.lang-selector__option:hover {
  background: #f3f4f6;
}

.lang-selector__option[data-active="true"] {
  color: #ea580c;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(2rem + var(--safe-top)) 1.5rem 2.5rem;
  overflow: hidden;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
    linear-gradient(180deg, transparent 60%, var(--bg) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--fg) 0%, var(--fg-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__meta {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.hero__meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.hero__meta-item svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
}

.hero__summary {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 500px;
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 3rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.hero__btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hero__btn--primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  border: none;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.hero__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.hero__btn--secondary {
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border);
}

.hero__btn--secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.hero__install {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  border: none;
  background: var(--bg-elevated);
  color: var(--fg-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.hero__install svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero__install:hover {
  background: var(--accent);
  color: white;
}

.hero__ios-hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.hero__ios-hint svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.hero__ios-hint strong {
  color: var(--text);
}

.hero__ios-hint .ios-share-icon {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  vertical-align: middle;
  margin: 0 0.15em;
}

/* Hide install prompts when running as standalone PWA */
@media all and (display-mode: standalone) {
  .hero__install,
  .hero__ios-hint,
  .hero-card__install,
  .hero-card__ios-hint {
    display: none !important;
  }
}

/* iOS standalone mode (fallback) */
@media all and (display-mode: fullscreen) {
  .hero__install,
  .hero__ios-hint,
  .hero-card__install,
  .hero-card__ios-hint {
    display: none !important;
  }
}

/* =========================================
   Hero Card Style - Image on top, content below
   ========================================= */

.hero-card {
  margin: calc(56px + var(--safe-top)) 1rem 0;
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-card__image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}

.hero-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.hero-card__placeholder svg {
  width: 64px;
  height: 64px;
  fill: #9ca3af;
}

.hero-card__content {
  padding: 1.5rem;
}

.hero-card__badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(234, 88, 12, 0.1);
  border: 1px solid rgba(234, 88, 12, 0.3);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ea580c;
  margin-bottom: 0.75rem;
}

.hero-card__title {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
  margin-bottom: 0.75rem;
}

.hero-card__meta {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.hero-card__meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.hero-card__meta-item svg {
  width: 18px;
  height: 18px;
  fill: #ea580c;
}

.hero-card__summary {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
}

.hero-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 3rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.hero-card__btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hero-card__btn--primary {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: white;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.3);
}

.hero-card__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.hero-card__btn--secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.hero-card__btn--secondary:hover {
  background: #e5e7eb;
}

.hero-card__install {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.hero-card__install svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero-card__install:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: white;
}

.hero-card__ios-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #6b7280;
  font-size: 0.75rem;
}

.hero-card__ios-hint svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.hero-card__ios-hint strong {
  color: #111827;
}

.hero-card__ios-hint .ios-share-icon {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  vertical-align: middle;
  margin: 0 0.15em;
}

@media (min-width: 640px) {
  .hero-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-card__image {
    height: 280px;
  }
}

@media (min-width: 768px) {
  .hero-card__image {
    height: 320px;
  }

  .hero-card__content {
    padding: 2rem;
  }
}

/* Stops Container */
.stops-container {
  position: relative;
  padding: 2rem 0;
  min-height: 100vh;
}

.stops-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 1rem;
  gap: 1rem;
}

.stops-slider::-webkit-scrollbar {
  display: none;
}

/* Stop Slide Card */
.stop-slide {
  flex: 0 0 calc(100vw - 2rem);
  max-width: 500px;
  scroll-snap-align: center;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stop-slide__header {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.stop-slide__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stop-slide__info {
  flex: 1;
  min-width: 0;
}

.stop-slide__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.3;
  color: #111827;
}

.stop-slide__nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 2rem;
  border: 1px solid var(--success);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.stop-slide__nav-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.stop-slide__nav-btn:hover {
  background: var(--success);
  color: var(--bg);
}

.stop-slide__body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
}

.stop-slide__image {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

.stop-slide__image img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.stop-slide__image-credit {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.65rem;
  border-top-left-radius: 0.5rem;
}

.stop-slide__desc {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.stop-slide__points {
  list-style: none;
  margin-bottom: 1rem;
}

.stop-slide__points li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.stop-slide__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ea580c;
}

/* Tips */
.stop-slide__tip {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.stop-slide__tip--food {
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.stop-slide__tip--local {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.stop-slide__tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stop-slide__tip strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #111827;
}

.stop-slide__tip p {
  font-size: 0.85rem;
  color: #4b5563;
  margin: 0;
}

/* Audio Player */
.stop-slide__audio {
  margin-top: 1rem;
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f3f4f6;
  border-radius: var(--radius);
}

.audio-player__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #ea580c;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.audio-player__btn:hover {
  transform: scale(1.05);
}

.audio-player__btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.audio-player__progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.audio-player__bar {
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  overflow: hidden;
}

.audio-player__fill {
  height: 100%;
  background: #ea580c;
  width: 0%;
  transition: width 0.1s linear;
}

.audio-player__time {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Stop Footer */
.stop-slide__footer {
  padding: 1rem 1.25rem;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
}

.stop-slide__next {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.stop-slide__next svg {
  width: 20px;
  height: 20px;
  fill: var(--success);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Navigation Dots */
.stops-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
}

.stops-nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #d1d5db;
  cursor: pointer;
  transition: all var(--transition);
}

.stops-nav__dot--active {
  width: 24px;
  border-radius: 4px;
  background: #ea580c;
}

.stops-nav__dot:hover {
  background: #ea580c;
}

/* Swipe Hint */
.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  color: #6b7280;
  font-size: 0.85rem;
  opacity: 0.7;
  animation: fadeInOut 3s ease-in-out infinite;
}

.swipe-hint svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Map Section */
.map-section {
  padding: 2rem 1rem;
}

.map-section__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  color: #111827;
}

.map-section__map {
  width: 100%;
  height: 350px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.map-section__hint {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.75rem;
}

/* Footer */
.app-footer {
  padding: 2rem 1.5rem calc(2rem + var(--safe-bottom));
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
}

.app-footer a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #ea580c;
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (min-width: 640px) {
  .stop-slide {
    flex: 0 0 400px;
  }
  
  .stops-slider {
    padding: 0 calc(50vw - 200px);
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 60vh;
    padding-bottom: 4rem;
  }
  
  .hero__title {
    font-size: 3rem;
  }
}

/* Map tooltip override */
.map-tooltip {
  color: #0f172a !important;
  font-weight: 600 !important;
}
