/* ═══════════════════════════════════════════════════
   Bia Ruta Mundialista 2026 — Sticky Cards
   Stacked scroll: cada aliado ocupa el viewport completo
═══════════════════════════════════════════════════ */

/* ─────────────────────────
   CONTENEDOR DE CARDS
───────────────────────── */
#businesses-grid {
  position: relative;
  display: block;
  /* height calculado por JS: N × 100vh */
}

/* ─────────────────────────
   TARJETA STICKY BASE
───────────────────────── */
.sticky-card {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  cursor: pointer;
  background: #0C0E12;
  outline: none;
  transform-origin: top center;
  will-change: transform;
}

.sticky-card:focus-visible {
  outline: 2px solid #6172F3;
  outline-offset: -4px;
}

/* Overlay oscuro para el efecto push-back (controlado por JS) */
.sc-overlay {
  position: absolute;
  inset: 0;
  background: #0C0E12;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.06s linear;
}

/* Acento Colombia — barra izquierda */
.sticky-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--colombia-accent, #FFD100);
  z-index: 5;
}

/* ─────────────────────────
   PANEL VISUAL (izquierda — solo logo)
───────────────────────── */
.sc-panel-visual {
  width: 34%;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0C0E12;
}

/* Overlay oscuro sobre la foto — para legibilidad del logo */
.sc-foto-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(12, 14, 18, 0.15) 0%,
      rgba(12, 14, 18, 0.55) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(12, 14, 18, 0.3) 0%,
      transparent 40%,
      transparent 60%,
      rgba(12, 14, 18, 0.4) 100%
    );
  z-index: 1;
  pointer-events: none;
}

/* Lavado de color de marca encima de la foto */
.sc-panel-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    var(--card-color, #6172F3) 0%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-panel-visual::after {
  opacity: 0.14;
}

/* Número de fondo gigante — watermark */
.sc-bg-number {
  position: absolute;
  font-size: min(50vw, 380px);
  font-weight: 900;
  color: #ffffff;
  opacity: 0.06;
  line-height: 1;
  letter-spacing: -0.06em;
  top: 50%;
  left: 50%;
  transform: translate(-42%, -50%);
  user-select: none;
  pointer-events: none;
  z-index: 3;
}

/* Halo de marca detrás del logo */
.sc-logo-glow {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--card-color, #6172F3) 0%,
    transparent 70%
  );
  opacity: 0;
  z-index: 3;
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-logo-glow { opacity: 0.22; }
.sticky-card.card-active:hover .sc-logo-glow { opacity: 0.34; }

/* Contenedor del logo — tarjeta blanca elevada */
.sc-logo-wrap {
  position: relative;
  z-index: 4;
  width: 200px; height: 200px;
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 60px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(52px) scale(0.88);
  transition:
    opacity  0.90s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.00s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
  transition-delay: 0s;
}

.sticky-card.card-active .sc-logo-wrap {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sticky-card:hover .sc-logo-wrap {
  box-shadow:
    0 40px 100px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.12),
    0 0 80px var(--card-color);
}

