/* (Mantener las variables y resets globales de la versión anterior) */
:root {
    --bg-city: #f8f9fa; --bg-surface: #ffffff;
    --text-primary: #111827; --text-secondary: #4b5563;
    --border-soft: #e5e7eb; --brand-color: #ff385c;
    --live-color: #ef4444; --night-bg: #111827;
    --radius-xl: 24px; --radius-lg: 16px; --radius-md: 12px;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.05);
    --font-ui: system-ui, -apple-system, sans-serif;
    --font-editorial: "Georgia", serif;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-ui); background: var(--bg-city); color: var(--text-primary); padding-bottom: calc(80px + var(--safe-bottom)); overflow-x: hidden; }
img { display: block; max-width: 100%; object-fit: cover; }
button, input { font: inherit; border: none; background: transparent; outline: none; cursor: pointer; }
a { text-decoration: none; color: inherit; }

/* UTILS & LAYOUT */
.hidden-mobile { display: none !important; }
@media (min-width: 768px) { .hidden-desktop { display: none !important; } .hidden-mobile { display: flex !important; } body { padding-bottom: 0; } }
.module-section { padding: 24px 0; max-width: 1400px; margin: 0 auto; }
.section-title { font-size: 1.25rem; font-weight: 800; padding: 0 16px; margin-bottom: 16px; letter-spacing: -0.5px; }
.scroll-track { display: flex; gap: 16px; overflow-x: auto; padding: 0 16px 16px 16px; scrollbar-width: none; scroll-behavior: smooth; }
.scroll-track::-webkit-scrollbar { display: none; }
.bg-white { background: #fff; } .border-bottom { border-bottom: 1px solid var(--border-soft); }

/* HEADER */
.city-header { position: sticky; top: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); z-index: 1000; border-bottom: 1px solid var(--border-soft); padding: 12px 16px; }
.header-container { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-size: 1.6rem; font-weight: 900; letter-spacing: -1px; }
.brand span { color: var(--brand-color); }
.search-bar { flex: 1; max-width: 500px; display: flex; align-items: center; background: var(--bg-city); border-radius: 50px; padding: 10px 18px; }
.search-input { width: 100%; margin-left: 10px; font-weight: 500; }
.btn-primary { background: var(--text-primary); color: #fff; padding: 10px 24px; border-radius: 50px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.avatar-btn img { width: 40px; height: 40px; border-radius: 50%; }

/* 📍 TU BARRIO AHORA */
.neighborhood-dashboard { background: #fff; border-bottom: 1px solid var(--border-soft); padding: 24px 16px; max-width: 1400px; margin: 0 auto; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.current-location { font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; gap: 8px; letter-spacing: -0.5px; }
.btn-change-loc { font-size: 0.8rem; color: var(--brand-color); font-weight: 700; background: rgba(255,56,92,0.1); padding: 4px 10px; border-radius: 50px; }
.live-pulse { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--live-color); text-transform: uppercase; }
.live-pulse span { width: 8px; height: 8px; background: var(--live-color); border-radius: 50%; animation: pulse 1.5s infinite; }
.neighborhood-stats { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.stat-pill { display: flex; align-items: center; gap: 8px; background: var(--bg-city); padding: 10px 16px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; white-space: nowrap; border: 1px solid var(--border-soft); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* 🗺 QUÉ PASA CERCA (Tarjetas con Distancia) */
.nearby-card { min-width: 240px; background: var(--bg-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); position: relative; border: 1px solid var(--border-soft); }
.distance-tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.9); backdrop-filter: blur(4px); padding: 4px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 800; color: var(--text-primary); z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 4px; }
.nearby-img { width: 100%; height: 140px; object-fit: cover; }
.nearby-body { padding: 12px; }
.nearby-type { font-size: 0.7rem; color: var(--brand-color); font-weight: 800; text-transform: uppercase; margin-bottom: 4px; }
.nearby-title { font-size: 0.95rem; font-weight: 700; line-height: 1.2; }

/* ⏰ AGENDA (Esta Noche / Finde) */
.agenda-card { min-width: 260px; border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; height: 160px; position: relative; overflow: hidden; }
.agenda-night { background: var(--night-bg); color: #fff; }
.agenda-weekend { background: linear-gradient(135deg, #fef3c7, #fde68a); color: var(--text-primary); }
.agenda-time { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; margin-bottom: 8px; }
.agenda-title { font-size: 1.2rem; font-weight: 800; line-height: 1.2; z-index: 2; }
.agenda-bg-icon { position: absolute; right: -10px; bottom: -20px; font-size: 6rem; opacity: 0.1; z-index: 1; }

/* 💬 PREGUNTAS (Comunidad) */
.question-card { min-width: 280px; max-width: 320px; background: var(--bg-surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-soft); }
.q-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.q-avatar { width: 24px; height: 24px; border-radius: 50%; }
.q-user { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.q-text { font-size: 1.05rem; font-weight: 700; line-height: 1.4; margin-bottom: 16px; }
.q-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--brand-color); font-weight: 600; }

/* HISTORIAS, HALLAZGO E INTENCIONES (Mantienen sus estilos anteriores) */
.story-node { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 72px; }
.story-ring { width: 72px; height: 72px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, #111, #444); }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid #fff; }
.story-label { font-size: 0.8rem; font-weight: 600; text-align: center; }

.editorial-module { background: #1f2937; color: #fff; border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-direction: column; margin: 0 16px; position: relative; }
.editorial-img { width: 100%; height: 250px; }
.editorial-body { padding: 24px; }
@media (min-width: 768px) { .editorial-module { flex-direction: row; height: 340px; margin: 0 auto; max-width: 1400px; } .editorial-img { width: 60%; height: 100%; } .editorial-body { width: 40%; display: flex; flex-direction: column; justify-content: center; } }

.intent-module { padding: 24px 16px; max-width: 1400px; margin: 0 auto; }
.intent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.intent-btn { background: #fff; border: 1px solid var(--border-soft); padding: 16px; border-radius: var(--radius-lg); font-weight: 600; font-size: 0.95rem; text-align: left; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

/* FEED HÍBRIDO MASONRY (Actualizado para priorizar Lugares y Personas) */
.city-content { padding-bottom: 24px; }
.hybrid-feed-module { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.masonry-city { column-count: 2; column-gap: 16px; }
@media (min-width: 768px)  { .masonry-city { column-count: 3; } }
@media (min-width: 1024px) { .masonry-city { column-count: 4; } }

.feed-item { -webkit-column-break-inside: avoid; page-break-inside: avoid; break-inside: avoid-column; display: block; width: 100%; margin-bottom: 16px; background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); position: relative; }
.card-image { width: 100%; }
.card-body { padding: 16px; }

/* FAB & BOTTOM BAR */
.fab-map { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--text-primary); color: #fff; padding: 12px 24px; border-radius: 50px; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-float); z-index: 100; }
.bottom-bar { position: fixed; bottom: 0; width: 100%; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-top: 1px solid var(--border-soft); display: flex; justify-content: space-around; padding: 10px 0 calc(10px + var(--safe-bottom)); z-index: 1000; }
.nav-item { font-size: 1.5rem; color: var(--text-secondary); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
.nav-item.active { color: var(--text-primary); }
.post-btn span { background: var(--brand-color); color: #fff; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-weight: 300; }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; }

.fade-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }