/* ==========================================================================
   DIRECTORIO OFICIAL DE GIMNASIOS — NUBIFIT
   Coherente con css/lading.css (Space Grotesk, Manrope, DM Mono)
   ========================================================================== */

.nav-link-active {
  color: var(--blue, #2563eb) !important;
  font-weight: 800 !important;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;
}

/* ========================
   HERO DEL DIRECTORIO
   ======================== */
.dir-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 96px) 0 clamp(44px, 5vw, 68px);
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.14), transparent 36%),
    radial-gradient(circle at 86% 20%, rgba(6, 182, 212, 0.12), transparent 34%),
    linear-gradient(180deg, #eff5ff 0%, #f6f9ff 100%);
  border-bottom: 1px solid var(--line, #dbe6f6);
}

.dir-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.55;
  animation: dir-float-glow 9s ease-in-out infinite alternate;
}

.dir-hero-glow-1 {
  width: 340px;
  height: 340px;
  top: -110px;
  left: -80px;
  background: rgba(37, 99, 235, 0.22);
}

.dir-hero-glow-2 {
  width: 300px;
  height: 300px;
  bottom: -120px;
  right: -60px;
  background: rgba(16, 185, 129, 0.18);
  animation-delay: -4s;
}

@keyframes dir-float-glow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(24px, 16px) scale(1.08); }
}

.dir-hero-shell {
  position: relative;
  z-index: 1;
}

.dir-hero-copy {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.dir-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted, #4e5f7d);
}

.dir-breadcrumb a {
  color: var(--blue, #2563eb);
  text-decoration: none;
}

.dir-breadcrumb a:hover {
  text-decoration: underline;
}

.dir-hero-copy h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.25rem, 5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 14px 0 16px;
  color: var(--ink, #0b1528);
}

.dir-hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--blue, #2563eb) 0%, #0ea5e9 55%, var(--emerald, #10b981) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dir-hero-copy > p {
  max-width: 66ch;
  margin: 0 auto 28px;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  line-height: 1.68;
  color: var(--muted, #4e5f7d);
}

/* Buscador principal */
.dir-search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #cbd9f0;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15, 29, 58, 0.09);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.dir-search-box:focus-within {
  border-color: var(--blue, #2563eb);
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.16), 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.dir-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.dir-search-icon {
  position: absolute;
  left: 16px;
  color: #64748b;
  pointer-events: none;
}

.dir-search-input-wrap input {
  width: 100%;
  min-height: 52px;
  padding: 12px 48px 12px 48px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink, #0b1528);
  font: 600 0.98rem/1.3 "Manrope", sans-serif;
}

.dir-search-input-wrap input:focus {
  outline: none;
}

.dir-search-kbd {
  position: absolute;
  right: 14px;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid #dbe6f6;
  background: #f8fbff;
  color: #64748b;
  font: 600 0.76rem/1 "DM Mono", monospace;
  pointer-events: none;
}

.dir-search-clear {
  position: absolute;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eef4ff;
  color: #1e3a8a;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.dir-search-clear:hover {
  background: #dbeafe;
  transform: scale(1.06);
}

.dir-location-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-left: 1px solid #e2ebf8;
  color: var(--blue, #2563eb);
}

.dir-location-select-wrap select {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--ink, #0b1528);
  font: 700 0.9rem/1.2 "Manrope", sans-serif;
  cursor: pointer;
  padding-right: 6px;
}

.dir-location-select-wrap select:focus {
  outline: none;
}

/* Píldoras de métricas en Hero */
.dir-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.dir-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbe6f6;
  box-shadow: 0 6px 18px rgba(15, 29, 58, 0.05);
  font-size: 0.84rem;
  color: var(--muted, #4e5f7d);
}

.dir-stat-pill strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink, #0b1528);
}