.sc-logo {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Dual logo (dos sedes) ── */
.sc-logo-dual {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transform: translateY(12px) scale(0.88);
  transition:
    opacity   0.70s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-logo-dual {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sc-logo-dual-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-logo-dual-item img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 20px;
  background: #ffffff;
  padding: 10px;
  box-shadow:
    0 0 0 2px rgba(232, 64, 16, 0.30),
    0 8px 32px rgba(0,0,0,0.50),
    0 0 40px rgba(232, 64, 16, 0.15);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease;
}

.sticky-card:hover .sc-logo-dual-item--1 img {
  transform: translateY(-6px) rotate(-4deg) scale(1.05);
  box-shadow:
    0 0 0 2px rgba(232, 64, 16, 0.55),
    0 16px 40px rgba(0,0,0,0.55),
    0 0 50px rgba(232, 64, 16, 0.25);
}

.sticky-card:hover .sc-logo-dual-item--2 img {
  transform: translateY(-6px) rotate(4deg) scale(1.05);
  box-shadow:
    0 0 0 2px rgba(232, 64, 16, 0.55),
    0 16px 40px rgba(0,0,0,0.55),
    0 0 50px rgba(232, 64, 16, 0.25);
}

/* ─────────────────────────
   PANEL DE CONTENIDO (derecha, ~58%)
───────────────────────── */
.sc-panel-content {
  flex: 1;
  min-width: 0;
  padding: 0 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* Fila de meta datos */
.sc-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.80s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.80s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-meta-row {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.08s;
}

.sc-index {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.14em;
}

.sc-sep {
  color: rgba(255,255,255,0.1);
  font-size: 12px;
}

.sc-category {
  font-size: 11px;
  font-weight: 800;
  color: #6172F3;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Nombre del negocio — HERO */
.sc-name {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
  word-break: break-word;
  opacity: 0;
  transform: translateY(48px) scale(0.95);
  transition:
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-name {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0.16s;
}

/* Divisor teal */
.sc-divider {
  width: 0;
  height: 2px;
  background: #6172F3;
  border-radius: 2px;
  transition: width 0.70s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-divider {
  width: 52px;
  transition-delay: 0.28s;
}

/* Ubicación */
.sc-location {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.80s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.90s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-location {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.36s;
}

.sc-city {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sc-addr {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  line-height: 1.4;
}

/* Highlights mundialistas — 3 tags de actividad */
.sc-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-card.card-active .sc-highlights {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0.44s;
}

.sc-highlight-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bp-brand-200);
  background: #0B0D12;
  border: 1px solid var(--bp-brand-800);
  border-radius: 10px;
  box-shadow:
    2px 2px 6px 0 #07080C,
    0 0 1px 2px #000 inset,
    0 0 0 0 rgba(97, 114, 243, 0);
  padding: 10px 16px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
  line-height: 1;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.sc-highlight-tag:hover {
  border-color: var(--bp-brand-600);
  color: var(--bp-brand-100);
  box-shadow:
    2px 2px 6px 0 #07080C,
    0 0 1px 2px #000 inset,
    0 0 14px rgba(97, 114, 243, 0.22);
}

.sc-highlight-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bp-brand-400);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(128, 152, 249, 0.75);
}

/* CTA */
.sc-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: #0B0D12;
  border: 1px solid #20222E;
  border-radius: 12px;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset;
  padding: 13px 26px;
  cursor: pointer;
  width: fit-content;
  font-family: inherit;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.sticky-card.card-active .sc-cta {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0.52s;
}

.sticky-card:hover .sc-cta {
  background: var(--bp-brand-950);
  border-color: var(--bp-brand-700);
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset, 0 0 14px rgba(97, 114, 243, 0.2);
  color: #ffffff;
}

/* ─────────────────────────
   INDICADOR DE PROGRESO
───────────────────────── */
.sc-progress {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  align-items: center;
}

.sc-prog-dot {
  width: 20px; height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s ease, width 0.3s ease;
  flex-shrink: 0;
}

.sc-prog-dot.active {
  background: #ffffff;
  width: 32px;
}

/* ─────────────────────────
   RESPONSIVE
───────────────────────── */
@media (max-width: 1024px) {
  .sc-panel-visual { width: 38%; }
  .sc-logo-wrap { width: 170px; height: 170px; padding: 16px; }
  .sc-panel-content { padding: 0 40px 0 36px; gap: 14px; }
  .sc-bg-number { font-size: min(45vw, 300px); }
}

/* ── Mobile: layout columna — visual / content / gallery strip ── */
@media (max-width: 768px) {
  /* Card pasa a columna */
  .sticky-card {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
  }

  /* Acento Colombia → barra horizontal superior */
  .sticky-card::before {
    left: 0; right: 0; top: 0; bottom: auto;
    width: 100%; height: 4px;
  }

  /* Panel logo — franja superior compacta */
  .sc-panel-visual {
    width: 100%;
    height: 26vh;
    min-height: 160px;
    flex-shrink: 0;
  }
  .sc-logo-wrap {
    width: 110px; height: 110px;
    padding: 12px; border-radius: 16px;
  }
  .sc-logo-glow { width: 180px; height: 180px; }
  .sc-bg-number { font-size: 55vw; }

  /* Logo dual — más compacto */
  .sc-logo-dual { gap: 16px; }
  .sc-logo-dual-item--1 img,
  .sc-logo-dual-item--2 img { width: 90px; height: 90px; }

  /* Panel contenido — ocupa el espacio central */
  .sc-panel-content {
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 16px 24px 12px;
    gap: 10px;
    justify-content: center;
    overflow: hidden;
  }

  .sc-name {
    font-size: clamp(24px, 7.5vw, 38px);
    line-height: 0.92;
  }
  .sc-addr { display: none; }
  .sc-city { font-size: 11px; }

  /* Tags — más pequeños para caber */
  .sc-highlight-tag {
    font-size: 10px;
    padding: 7px 11px;
    gap: 6px;
    letter-spacing: 0.06em;
  }
  .sc-highlight-tag::before { width: 5px; height: 5px; }

  /* Botones — lado a lado más compactos */
  .sc-actions { gap: 8px; flex-wrap: nowrap; }
  .sc-cta {
    font-size: 12px;
    padding: 10px 16px;
    gap: 7px;
    flex: 1;
    justify-content: center;
  }
  .sc-ig-btn {
    font-size: 12px;
    padding: 10px 14px;
    gap: 6px;
    white-space: nowrap;
  }

  /* Indicador de progreso — más arriba */
  .sc-progress { bottom: 8px; }

  /* Gallery — franja inferior full-width */
  .sc-panel-gallery {
    width: 100%;
    height: 26vh;
    min-height: 140px;
    flex-shrink: 0;
  }

  /* Todas las galerías → tira horizontal en mobile */
  .sc-gallery--5 {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1fr;
  }
  .sc-gallery--4 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
  }
  .sc-gallery--3 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
  }
  .sc-gallery--3 .sc-gallery-item--0 {
    grid-row: auto;
  }
  .sc-gallery--2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
  }
}

/* ── Extra small — menos de 480px ── */
@media (max-width: 480px) {
  .sc-panel-visual { height: 22vh; min-height: 130px; }
  .sc-panel-gallery { height: 22vh; min-height: 120px; }
  .sc-panel-content { padding: 12px 18px 8px; gap: 8px; }
  .sc-name { font-size: clamp(22px, 7vw, 32px); }
  .sc-highlights { gap: 6px; }
  .sc-highlight-tag { font-size: 9px; padding: 6px 10px; }
  /* En pantallas muy pequeñas, solo 1 tag */
  .sc-highlight-tag:nth-child(n+3) { display: none; }
  .sc-actions { gap: 6px; }
  .sc-cta { font-size: 11px; padding: 9px 12px; }
  .sc-ig-btn { font-size: 11px; padding: 9px 10px; }
}


/* ═══════════════════════════════════════════════════
   MODAL OVERLAY
═══════════════════════════════════════════════════ */

#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 14, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#modal-overlay[hidden] { display: none; }

#modal-overlay.active {
  opacity: 1;
  animation: fadeIn 0.3s ease both;
}

/* ═══════════════════════════════════════════════════
   MODAL CONTENT
═══════════════════════════════════════════════════ */

#business-modal {
  position: relative;
  background: #0D121C;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(97, 114, 243, 0.2) transparent;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(8,221,188,0.06);
  transform: translateY(40px) scale(0.97);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

#business-modal[hidden] { display: none; }

#business-modal.active {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#business-modal::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #6172F3 30%, #6172F3 70%, transparent 100%);
  opacity: 0.7;
}

