:root {
  --primary: #E8520A;
  --primary-light: #FFF0E8;
  --accent: #2D9F5F;
  --accent-light: #E8F7EE;
  --gold: #F5A623;
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --text: #1A1208;
  --text-muted: #7A6E63;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.13), 0 4px 12px rgba(0,0,0,0.07);
  --shadow-premium: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --bottom-nav-h: 72px;
  --glass-bg: rgba(255,255,255,0.75);
  --glass-border: rgba(255,255,255,0.5);
}

/* ── DARK MODE ── */
body.dark {
  --bg: #0F0F13;
  --surface: #1A1A22;
  --text: #F0EDE8;
  --text-muted: #8A8299;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.25);
  --shadow-premium: 0 20px 60px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
  --primary-light: rgba(232,82,10,0.15);
  --accent-light: rgba(45,159,95,0.15);
  --glass-bg: rgba(20,20,30,0.8);
  --glass-border: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: var(--bottom-nav-h);
  overscroll-behavior-y: none;
}

/* ── HEADER GLASSMORPHISM ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  transition: background 0.3s, border-color 0.3s;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  font-size: 14px;
  transition: background 0.2s, transform 0.15s;
}
.avatar-btn:active { background: #fddcc8; transform: scale(0.92); }
.avatar-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── DARK MODE TOGGLE ── */
.dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.dark-toggle:active { transform: scale(0.88) rotate(20deg); }
.dark-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body.dark .dark-toggle { background: rgba(232,82,10,0.18); }

/* ── VISIT COUNTER — slot machine ── */
.visit-counter {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  border: 1px solid rgba(232,82,10,0.15);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  cursor: default;
  transition: opacity 0.3s;
  overflow: hidden;
}
.visit-counter i { font-size: 11px; }
.visit-counter.loading { opacity: 0.5; }

.slot-digit {
  display: inline-block;
  animation: slotSpin 0.4s cubic-bezier(0.22,0.61,0.36,1) both;
}
@keyframes slotSpin {
  0%   { transform: translateY(-14px); opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}

/* ── HERO CAROUSEL ── */
.hero-carousel {
  margin: 16px 16px 0;
  border-radius: var(--radius-lg);
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 5px;
  overflow: hidden;
  position: relative;
  height: 200px;
  user-select: none;
  
}

/* ═══════════════════════════════════════
   HERO CAROUSEL — VERSIÓN AMPLIADA PARA PC
   ═══════════════════════════════════════ */

/* Tablet / pantallas medianas */
@media (min-width: 768px) {
  .hero-carousel {
    height: 340px;
  }
  .hero-slide {
    padding: 0 40px;
  }
  .hero-content {
    padding: 32px 28px !important;
    max-width: 55%;
  }
  .hero-title {
    font-size: 36px !important;
    line-height: 1.1;
    margin-right: 100px;
  }
  .hero-sub {
    font-size: 15px !important;
    margin-bottom: 22px;
  }
  .hero-cta {
    font-size: 14px;
    padding: 10px 20px;
  }
  .hero-img-side {
    width: 300px !important;
    height: 300px !important;
    margin-right: 18px;
    border-radius: 22px;
    border: 3px solid rgba(255,255,255,0.25);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  }
  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
  .hero-dots {
    bottom: 14px;
  }
}

/* Desktop grande */
@media (min-width: 1024px) {
  .hero-carousel {
    height: 420px;
  }
  .hero-slide {
    padding: 0 60px;
  }
  .hero-content {
    padding: 44px 36px !important;
    max-width: 50%;
  }
  .hero-title {
    font-size: 46px !important;
    margin-bottom: 8px;
  }
  .hero-sub {
    font-size: 17px !important;
    margin-bottom: 28px;
  }
  .hero-img-side {
    width: 580px !important;
    height: 380px !important;
    margin-right: 50px;
    border-radius: 26px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 16px 50px rgba(0,0,0,0.55);
  }
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Blurred background from the image itself */
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.25) saturate(1.2);
  transform: scale(1.12);
  z-index: 0;
  
}

/* Left: text content */
.hero-content {
  position: relative;
  padding: 18px 16px 18px 20px;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

/* Right: business image */
.hero-img-side {
  position: relative;
  z-index: 2;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  margin-right: 16px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  border: 2px solid rgba(255,255,255,0.2);
}

.hero-img-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 400px) {
  .hero-img-side { width: 110px; height: 110px; margin-right: 12px; }
  .hero-title { font-size: 20px !important; }
}