.dir-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dir-stat-dot-emerald { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16); }
.dir-stat-dot-amber { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
.dir-stat-dot-blue { background: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
.dir-stat-dot-cyan { background: #06b6d4; box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16); }

/* ========================
   FILTROS SUPERIORES (CLEAN UI)
   ======================== */
.dir-controls-section {
  padding: 24px 0 12px;
}

.filters-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filters-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pill,
.dir-pill {
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  text-decoration: none;
}

.filter-pill:hover,
.dir-pill:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background-color: #f8fafc;
  transform: translateY(-1px);
}

.filter-pill.active,
.dir-pill.active {
  background-color: var(--blue, #2563eb);
  border-color: var(--blue, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.filter-pill i,
.dir-pill i {
  font-size: 0.9rem;
}

.filter-pill svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.filters-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 4px;
}

.dir-results-count {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #475569;
  font-size: 0.88rem;
}

.sort-select {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  font-size: 0.86rem;
  color: #0f172a;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.sort-select:focus {
  border-color: var(--blue, #2563eb);
}

/* ========================
   GRILLA Y TARJETAS (CLEAN UI)
   ======================== */
.dir-catalog-section {
  padding: 16px 0 clamp(64px, 7vw, 96px);
}

.gym-grid,
.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}

.gym-card {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
  display: flex;
  flex-direction: column;
  transition: transform 0.26s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.26s cubic-bezier(0.2, 1, 0.3, 1), border-color 0.22s ease;
  position: relative;
  overflow: hidden;
  animation: dir-card-enter 0.36s cubic-bezier(0.2, 1, 0.3, 1) both;
}

.gym-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(15, 29, 58, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.03);
  border-color: #cbd5e1;
}

.gym-card-cover {
  position: relative;
  height: 78px;
  margin: -24px -24px 18px;
  padding: 14px 18px;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.gym-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 15, 39, 0.15), transparent 68%);
}

.gym-card-cover span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(10, 25, 55, 0.24);
  color: #fff;
  font: 700 0.67rem/1 "DM Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

@keyframes dir-card-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Cabecera de la Tarjeta (Logo + Título) */
.card-header {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.gym-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background-color: #f1f5f9;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue, #2563eb);
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 29, 58, 0.04);
}

.gym-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
}

.gym-title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.gym-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue, #2563eb);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gym-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gym-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Dot (Activo) */
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px #dcfce7;
  flex-shrink: 0;
}

/* Calificación */
.gym-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.gym-rating i {
  color: #f59e0b;
  font-size: 0.86rem;
}

.dir-inline-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.gym-rating .dir-inline-icon {
  color: #f59e0b;
  fill: currentColor;
}

.gym-rating strong {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.gym-rating span {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.8rem;
}

.gym-rating.is-unrated .gym-unrated-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: #10b981;
}

/* Contenido de la Tarjeta */
.gym-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags de Servicios */
.gym-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  background-color: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #e2e8f0;
}

/* Info de Contacto Limpia */
.gym-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  flex-grow: 1; /* Empuja los botones abajo */
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.84rem;
  color: #475569;
}

.info-item i {
  color: #94a3b8;
  margin-top: 2px;
  width: 15px;
  text-align: center;
  flex-shrink: 0;
}

.info-item .dir-inline-icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #94a3b8;
}

.info-item span {
  line-height: 1.4;
}

/* Botones de Acción */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
}

.btn-whatsapp {
  background-color: #dcfce7;
  color: #059669;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  min-height: 42px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-whatsapp:hover {
  background-color: #10b981;
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.26);
}

.btn-whatsapp .dir-inline-icon,
.btn-web .dir-inline-icon {
  width: 16px;
  height: 16px;
}

.btn-web {
  background-color: #f8fafc;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  min-height: 42px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-web:hover {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  color: #0b1528;
}

/* Variación para Destacado / Mejor Valorado */
.gym-card.featured {
  border: 1px solid #f59e0b;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.12), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.gym-card.featured .gym-eyebrow {
  color: #d97706;
}

/* ========================
   SKELETON LOADERS
   ======================== */
.gym-card.gym-dir-skeleton {
  pointer-events: none;
}

.gym-card.gym-dir-skeleton .sk-header {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.gym-card.gym-dir-skeleton .sk-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
}

.gym-card.gym-dir-skeleton .sk-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  justify-content: center;
}

.gym-card.gym-dir-skeleton .sk-line {
  height: 12px;
  border-radius: 6px;
}

.gym-card.gym-dir-skeleton .sk-eyebrow { width: 45%; height: 10px; }
.gym-card.gym-dir-skeleton .sk-title { width: 75%; height: 18px; }
.gym-card.gym-dir-skeleton .sk-rating { width: 40%; height: 12px; }
.gym-card.gym-dir-skeleton .sk-desc { width: 95%; height: 32px; margin-bottom: 16px; }
.gym-card.gym-dir-skeleton .sk-info { width: 85%; height: 48px; margin-bottom: 20px; }
.gym-card.gym-dir-skeleton .sk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
}
.gym-card.gym-dir-skeleton .sk-btn {
  height: 42px;
  border-radius: 10px;
}