#business-modal::-webkit-scrollbar { width: 4px; }
#business-modal::-webkit-scrollbar-track { background: transparent; }
#business-modal::-webkit-scrollbar-thumb { background: rgba(8,221,188,0.2); border-radius: 2px; }

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  z-index: 10;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gray);
  font-size: 18px; line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.modal-close:hover { background: var(--bp-brand-950); border-color: var(--bp-brand-700); color: #ffffff; }
.modal-close:focus-visible { outline: 2px solid #6172F3; outline-offset: 3px; }

.modal-header {
  display: flex; align-items: center; gap: 24px;
  padding: 28px 32px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.modal-logo-wrap {
  width: 90px; height: 90px; flex-shrink: 0;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.modal-logo {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
}

.modal-header-info { flex: 1; min-width: 0; }

.modal-categoria {
  font-size: 11px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}

.modal-nombre {
  font-size: clamp(20px, 4vw, 28px); font-weight: 800; color: var(--white);
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 8px;
}

.modal-location {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}

.modal-ciudad { font-size: 14px; font-weight: 700; color: #6172F3; }
.modal-direccion { font-size: 13px; color: var(--gray); }

.modal-energia {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(8,221,188,0.08); border: 1px solid rgba(8,221,188,0.2);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 700; color: #6172F3; margin-top: 10px;
}

.modal-photo-wrap { padding: 0 32px; margin: 24px 0 0; }

.modal-foto {
  width: 100%; height: 200px; object-fit: cover;
  object-position: center center;
  border-radius: 12px; background: #111640;
}

.modal-body { padding: 24px 32px 32px; }

.modal-section-label {
  font-size: 11px; font-weight: 700; color: #6172F3;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px;
}

.modal-descripcion {
  font-size: 15px; color: rgba(255,255,255,0.78);
  line-height: 1.75; margin-bottom: 24px;
}
.modal-descripcion p { margin: 0 0 14px; }
.modal-descripcion p:last-child { margin-bottom: 0; }

.modal-divider { height: 1px; background: rgba(97,114,243,0.12); margin: 20px 0; }

.modal-disclaimer {
  margin-top: 24px;
  padding: 12px 16px;
  background: rgba(97, 114, 243, 0.05);
  border: 1px solid rgba(97, 114, 243, 0.12);
  border-radius: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
  font-style: italic;
  letter-spacing: 0.01em;
}

.modal-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.modal-meta-item { display: flex; flex-direction: column; gap: 4px; }
.modal-meta-label { font-size: 11px; font-weight: 700; color: #94979C; text-transform: uppercase; letter-spacing: 0.07em; }
.modal-meta-value { font-size: 14px; color: var(--white); font-weight: 400; line-height: 1.5; }

.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bp-brand-200);
  background: #0B0D12;
  border: 1px solid var(--bp-brand-800);
  border-radius: 10px;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset;
  padding: 7px 13px;
}
.modal-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bp-brand-400);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(128, 152, 249, 0.7);
}

/* ── Múltiples ubicaciones ── */
#modal-locations {
  margin-top: 24px;
}

.modal-locations-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
}

