:root {
  --rioja-wine: #722F37;
  --rioja-wine-dark: #4A151B;
  --rioja-gold: #D4AF37;
  --rioja-gold-light: #F3E5AB;
  --rioja-green: #16A34A;
  --rioja-blue: #0284C7;
  --rioja-dark: #0F172A;
  --rioja-bg: #F8FAFC;
  --rioja-surface: #FFFFFF;
  --font-serif: 'Cinzel', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: var(--font-sans);
  background-color: var(--rioja-bg);
  color: #1E293B;
}

/* Solo bloquear el scroll cuando estemos en el mapa interactivo full-screen */
html.map-app, body.map-app {
  height: 100%;
  overflow: hidden;
}

body.adventure {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body.adventure.map-app {
  height: 100%;
  overflow: hidden;
}

/* Espaciado del contenido para páginas con header fijo */
body.adventure:not(.map-app),
body.adventure-place-detail {
  padding-top: 80px;
  padding-bottom: 60px;
}

.font-serif {
  font-family: var(--font-serif);
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(74, 21, 27, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: white;
}

.app-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rioja-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rioja-wine-dark);
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.app-brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.app-brand-subtitle {
  font-size: 0.65rem;
  color: var(--rioja-gold-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-passport-pill {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-passport-pill:hover {
  background: rgba(212, 175, 55, 0.25);
  color: var(--rioja-gold-light);
}

/* ==========================================================================
   HORIZONTAL CATEGORY PILLS (DISNEY STYLE)
   ========================================================================== */
.map-floating-panel {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 990;
  padding: 4px 12px;
  pointer-events: none;
}

.filter-scroll-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px 0;
  pointer-events: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-scroll-container::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  padding: 7px 15px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.filter-pill.active {
  background: var(--rioja-wine);
  color: white;
  border-color: var(--rioja-wine);
  box-shadow: 0 4px 14px rgba(114, 47, 55, 0.35);
}

.filter-pill.active i {
  color: var(--rioja-gold) !important;
}

.filter-pill.open-now-toggle.active {
  background: #16A34A;
  border-color: #16A34A;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

/* ==========================================================================
   MAP CONTAINER & MARKERS
   ========================================================================== */
#map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.poi-map-marker {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--rioja-wine);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  border: 3px solid white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.poi-map-marker:hover {
  transform: scale(1.15);
}

.poi-map-marker.patrimonio, .poi-map-marker.cultura { background: #8B0000; }
.poi-map-marker.recreacion, .poi-map-marker.parque { background: #16A34A; }
.poi-map-marker.servicios, .poi-map-marker.bano_publico, .poi-map-marker.fuente { background: #0284C7; }
.poi-map-marker.movilidad, .poi-map-marker.transporte { background: #334155; }
.poi-map-marker.gastronomia, .poi-map-marker.restaurante { background: #C85A32; }
.poi-map-marker.bodega, .poi-map-marker.bodegas { background: #581845; }
.poi-map-marker.alojamiento, .poi-map-marker.hotel_hostal { background: #1E293B; }

/* Marcadores Patrocinados de Pago (Shimmer VIP) */
.poi-map-marker.sponsored, .poi-map-marker.is-sponsored {
  background: linear-gradient(135deg, #D4AF37 0%, #997A15 100%) !important;
  border: 3px solid #FFF8DC;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.75);
  animation: sponsoredGlow 2.5s infinite;
}

@keyframes sponsoredGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(212, 175, 55, 0.6); }
  50% { transform: scale(1.12); box-shadow: 0 0 22px rgba(212, 175, 55, 0.95); }
}

/* Marcador GPS de Usuario en Tiempo Real */
.user-pulse-marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563EB;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.85);
  animation: userPulse 2s infinite;
  position: relative;
}

.user-pulse-marker::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  top: 5px;
  left: 5px;
}

@keyframes userPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.8); }
  70% { box-shadow: 0 0 0 18px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.btn-locate-user {
  position: fixed;
  bottom: 220px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  color: #1E293B;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 990;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-locate-user:hover {
  background: #F8FAFC;
  transform: scale(1.05);
}

.btn-locate-user.locating {
  color: #2563EB;
  animation: locateSpin 1s infinite linear;
}

@keyframes locateSpin {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   BOTTOM SHEET / RADAR INFORMATIVO
   ========================================================================== */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.18);
  padding: 12px 18px 24px 18px;
  z-index: 995;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 600px;
  margin: 0 auto;
}

.sheet-handle {
  width: 40px;
  height: 5px;
  background: #E2E8F0;
  border-radius: 10px;
  margin: 0 auto 10px auto;
}

.bottom-sheet.sheet-minimized {
  transform: translateY(110%);
}

.pill-reopen-sheet {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50px;
  padding: 10px 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--rioja-wine-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 994;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-reopen-sheet.show {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   PLACE DETAIL PAGE (FICHA DE LUGAR)
   ========================================================================== */
.place-detail-card {
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px rgba(74, 21, 27, 0.08);
  overflow: hidden;
}

.place-detail-hero {
  position: relative;
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  background: var(--rioja-wine-dark);
}

.place-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.place-detail-hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.place-detail-body {
  padding: 2.2rem;
}

.place-badge-category {
  background-color: var(--rioja-wine);
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 50px;
}

.place-badge-sponsored {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #1E293B;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.place-title {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.place-subtitle {
  color: #64748B;
  font-size: 1.15rem;
  font-weight: 500;
}

.place-info-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 1.6rem;
}

.place-info-box h6 {
  font-size: 0.95rem;
  color: var(--rioja-wine);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-rioja-primary {
  background: linear-gradient(135deg, #722F37 0%, #4A151B 100%);
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  border-radius: 50px;
  padding: 12px 26px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(114, 47, 55, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-rioja-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(114, 47, 55, 0.45);
  color: var(--rioja-gold-light);
}

.btn-rioja-outline {
  background: transparent;
  color: #475569;
  border: 1.5px solid #CBD5E1;
  font-weight: 600;
  border-radius: 50px;
  padding: 12px 26px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-rioja-outline:hover {
  background: #F1F5F9;
  color: #1E293B;
  border-color: #94A3B8;
}