.gym-card.gym-dir-skeleton .sk-logo,
.gym-card.gym-dir-skeleton .sk-line,
.gym-card.gym-dir-skeleton .sk-btn {
  background: linear-gradient(90deg, #edf3fc 25%, #dbe7f8 50%, #edf3fc 75%);
  background-size: 200% 100%;
  animation: dir-shimmer 1.5s infinite;
}

@keyframes dir-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================
   ESTADO VACÍO
   ======================== */
.dir-empty-state {
  max-width: 520px;
  margin: 24px auto;
  padding: 42px 28px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd9f0;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 29, 58, 0.05);
}

.dir-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: #eff6ff;
  color: var(--blue, #2563eb);
  display: grid;
  place-items: center;
}

.dir-empty-state h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  margin: 0 0 8px;
  color: var(--ink, #0b1528);
}

.dir-empty-state p {
  margin: 0 0 20px;
  color: var(--muted, #4e5f7d);
  font-size: 0.94rem;
}

/* ========================
   SECCIÓN DE CONFIANZA Y CTA
   ======================== */
.dir-benefits-section {
  background: #ffffff;
  border-top: 1px solid var(--line, #dbe6f6);
  border-bottom: 1px solid var(--line, #dbe6f6);
}

.dir-owner-cta-sub {
  max-width: 58ch;
  margin: 0 auto 26px;
  color: #c7d9f8;
  font-size: 1.04rem;
}

.dir-owner-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn-outline-light {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 760px) {
  .dir-search-box {
    grid-template-columns: 1fr;
  }

  .dir-location-select-wrap {
    border-left: 0;
    border-top: 1px solid #e2ebf8;
    padding: 4px 12px 0;
  }

  .dir-location-select-wrap select {
    width: 100%;
  }

  .dir-search-kbd {
    display: none;
  }

  .dir-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dir-toolbar-right {
    justify-content: space-between;
  }
}

/* Distintivo informativo de reCAPTCHA, consistente con los accesos. */
.saas-recaptcha{align-items:center;background:#fff;border:1px solid #d6ddea;border-radius:7px;bottom:max(14px,env(safe-area-inset-bottom));box-shadow:0 7px 18px rgba(15,23,42,.18);box-sizing:border-box;display:flex;height:44px;left:max(14px,env(safe-area-inset-left));max-width:44px;overflow:hidden;position:fixed;text-decoration:none;transition:box-shadow .2s ease,max-width .22s ease,transform .2s ease;width:max-content;z-index:45}.saas-recaptcha img{display:block;flex:0 0 44px;height:25px;margin:0 9px;object-fit:contain;width:25px}.saas-recaptcha::after{align-items:center;background:#2865ef;color:#fff;content:"Protegido por reCAPTCHA";display:flex;font:700 11px system-ui,sans-serif;height:42px;min-width:148px;padding:0 13px;white-space:nowrap}.saas-recaptcha:hover,.saas-recaptcha:focus-visible{box-shadow:0 11px 24px rgba(15,23,42,.22);max-width:210px;outline:2px solid #7da3ff;outline-offset:3px;transform:translateY(-1px)}@media(max-width:480px){.saas-recaptcha{bottom:max(10px,env(safe-area-inset-bottom));height:40px;left:max(10px,env(safe-area-inset-left));max-width:40px}.saas-recaptcha img{flex-basis:40px;height:23px;width:23px}.saas-recaptcha::after{height:38px;min-width:146px;padding:0 12px}.saas-recaptcha:focus-visible{max-width:198px}}
.saas-recaptcha{max-width:none;transition:box-shadow .2s ease,transform .2s ease,width .22s ease;width:44px}.saas-recaptcha::after{box-sizing:border-box;flex:0 0 190px;left:auto;min-width:190px;opacity:1;pointer-events:none;position:static;transform:none;transition:none}.saas-recaptcha:hover,.saas-recaptcha:focus-visible{max-width:none;width:234px}@media(max-width:480px){.saas-recaptcha{max-width:none;width:40px}.saas-recaptcha::after{flex-basis:182px;min-width:182px}.saas-recaptcha:focus-visible{max-width:none;width:222px}}
.saas-recaptcha img{box-sizing:border-box;flex:0 0 44px;height:42px;margin:0;object-fit:contain;padding:9px;width:44px}.saas-recaptcha::after{background:#2563eb;font:700 .72rem system-ui,-apple-system,"Plus Jakarta Sans","Inter",sans-serif;height:42px}.saas-recaptcha:hover,.saas-recaptcha:focus-visible{width:234px}@media(max-width:480px){.saas-recaptcha img{flex-basis:40px;height:38px;padding:8px;width:40px}.saas-recaptcha::after{height:38px}.saas-recaptcha:focus-visible{width:222px}}