.modal-locations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  padding-right: 4px;
}

.modal-locations-grid::-webkit-scrollbar { width: 4px; }
.modal-locations-grid::-webkit-scrollbar-track { background: transparent; }
.modal-locations-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.modal-location-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 13px;
  background: #0B0D12;
  border: 1px solid #20222E;
  border-radius: 12px;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.modal-location-btn:hover {
  background: var(--bp-brand-950);
  border-color: var(--bp-brand-700);
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset, 0 0 10px rgba(97, 114, 243, 0.18);
  transform: translateY(-1px);
}

.modal-location-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.modal-location-addr {
  font-size: 10px;
  color: rgba(255,255,255,0.38);
  line-height: 1.35;
}

.modal-maps-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 18px;
  background: #0B0D12;
  border: 1px solid #20222E;
  border-radius: 12px;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.modal-maps-btn:hover {
  background: var(--bp-brand-950);
  border-color: var(--bp-brand-700);
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset, 0 0 12px rgba(97, 114, 243, 0.2);
  transform: translateY(-1px);
  color: #fff;
}

@media (max-width: 640px) {
  /* Modal sube como sheet desde abajo */
  #modal-overlay { padding: 0; align-items: flex-end; }
  #business-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  #business-modal.active { transform: translateY(0); }

  /* Header: logo + info en fila compacta */
  .modal-header { padding: 20px 20px 16px; gap: 14px; }
  .modal-logo-wrap { width: 72px; height: 72px; border-radius: 12px; flex-shrink: 0; }
  .modal-nombre { font-size: clamp(16px, 5vw, 22px); }
  .modal-direccion { font-size: 11px; }
  .modal-ciudad { font-size: 12px; }

  /* Foto banner */
  .modal-photo-wrap { padding: 0 16px; }
  .modal-foto { height: 180px; }

  /* Body */
  .modal-body { padding: 16px 20px 32px; }
  .modal-meta { grid-template-columns: 1fr; gap: 12px; }
  .modal-descripcion { font-size: 14px; line-height: 1.65; }

  /* Locations grid → 1 columna en mobile */
  .modal-locations-grid { grid-template-columns: 1fr; max-height: 240px; }

  /* Botones Maps e Instagram */
  .modal-maps-btn, .modal-ig-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }

  /* Tags más pequeños */
  .modal-tag { font-size: 10px; padding: 6px 10px; }
}

/* ═══════════════════════════════════════
   GALERÍA DE FOTOS — panel derecho
═══════════════════════════════════════ */

.sc-panel-gallery {
  width: 36%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #0C0E12;
}

/* Grid base */
.sc-gallery {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 3px;
}

/* ── 1 foto: full panel ── */
.sc-gallery--1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

/* ── 2 fotos: split horizontal ── */
.sc-gallery--2 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
}

/* ── 3 fotos: 1 grande izquierda + 2 pequeñas derecha ── */
.sc-gallery--3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.sc-gallery--3 .sc-gallery-item--0 {
  grid-row: 1 / 3;
}

/* ── 4 fotos: 2×2 grid ── */
.sc-gallery--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

/* ── 5 fotos: todas full-width ── */
.sc-gallery--5 {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(5, 1fr);
}

/* ── Ítem de foto — estado inicial (oculto) ── */
.sc-gallery-item {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  will-change: transform, opacity;
}