.hero-content {
  position: relative;
  padding: 22px 22px;
  z-index: 2;
  flex: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: 23px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 5px;
}

.hero-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 14px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, transform 0.15s;
}
.hero-cta:active { transform: scale(0.95); background: #fff; }

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.45);
  transition: width 0.35s, background 0.35s;
  cursor: pointer;
}

.hero-dot.active {
  width: 20px;
  background: #fff;
}

/* Progress bar */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255,255,255,0.5);
  z-index: 10;
  border-radius: 0 2px 2px 0;
  animation: none;
}

@keyframes progressBar {
  from { width: 0%; }
  to   { width: 100%; }
}

/* Arrow buttons */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-arrow:hover { background: rgba(255,255,255,0.35); }
.hero-arrow.prev { left: 10px; }
.hero-arrow.next { right: 10px; }

/* ── SEARCH ── */
.search-wrap {
  padding: 16px 16px 8px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-wrap .search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  margin-top: 4px;
}

.search-input {
  flex: 1;
  padding: 13px 50px 13px 42px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,82,10,0.12);
}

/* Voice button inside the input */
.voice-btn {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(232,82,10,0.35);
  z-index: 2;
}

.voice-btn:hover  { background: #c93e00; box-shadow: 0 4px 14px rgba(232,82,10,0.45); }
.voice-btn:active { transform: translateY(-50%) scale(0.92); }

/* Listening state */
.voice-btn.listening {
  background: #D93025;
  animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,48,37,0.5); }
  50%       { box-shadow: 0 0 0 8px rgba(217,48,37,0); }
}

/* Ripple ring while listening */
.voice-btn.listening::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(217,48,37,0.4);
  animation: voiceRing 1s ease-out infinite;
}

@keyframes voiceRing {
  0%   { transform: scale(0.85); opacity:1; }
  100% { transform: scale(1.5);  opacity:0; }
}

