/* ═══════════════════════════════════════════════════════════
   STAMBOULIAN — main.css
   Hoja de estilos unificada para todo el sitio
   ══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Variables institucionales ── */
:root {
  --color-principal:  #3477bd;
  --color-secundario: #4499c4;
  --color-gris:       #919295;
  --color-dark:       #221f20;
  --color-topbar:     #2c5f9e;
}

/* ── Top bar (uniforme en todas las páginas) ── */
.topbar { background-color: var(--color-topbar); }

/* ── Base ── */
html { scroll-behavior: smooth; }
body { font-family: 'Barlow', system-ui, sans-serif; color: var(--color-dark); }
h1, h2, h3, h4 {
  font-family: 'Barlow', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Tailwind overrides */
.text-gray-900 { color: var(--color-dark)  !important; }
.text-gray-700 { color: #3d3a3b            !important; }
.text-gray-500 { color: var(--color-gris)  !important; }
.text-gray-400 { color: #a5a3a4            !important; }


/* ═══════════════════════════════════════════════
   BADGES DE SERVICIO (identidad institucional)
   ══════════════════════════════════════════════ */
.badge-vacunacion,
.badge-laboratorio,
.badge-consultorios {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-vacunacion   { background: #e5f2fa; color: #0079c2; }
.badge-laboratorio  { background: #e0f4f9; color: #007a9d; }
.badge-consultorios { background: #f0f0f1; color: #5a5c5e; }
.badge-icon { width: 13px; height: 13px; object-fit: contain; flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   NAVEGACIÓN
   ══════════════════════════════════════════════ */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--color-principal);
  transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }

#mobile-menu { transition: max-height .3s ease, opacity .3s ease; }


/* ═══════════════════════════════════════════════
   HERO SLIDER
   ══════════════════════════════════════════════ */
.hero-slider { height: clamp(360px, 55vw, 560px); }

.slider-track {
  display: flex;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.slide          { min-width: 100%; position: relative; }
.slide-overlay  {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(0,30,60,.82) 0%,
    rgba(0,30,60,.5)  55%,
    rgba(0,30,60,.15) 100%);
}

.slider-dot {
  width: 8px; height: 8px;
  border-radius: 9999px;
  background: rgba(255,255,255,.4);
  transition: background .3s, width .3s;
  cursor: pointer;
}
.slider-dot.active { background: #fff; width: 24px; }


/* ═══════════════════════════════════════════════
   SERVICIOS (home)
   ══════════════════════════════════════════════ */
.service-card {
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
}
.service-card-gradient {
  background: linear-gradient(135deg, #edf4fb, #d3e7f5);
}
.service-label-dark { color: var(--color-dark); }
.service-label-gray { color: var(--color-gris); }


/* ═══════════════════════════════════════════════
   TABS — búsqueda (home)
   ══════════════════════════════════════════════ */
.stab-btn {
  padding: .6rem 1.4rem;
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 600;
  transition: all .2s;
  cursor: pointer;
  border: 2px solid transparent;
  color: #6b7280;
  background: #f3f4f6;
}
.stab-btn.active   { background: var(--color-principal); color: #fff; border-color: var(--color-principal); }
.stab-btn.active   img.icon-brand { filter: brightness(0) invert(1); }
.stab-content      { display: none; }
.stab-content.active { display: block; }

/* Iconos de marca en botones sobre fondo oscuro */
.btn-icon-white { filter: brightness(0) invert(1); }


/* ═══════════════════════════════════════════════
   TABS — scroll horizontal (calendario, vacunas)
   ══════════════════════════════════════════════ */
.tabs-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs-scroll::-webkit-scrollbar { display: none; }

.tab-btn { transition: all .2s; white-space: nowrap; cursor: pointer; }
.tab-btn.active { background: var(--color-principal); color: #fff; }


/* ═══════════════════════════════════════════════
   CARDS — centros
   ══════════════════════════════════════════════ */
.centro-card { transition: box-shadow .2s ease, transform .2s ease; }
.centro-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(52,119,189,.16);
}


/* ═══════════════════════════════════════════════
   CARDS — vacunas
   ══════════════════════════════════════════════ */
.vcard { transition: transform .18s, box-shadow .18s; }
.vcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(52,119,189,.18);
}


/* ═══════════════════════════════════════════════
   SEARCH HIGHLIGHT
   ══════════════════════════════════════════════ */
mark { background: #fef9c3; border-radius: 2px; padding: 0 1px; }


/* ═══════════════════════════════════════════════
   DIAGONAL / SEPARADORES
   ══════════════════════════════════════════════ */
.diagonal-wrap { height: 80px; }

.diagonal-bottom { position: relative; padding-bottom: 5rem; }
.diagonal-bottom::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: inherit;
  clip-path: polygon(0 0, 100% 100%, 100% 100%, 0 100%);
}

.section-diagonal-top { position: relative; }
.section-diagonal-top::before {
  content: '';
  position: absolute;
  top: -48px; left: 0; right: 0;
  height: 50px;
  background: inherit;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 1;
}

.btn-diagonal { position: relative; overflow: hidden; }
.btn-diagonal::after {
  content: '';
  position: absolute;
  top: 0; right: -12px;
  width: 24px; height: 100%;
  background: rgba(255,255,255,.15);
  transform: skewX(-12deg);
  pointer-events: none;
}

.section-diagonal-padding { padding-bottom: 5rem; }


/* ═══════════════════════════════════════════════
   MISCELÁNEOS — home
   ══════════════════════════════════════════════ */
.wellbin-logo          { height: 12px; width: auto; display: inline-block; }
#centros-extra           { display: none; }
.viajero-image-wrap    { aspect-ratio: 4/3; }
.viajero-overlay       { background: linear-gradient(to top, rgba(36,63,100,.65), transparent); }
.cta-final-bg {
  background-image:
    radial-gradient(circle at 30% 50%, white 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, white 0%, transparent 50%);
}
.instagram-embed {
  background: #FFF; border: 0; border-radius: 3px;
  margin: 0; max-width: 100%; min-width: 0; padding: 0; width: 100%;
}


/* ═══════════════════════════════════════════════
   SEDE DETALLE — galería
   ══════════════════════════════════════════════ */
.gallery-item          { cursor: pointer; overflow: hidden; border-radius: 1rem; }
.gallery-item img      { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-desktop       { height: 320px; }
.gallery-right-col     { width: 36%; }
.gallery-item-main     { min-width: 0; }

/* SEDE DETALLE — mapa */
.map-container { height: 320px; }

/* SEDE DETALLE — servicios / horarios */
.horarios-row:nth-child(even)  { background: #f9fafb; }
.horario-cerrado               { color: #9ca3af; }
.tag-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 600;
  padding: .3rem .75rem; border-radius: 999px;
}
.badge-small { font-size: .7rem; }


/* ═══════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════ */
#lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 1000;
  align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }

#lb-img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain; border-radius: .75rem;
  box-shadow: 0 0 80px rgba(0,0,0,.5);
}

#lb-close {
  position: absolute; top: 1.25rem; right: 1.5rem;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: 1.6rem; width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
#lb-close:hover { background: rgba(255,255,255,.28); }

#lb-prev, #lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 1.5rem; width: 48px; height: 48px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }
#lb-prev:hover, #lb-next:hover { background: rgba(255,255,255,.25); }


/* ═══════════════════════════════════════════════
   VACUNA DETALLE
   ══════════════════════════════════════════════ */
.price-display { transition: all .3s ease; }

details > summary                      { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after               { content: ' ▾'; }
details[open] > summary::after         { content: ' ▴'; }

@media (min-width: 1024px) {
  details > summary::after { display: none; }
}


/* ═══════════════════════════════════════════════
   RULETA — página especial (body.ruleta)
   ══════════════════════════════════════════════ */
body.ruleta {
  background: #0f1923;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 2rem;
}
body.ruleta h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  background: linear-gradient(135deg, #4499c4, #3477bd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: unset;
}

.main {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  align-items: flex-start; justify-content: center;
  width: 100%; max-width: 900px;
}
.wheel-wrap      { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.wheel-container { position: relative; display: inline-block; }

.pointer {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 36px solid #f59e0b;
  filter: drop-shadow(0 2px 6px rgba(245,158,11,.6));
  z-index: 10;
}

canvas {
  display: block; border-radius: 50%;
  box-shadow: 0 0 0 6px #1e2d3d, 0 0 0 10px #2a3f54, 0 20px 60px rgba(0,0,0,.5);
}

.btn-spin {
  background: linear-gradient(135deg, #3477bd, #4499c4);
  color: #fff; border: none;
  font-family: 'Barlow', sans-serif; font-size: 1.1rem; font-weight: 700;
  padding: .85rem 3rem; border-radius: 999px; cursor: pointer;
  letter-spacing: .03em;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 6px 24px rgba(52,119,189,.45);
}
.btn-spin:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(52,119,189,.6); }
.btn-spin:disabled              { opacity: .5; cursor: not-allowed; transform: none; }

.panel {
  background: #1a2535; border: 1px solid #253448;
  border-radius: 1.25rem; padding: 1.5rem; width: 260px; flex-shrink: 0;
}
.panel h2 {
  font-size: 1rem; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem;
}

.option-list {
  display: flex; flex-direction: column; gap: .5rem;
  margin-bottom: 1rem; max-height: 340px; overflow-y: auto;
}
.option-item {
  display: flex; align-items: center; gap: .5rem;
  background: #243042; border-radius: .625rem; padding: .45rem .6rem;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.color-dot  { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.option-text {
  flex: 1; font-size: .875rem; color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.btn-remove {
  background: none; border: none; color: #64748b;
  cursor: pointer; font-size: 1rem; line-height: 1;
  padding: 2px 4px; border-radius: 4px;
  transition: color .15s, background .15s;
}
.btn-remove:hover { color: #f87171; background: rgba(248,113,113,.1); }

.add-row { display: flex; gap: .5rem; }
.input-new {
  flex: 1; background: #243042; border: 1px solid #334155;
  border-radius: .625rem; padding: .5rem .75rem;
  font-family: 'Barlow', sans-serif; font-size: .875rem; color: #e2e8f0;
  outline: none; transition: border-color .2s;
}
.input-new:focus       { border-color: var(--color-principal); }
.input-new::placeholder { color: #4a5568; }

.btn-add {
  background: var(--color-principal); border: none;
  border-radius: .625rem; color: #fff; font-size: 1.2rem;
  width: 38px; height: 38px; cursor: pointer; transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.btn-add:hover { background: #2d69a8; }

#result-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  z-index: 100; align-items: center; justify-content: center;
}
#result-overlay.show { display: flex; }

.result-card {
  background: #1a2535; border: 2px solid var(--color-principal);
  border-radius: 1.5rem; padding: 2.5rem 3rem; text-align: center;
  max-width: 380px; width: 90%;
  animation: popIn .4s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 60px rgba(52,119,189,.3);
}
@keyframes popIn {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.result-emoji { font-size: 3rem; margin-bottom: .75rem; }
.result-label {
  font-size: .875rem; color: #64748b;
  text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; margin-bottom: .5rem;
}
.result-value {
  font-size: 1.75rem; font-weight: 800; color: #fff;
  margin-bottom: 1.5rem; line-height: 1.2;
}

.btn-close {
  background: var(--color-principal); color: #fff; border: none;
  font-family: 'Barlow', sans-serif; font-size: 1rem; font-weight: 700;
  padding: .7rem 2rem; border-radius: 999px; cursor: pointer;
  transition: background .15s;
}
.btn-close:hover { background: #2d69a8; }