/* Cada foto arranca desde una posición y dirección diferente */
.sc-gallery-item--0 {
  opacity: 0;
  transform: scale(1.12) translateY(44px);
  transition:
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.10s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0s;
}
.sc-gallery-item--1 {
  opacity: 0;
  transform: scale(1.12) translateX(40px);
  transition:
    opacity 0.90s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.12s;
}
.sc-gallery-item--2 {
  opacity: 0;
  transform: scale(1.12) translateY(40px);
  transition:
    opacity 0.90s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.22s;
}
.sc-gallery-item--3 {
  opacity: 0;
  transform: scale(1.12) translateX(40px);
  transition:
    opacity 0.90s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.32s;
}
.sc-gallery-item--4 {
  opacity: 0;
  transform: scale(1.12) translateY(40px);
  transition:
    opacity 0.90s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.42s;
}

/* Estado final: visible y en su lugar */
.sticky-card.card-active .sc-gallery-item--0 {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.sticky-card.card-active .sc-gallery-item--1 {
  opacity: 1;
  transform: scale(1) translateX(0);
}
.sticky-card.card-active .sc-gallery-item--2 {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.sticky-card.card-active .sc-gallery-item--3 {
  opacity: 1;
  transform: scale(1) translateX(0);
}
.sticky-card.card-active .sc-gallery-item--4 {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Ken Burns continuo en la foto principal una vez visible */
.sticky-card.card-active .sc-gallery-item--0 {
  animation: gallery-ken-burns 9s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  animation-delay: 0.9s;
}

@keyframes gallery-ken-burns {
  from { transform: scale(1.00) translateY(0); }
  to   { transform: scale(1.06) translateY(-8px); }
}

.sticky-card.card-active .sc-gallery-item--0.no-ken-burns {
  animation: none;
  transform: scale(1) translateY(0);
}

/* Contenedor del phone */
.sc-phone {
  position: relative;
  z-index: 4;
  width: min(160px, 14vw);
  opacity: 0;
  transform: scale(0.86) translateY(16px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.sticky-card.card-active .sc-phone {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition-delay: 0.04s;
}

/* Marco */
.sc-phone-frame {
  border: 2.5px solid var(--sc-phone-border, #fff);
  border-radius: 28px;
  padding: 8px;
  background: #060b1c;
  box-shadow:
    0 0 40px var(--sc-phone-glow, rgba(255,255,255,0.15)),
    0 20px 56px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
}

/* Notch */
.sc-phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 14px;
  background: #060b1c;
  border-radius: 0 0 10px 10px;
  z-index: 10;
}

/* Pantalla */
.sc-phone-screen {
  border-radius: 22px;
  aspect-ratio: 9 / 19;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Degradado sobre foto */
.sc-phone-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.62) 0%,
    rgba(0,0,0,0.04) 28%,
    rgba(0,0,0,0.08) 55%,
    rgba(0,0,0,0.82) 100%
  );
  z-index: 1;
}

/* Cinta superior */
.sc-phone-tape {
  position: relative;
  z-index: 3;
  margin-top: 22px;
  background: var(--sc-phone-border, #fff);
  color: #000;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: rotate(-1.5deg);
}

/* Zona central */
.sc-phone-mid {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 10px 8px;
}

.sc-phone-headline {
  font-size: clamp(20px, 3.5vw, 30px);
  font-weight: 900;
  color: #fff;
  line-height: 0.88;
  text-transform: uppercase;
  font-style: italic;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.sc-phone-headline em {
  font-style: normal;
  color: var(--sc-phone-border, #fff);
}

/* Footer del teléfono */
.sc-phone-foot {
  position: relative;
  z-index: 3;
  padding: 8px 10px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sc-phone-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.sc-phone-name {
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sticky-card {
    position: relative !important;
    height: auto !important;
    min-height: 340px;
  }
  .sticky-card .sc-logo-wrap,
  .sticky-card .sc-meta-row,
  .sticky-card .sc-name,
  .sticky-card .sc-location,
  .sticky-card .sc-highlights,
  .sticky-card .sc-cta {
    opacity: 1 !important;
    transform: none !important;
  }
  .sc-divider { width: 52px !important; }
  #businesses-grid { height: auto !important; }
}

/* ── Instagram buttons ── */
.sc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sc-ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #0B0D12;
  border: 1px solid #20222E;
  border-radius: 12px;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.22s ease, box-shadow 0.22s ease;
}

.sticky-card.card-active .sc-ig-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0.58s;
}

.sc-ig-btn:hover {
  border-color: #e6683c;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset, 0 0 14px rgba(220, 39, 67, 0.25);
  color: #ffffff;
}

.modal-ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  background: #0B0D12;
  border: 1px solid #20222E;
  border-radius: 12px;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-ig-btn:hover {
  border-color: #e6683c;
  box-shadow: 2px 2px 6px 0 #07080C, 0 0 1px 2px #000 inset, 0 0 14px rgba(220, 39, 67, 0.25);
  color: #fff;
}