/* ── CATEGORIES ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 8px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.section-link {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
}

.categories {
  display: flex;
  gap: 10px;
  padding: 4px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.categories::-webkit-scrollbar { display: none; }

.category {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 68px;
  transition: transform 0.2s;
  scroll-snap-align: center;
}
.category:active { transform: scale(0.94); }

.cat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 2px solid transparent;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0px);   box-shadow: 0 4px 10px rgba(0,0,0,0.07); }
  50%       { transform: translateY(-6px); box-shadow: 0 10px 22px rgba(0,0,0,0.13); }
}

.categories .category:nth-child(1) .cat-icon { animation-delay: 0.0s; }
.categories .category:nth-child(2) .cat-icon { animation-delay: 0.35s; }
.categories .category:nth-child(3) .cat-icon { animation-delay: 0.70s; }
.categories .category:nth-child(4) .cat-icon { animation-delay: 1.05s; }
.categories .category:nth-child(5) .cat-icon { animation-delay: 1.40s; }
.categories .category:nth-child(6) .cat-icon { animation-delay: 1.75s; }

.category:active .cat-icon { animation-play-state: paused; }

.cat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted) black;
  text-align: center;
  transition: color 0.2s;
}

.category.active .cat-label { color: var(--primary); }
.category.active .cat-icon {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(232,82,10,0.2);
}

/* Category colors */
.cat-comida { background: #FFF0E8; color: #E8520A; }
.cat-salud   { background: #E8F7EE; color: #2D9F5F; }
.cat-servicios { background: #EEF0FF; color: #5B5FE8; }
.cat-belleza { background: #FCEEF6; color: #D94F8A; }
.cat-educacion { background: #FFFAE8; color: #C89A00; }
.cat-todos   { background: #F1EDE8; color: #5C4033; }

/* ── CARDS ── */
.cards-wrap { padding: 0 16px 8px; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: cardIn 0.35s ease both;
  position: relative;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card:active { transform: scale(0.97); }
.card:hover  { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.card-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.card-img-placeholder {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.card-body { padding: 10px 12px 12px; }
.card-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; line-height: 1.3; }
.card-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.card-rating i { color: var(--gold); font-size: 10px; }

.fav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #ccc;
  transition: all 0.2s;
  position: absolute;
  top: 8px;
  right: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.fav-btn.active { color: #E8520A; background: #fff3ee; }
.fav-btn:active { transform: scale(0.85); }
.fav-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@keyframes favPop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.5); }
  55%  { transform: scale(0.85); }
  75%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.fav-btn.pop { animation: favPop 0.45s cubic-bezier(0.36,0.07,0.19,0.97); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}

.badge-open  { background: var(--accent-light); color: var(--accent); }
.badge-close { background: #FEE8E8; color: #C0392B; }

/* ── DARK MODE TRANSITIONS ── */
body, header, .bottom-nav, .card, .modal, .search-input,
.noticia-card, .stat-chip, .profile-panel, .comunidad-sheet,
.envivo-sheet, .modal-extra-info, .service-tag, .cat-icon {
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* ── SKELETON SCREENS ── */
.skeleton {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.skel-block {
  background: linear-gradient(90deg,
    var(--border) 25%,
    rgba(200,200,200,0.15) 50%,
    var(--border) 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.4s infinite;
  border-radius: 6px;
}

body.dark .skel-block {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.1)  50%,
    rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
}

@keyframes skelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel-img   { height: 110px; border-radius: 0; margin-bottom: 0; }
.skel-title { height: 14px; width: 70%; margin: 12px 12px 8px; }
.skel-desc  { height: 10px; width: 90%; margin: 0 12px 6px; }
.skel-desc2 { height: 10px; width: 60%; margin: 0 12px 12px; }

/* Empty state */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty i { font-size: 40px; margin-bottom: 12px; opacity: 0.3; display: block; }
.empty p { font-size: 14px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: flex-end;
  z-index: 500;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--surface);
  width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-handle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 16px 4px;
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
}

.modal-close-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.15s, box-shadow 0.25s;
}

.modal-close-btn:hover {
  background: #FFE8E8;
  color: #D93025;
  border-color: rgba(217,48,37,0.3);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 0 0 3px rgba(217,48,37,0.1);
}

.modal-close-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.modal-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.modal-img-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

.modal-body { padding: 18px 20px 30px; }
.modal-title { font-family: Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.modal-cat { font-size: 12px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.modal-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 18px; }

.modal-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.stat-chip {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.stat-chip .val { font-size: 16px; font-weight: 700; color: var(--text); }
.stat-chip .lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.btn {
  flex: 1;
  padding: 13px 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.15s;
  text-decoration: none;
}

.btn:active { opacity: 0.8; transform: scale(0.97); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-location { background: var(--primary); color: #fff; }
.btn-social   { background: #E1306C; color: #fff; }

/* Stars */
.stars-section { margin-bottom: 20px; }
.stars-section h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.stars { display: flex; gap: 6px; margin-bottom: 6px; }
.stars i { font-size: 24px; color: #ddd; cursor: pointer; transition: color 0.15s, transform 0.15s; }
.stars i:hover, .stars i.lit { color: var(--gold); transform: scale(1.2); }
.rating-text { font-size: 12px; color: var(--text-muted); }

/* Map placeholder */
.map-placeholder {
  height: 130px;
  background: linear-gradient(135deg, #e8f4f8, #d4e8f0);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #6B99B0;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: 1.5px solid rgba(107,153,176,0.2);
}

.map-placeholder i { font-size: 28px; }

a:hover .map-placeholder {
  background: linear-gradient(135deg, #d4ebf5, #bddaeb);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(107,153,176,0.25);
  color: #1A5EBF;
  border-color: rgba(26,94,191,0.3);
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: var(--bottom-nav-h);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--glass-border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: background 0.3s;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  position: relative;
}

.nav-item span { font-size: 10px; font-weight: 600; }
.nav-item i { font-size: 18px; transition: transform 0.25s; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { color: var(--primary); transform: translateY(-3px); }
.nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

/* Floating indicator pill */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
  animation: navPill 0.25s ease;
}

@keyframes navPill {
  from { width: 0; opacity: 0; }
  to   { width: 32px; opacity: 1; }
}

/* ── LOGIN / PROFILE MODAL ── */
.profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 900;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.profile-overlay.open { display: flex; animation: overlayIn 0.2s ease; }

.profile-panel {
  background: var(--surface);
  width: 88%;
  max-width: 340px;
  margin-top: 64px;
  margin-right: 12px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: dropIn 0.3s cubic-bezier(0.34,1.4,0.64,1);
}

@keyframes dropIn {
  from { opacity:0; transform: translateY(-20px) scale(0.95); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

.profile-header {
  background: linear-gradient(135deg, #E8520A, #F5A623);
  padding: 28px 20px 20px;
  text-align: center;
  position: relative;
}

.profile-avatar-big {
  width: 68px;
  height: 68px;
  background: rgba(255,255,255,0.25);
  border: 3px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 28px;
  color: #fff;
}

.profile-header h3 { color:#fff; font-size:17px; font-family:'Syne',sans-serif; margin-bottom:2px; }
.profile-header p  { color:rgba(255,255,255,0.8); font-size:12px; }

.profile-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  display: flex; align-items:center; justify-content:center;
  cursor: pointer;
}

/* Login form */
.login-form { padding: 22px 20px 24px; }
.login-form h4 { font-size:15px; font-weight:700; margin-bottom:16px; color:var(--text); }

.form-group { margin-bottom: 14px; }
.form-group label { font-size:11px; font-weight:600; color:var(--text-muted); display:block; margin-bottom:5px; text-transform:uppercase; letter-spacing:0.5px; }
.form-group input {
  width:100%; padding:12px 14px;
  border:1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family:'DM Sans',sans-serif;
  font-size:14px; color:var(--text);
  background: var(--bg);
  outline:none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color:var(--primary); background:#fff; }

.login-btn-main {
  width:100%; padding:13px;
  background: var(--primary);
  color:#fff; border:none;
  border-radius: var(--radius-sm);
  font-family:'DM Sans',sans-serif;
  font-size:14px; font-weight:700;
  cursor:pointer;
  transition: opacity 0.2s;
  margin-top:4px;
}
.login-btn-main:active { opacity:0.85; }

.login-divider {
  display:flex; align-items:center; gap:10px;
  margin:16px 0;
  color:var(--text-muted); font-size:12px;
}
.login-divider::before, .login-divider::after {
  content:''; flex:1; height:1px; background:var(--border);
}

.social-login { display:flex; gap:10px; margin-bottom:16px; }
.social-btn {
  flex:1; padding:11px; border-radius:var(--radius-sm);
  border:1.5px solid var(--border);
  background:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:6px;
  font-family:'DM Sans',sans-serif; font-size:13px; font-weight:600;
  color:var(--text); transition:background 0.15s;
}
.social-btn:active { background:var(--bg); }
.social-btn.google i { color:#EA4335; }
.social-btn.facebook i { color:#1877F2; }

.register-link { text-align:center; font-size:12px; color:var(--text-muted); }
.register-link a { color:var(--primary); font-weight:700; cursor:pointer; text-decoration:none; }

/* ── ÚLTIMO MINUTO (NEWS FEED) ── */
.noticias-section { padding: 6px 16px 16px; }

.noticia-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  border-left: 4px solid transparent;
  cursor: pointer;
}

.noticia-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.noticia-card.oferta    { border-left-color: #E8520A; }
.noticia-card.noticia   { border-left-color: #3FA9F5; }
.noticia-card.empleo    { border-left-color: #2D9F5F; }
.noticia-card.evento    { border-left-color: #B07FEB; }
.noticia-card.capacitacion { border-left-color: #F5A623; }

.noticia-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items:center; justify-content:center;
  font-size: 16px; flex-shrink: 0;
}

.noticia-card.oferta .noticia-icon      { background:#FFF0E8; color:#E8520A; }
.noticia-card.noticia .noticia-icon     { background:#E6F1FB; color:#1A5EBF; }
.noticia-card.empleo .noticia-icon      { background:#E8F7EE; color:#1B7F4F; }
.noticia-card.evento .noticia-icon      { background:#F3EEFF; color:#6B3FA0; }
.noticia-card.capacitacion .noticia-icon { background:#FFFAE8; color:#C89A00; }

.noticia-body { flex:1; min-width:0; }

.noticia-tag {
  font-size: 9px; font-weight:800;
  text-transform:uppercase; letter-spacing:0.8px;
  margin-bottom:4px;
}

.noticia-card.oferta .noticia-tag       { color:#E8520A; }
.noticia-card.noticia .noticia-tag      { color:#1A5EBF; }
.noticia-card.empleo .noticia-tag       { color:#1B7F4F; }
.noticia-card.evento .noticia-tag       { color:#6B3FA0; }
.noticia-card.capacitacion .noticia-tag { color:#C89A00; }

.noticia-title { font-size:14px; font-weight:600; line-height:1.3; margin-bottom:4px; color:var(--text); }
.noticia-meta  { font-size:11px; color:var(--text-muted); }

/* ── COMUNIDAD PANEL ── */
.comunidad-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: flex-end;
  z-index: 500;
  backdrop-filter: blur(3px);
}
.comunidad-panel.open { display:flex; animation: overlayIn 0.2s ease; }

.comunidad-sheet {
  background: var(--surface);
  width:100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 0 0 30px;
  animation: slideUp 0.3s cubic-bezier(0.34,1.4,0.64,1);
  max-height: 80vh;
  overflow-y: auto;
}

.comunidad-header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items:center;
  justify-content: space-between;
}

.comunidad-header h3 { font-family:'Syne',sans-serif; font-size:18px; font-weight:800; }

.close-sheet-btn {
  width:30px; height:30px; border-radius:50%;
  border:none; background:var(--bg);
  color:var(--text-muted); font-size:13px;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}

.comunidad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px 16px;
}

.comunidad-card {
  border-radius: var(--radius-md);
  padding: 18px 14px;
  display:flex; flex-direction:column; align-items:flex-start;
  gap:8px; cursor:pointer;
  border:1.5px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
.comunidad-card:active { transform:scale(0.96); }

.comunidad-card .cc-icon { font-size:28px; }
.comunidad-card .cc-title { font-size:14px; font-weight:700; }
.comunidad-card .cc-sub   { font-size:11px; opacity:0.75; }

.cc-empleo     { background:#E8F7EE; color:#1B7F4F; }
.cc-cultura    { background:#F3EEFF; color:#6B3FA0; }
.cc-educacion  { background:#FFFAE8; color:#C89A00; }
.cc-eventos    { background:#FFF0E8; color:#E8520A; }
.cc-deporte    { background:#E6F1FB; color:#1A5EBF; }
.cc-voluntario { background:#FCEEF6; color:#D94F8A; }

/* ── EN VIVO PANEL ── */
.envivo-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: flex-end;
  z-index: 500;
  backdrop-filter: blur(3px);
}
.envivo-panel.open { display:flex; animation: overlayIn 0.2s ease; }

.envivo-sheet {
  background: var(--surface);
  width:100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 0 0 30px;
  animation: slideUp 0.3s cubic-bezier(0.34,1.4,0.64,1);
  max-height: 80vh;
  overflow-y: auto;
}

.envivo-header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
  display:flex; align-items:center; gap:10px; justify-content:space-between;
}
.envivo-header h3 { font-family:'Syne',sans-serif; font-size:18px; font-weight:800; display:flex; align-items:center; gap:8px; }

.live-dot {
  width:10px; height:10px; border-radius:50%;
  background:#E8350A;
  animation: livePulse 1.2s ease-in-out infinite;
  display:inline-block;
}
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,53,10,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(232,53,10,0); }
}

.envivo-list { padding: 14px 16px; display:flex; flex-direction:column; gap:12px; }

.envivo-card {
  border-radius: var(--radius-md);
  overflow:hidden;
  border:1px solid var(--border);
  cursor:pointer;
  transition: transform 0.2s;
}
.envivo-card:active { transform:scale(0.98); }

.envivo-thumb {
  height: 110px;
  display:flex; align-items:center; justify-content:center;
  position:relative;
  font-size:44px;
}

.envivo-badge {
  position:absolute; top:8px; left:8px;
  background:#E8350A; color:#fff;
  font-size:9px; font-weight:800;
  padding:3px 8px; border-radius:6px;
  letter-spacing:0.8px;
  display:flex; align-items:center; gap:4px;
}

.envivo-viewers {
  position:absolute; bottom:8px; right:8px;
  background:rgba(0,0,0,0.55); color:#fff;
  font-size:10px; font-weight:600;
  padding:3px 8px; border-radius:6px;
}

.envivo-info { padding:10px 12px 12px; }
.envivo-name { font-size:13px; font-weight:700; margin-bottom:2px; }
.envivo-desc { font-size:11px; color:var(--text-muted); }

/* ── REAL CARD IMAGE ── */
.card-img-real {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.cards.list-view .card-img-real {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  object-fit: cover;
}

/* ── REAL MODAL HEADER IMAGE ── */
.modal-img-wrap-real {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Blurred background layer */
.modal-img-wrap-real::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--modal-img-src);
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.5) saturate(1.4);
  transform: scale(1.1);
  z-index: 0;
}

.modal-img-real {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 210px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.4));
}

/* ── EXTRA BUSINESS INFO ── */
.modal-extra-info {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}

.info-row i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

.info-row i.fab.fa-whatsapp  { color: #25D366; }
.info-row i.fab.fa-facebook  { color: #1877F2; }
.info-row i.fab.fa-instagram { color: #E1306C; }

/* ── SERVICES TAGS ── */
.services-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.services-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.service-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid rgba(232,82,10,0.18);
}

/* ── GALLERY ── */
.gallery-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.gallery-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.gallery-strip::-webkit-scrollbar { display: none; }

.gallery-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.gallery-thumb {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid var(--border);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gallery-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  opacity: 0;
  transition: all 0.25s;
}

.gallery-thumb:hover img                { transform: scale(1.08); }
.gallery-thumb:hover .gallery-thumb-overlay {
  background: rgba(0,0,0,0.38);
  opacity: 1;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
  animation: overlayIn 0.2s ease;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: zoomIn 0.25s cubic-bezier(0.34,1.3,0.64,1);
}

@keyframes zoomIn {
  from { transform: scale(0.82); opacity:0; }
  to   { transform: scale(1);    opacity:1; }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1A1208;
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 600;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── VIEW TOGGLE ── */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 3px;
  border-radius: 8px;
}

.view-btn {
  border: none;
  background: none;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: all 0.2s;
}

.view-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.cards.list-view {
  grid-template-columns: 1fr;
}

.cards.list-view .card {
  display: flex;
  flex-direction: row;
}

.cards.list-view .card-img,
.cards.list-view .card-img-placeholder {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.cards.list-view .card-body {
  flex: 1;
  min-width: 0;
}


@media (min-width: 768px) {
  /* ── Cards: imágenes más grandes ── */
  .card-img,
  .card-img-real,
  .card-img-placeholder {
    height: 190px;          /* antes 110px */
    transition: height 0.3s;
  }

  /* ── Modal: imagen principal más grande ── */
  .modal-img-wrap-real {
    height: 380px;          /* antes 220px */
  }
  .modal-img-real {
    max-height: 360px;      /* antes 210px */
    max-width: 92%;
  }

  /* ── Modal: que no se vea tan estirado en PC ── */
  .modal {
    max-width: 920px;
    margin: 0 auto;
    border-radius: var(--radius-lg); /* redondeado completo en PC */
  }

  /* ── Vista lista: miniatura más grande ── */
  .cards.list-view .card-img,
  .cards.list-view .card-img-real,
  .cards.list-view .card-img-placeholder {
    width: 150px;
    height: 150px;
  }
}

@media (min-width: 1024px) {
  .card-img,
  .card-img-real,
  .card-img-placeholder {
    height: 240px;          /* aún más alto en pantallas muy grandes */
  }

  .modal-img-wrap-real {
    height: 480px;
  }
  .modal-img-real {
    max-height: 460px;
  }
}


/* ═══════════════════════════════════════
   COLORES DE FONDO PARA CADA SLIDE DEL CARRUSEL
   ═══════════════════════════════════════ */

/* Clases de color para cada banner */
.banner-educacion       { background-color: #2A2F38; }
.banner-tecnologia-trisol { background-color: #3A1F2D; }
.banner-hospedaje       { background-color: #1F3B3A; }
.banner-caucaser        { background-color: #2A2F38; }
.banner-belleza         { background-color: #3A1F3A; }
.banner-papeleria       { background-color: #A34F2D; }
.banner-ferreteria      { background-color: #1E1E1E; }
.banner-comunicacion    { background-color: #1F3B3A; }

/* Overlay sutil sobre cada slide */
.hero-slide[class*="banner-"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1;
  pointer-events: none;
}

/* Dejar que el color de fondo brille reduciendo la imagen difuminada */
.hero-slide[class*="banner-"] .hero-slide-bg {
  opacity: 0.1;
  filter: blur(20px) brightness(0.6) saturate(1.4);
}

/* Asegurar que el contenido siga por encima */
.hero-slide .hero-content,
.hero-slide .hero-img-side {
  position: relative;
  z-index: 2;
}
