/* ============================================================
   Cardio Com — Estilos Globales Unificados
   ============================================================ */
:root {
  --navy: #071426;
  --navy-surface: #0d1e38;
  --navy-dark: #051124;
  --cyan: #25f4ee;
  --cyan-light: #78f7e9;
  --bg: #f8fafc;
  --emerald: #10b981;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: #1e293b;
  overflow-x: hidden;
}

.font-headline, h1, h2, h3, h4 {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
}

.text-justify {
    text-align: justify;
}

/* ---------- Nav activo con glow ---------- */
.nav-link { position: relative; }
.nav-link.active {
  color: #fff !important;
  font-weight: 600;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 9999px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.mobile-nav-link.active {
  color: var(--cyan) !important;
  background: rgba(37, 244, 238, 0.1);
  border: 1px solid rgba(37, 244, 238, 0.3);
  font-weight: 600;
}

/* ---------- Navbar blur ---------- */
.nav-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------- Fondo con patrón de puntos ---------- */
.medical-grid-bg {
  background-image: radial-gradient(rgba(37, 244, 238, 0.15) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ---------- Filtros de productos ---------- */
.category-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
  transition: all 0.15s ease;
  cursor: pointer;
}
.category-filter-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.category-filter-btn .tab-icon {
  display: inline-flex;
  align-items: center;
  color: #0f766e;
  transition: color 0.15s ease;
}
.category-filter-btn .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0.125rem 0.4rem;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  transition: all 0.15s ease;
}
.category-filter-btn.active {
  background: #071426;
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(37, 244, 238, 0.25);
}
.category-filter-btn.active .tab-icon { color: #25f4ee; }
.category-filter-btn.active .tab-badge {
  background: rgba(37, 244, 238, 0.2);
  color: #25f4ee;
}

/* Responsive: 3 columnas en mobile */
@media (max-width: 640px) {
  #categories-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.375rem;
  }
  .category-filter-btn {
    flex-direction: column;
    padding: 0.5rem 0.25rem;
    font-size: 10px;
    gap: 0.25rem;
    border-radius: 0.5rem;
  }
  .category-filter-btn .tab-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 1rem;
    padding: 0 0.25rem;
    font-size: 9px;
  }
  .category-filter-btn { position: relative; }
}

/* ---------- Carrusel Hero ---------- */
#heroCarousel { min-height: 560px; }
.slider-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  width: 300%;
}
.slide-item {
  width: 33.333333%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none; padding: 0;
}
.slider-dot.active {
  background-color: var(--cyan);
  width: 24px;
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(37, 244, 238, 0.6);
}

/* ---------- FAQ Acordeón ---------- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  opacity: 1;
  margin-top: 1rem;
}
.faq-item.open .chevron-icon {
  transform: rotate(180deg);
  color: var(--cyan);
}
.faq-item.open {
  border-color: rgba(37, 244, 238, 0.4);
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.08);
}
.chevron-icon {
  transition: transform 0.3s ease, color 0.3s ease;
}

/* ---------- Icono de categoría en FAQ ---------- */
.faq-category-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  /*background: var(--navy-surface);*/
  /*background: #0e2941;*/
  background: #cffafe;
  border: 1px solid rgba(37, 244, 238, 0.3);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(37, 244, 238, 0.15);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/*
.faq-category-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(37, 244, 238, 0.35);
}
*/
.faq-category-icon svg {
  color: #0f766e;
  width: 1.5rem;
  height: 1.5rem;
}

/* ---------- Formulario contacto ---------- */
.form-input {
  transition: all 0.2s ease;
}
.form-input:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(18, 60, 143, 0.12);
}
.form-input.error {
  border-color: #dc2626;
  background-color: rgba(220, 38, 38, 0.03);
}

/* ---------- Animaciones ---------- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}
.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* ---------- Scrollbar elegante ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 9999px; border: 2px solid #f1f5f9; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* -- Ocultar scrollbar manteniendo el scroll -- */
.no-scrollbar {
  -ms-overflow-style: none;      /* IE/Edge */
  scrollbar-width: none;          /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
  display: none;                  /* Chrome/Safari/Edge */
}

/* ---------- Utilidades ---------- */
.glow-cyan-sm { box-shadow: 0 0 15px rgba(37, 244, 238, 0.2); }
.glow-cyan-md { box-shadow: 0 10px 25px rgba(37, 244, 238, 0.3); }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Tabs ---------- */
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border-bottom: 2px solid transparent;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.tab-btn.active {
  background: #ffffff;
  color: #0f766e;
  border-bottom-color: #25f4ee;
  box-shadow: inset 0 -2px 0 #25f4ee;
}
.tab-btn.active svg { color: #0f766e; }


/* ═══════════════════════════════════════════════
   Thumbnails de galería de producto
   ═══════════════════════════════════════════════ */
.thumb-btn {
  position: relative;
  display: block;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
}
.thumb-btn:hover {
  border-color: #cbd5e1;
}
.thumb-btn--active {
  border-color: #25f4ee;
  box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.15);
}
.thumb-btn img {
  display: block;
  transition: transform 0.3s ease;
}
.thumb-btn:hover img {
  transform: scale(1.04);
}

/* ═══════════════════════════════════════════════
   Navegación del lightbox (flechas laterales)
   ═══════════════════════════════════════════════ */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 15;
}
.lightbox-nav:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #25f4ee;
  transform: translateY(-50%) scale(1.05);
}
.lightbox-nav--prev { left: 1rem; }
.lightbox-nav--next { right: 1rem; }

@media (max-width: 640px) {
  .lightbox-nav {
    width: 2.5rem;
    height: 2.5rem;
  }
  .lightbox-nav--prev { left: 0.5rem; }
  .lightbox-nav--next { right: 0.5rem; }
}

/* ═══════════════════════════════════════════════
   Grid de thumbnails de galería (1-4 columnas)
   ═══════════════════════════════════════════════ */
.thumb-grid {
  display: grid;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .thumb-grid { gap: 0.75rem; }
}

.thumb-grid[data-cols="1"] { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.thumb-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.thumb-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thumb-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ═══════════════════════════════════════════════
   Sección: Software Opcional (ficha de producto)
   ═══════════════════════════════════════════════ */
.software-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(165, 243, 252, 0.7);
  background: linear-gradient(to right, rgba(236, 254, 255, 0.8), #ffffff, rgba(236, 254, 255, 0.8));
}

.software-card-head { position: relative; padding: 1.25rem; }
@media (min-width: 640px) { .software-card-head { padding: 1.5rem; } }

.software-card-row { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) {
  .software-card-row { flex-direction: row; align-items: center; gap: 1.5rem; }
}

.software-card-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  background: #cffafe;
  border: 1px solid #67e8f9;
  color: #0f766e;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.software-card-icon svg { width: 1.5rem; height: 1.5rem; }
@media (min-width: 640px) {
  .software-card-icon { width: 3.5rem; height: 3.5rem; }
  .software-card-icon svg { width: 1.75rem; height: 1.75rem; }
}

.software-card-body { flex: 1; min-width: 0; }

.software-card-eyebrow {
  display: block; margin-bottom: 0.25rem;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #0e7490;
}

.software-card-title {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 1.125rem; font-weight: 700;
  line-height: 1.375; letter-spacing: -0.025em;
  color: #071426;
}
@media (min-width: 640px) { .software-card-title { font-size: 1.25rem; } }

.software-card-desc {
  margin-top: 0.25rem;
  font-size: 0.875rem; line-height: 1.625;
  color: #475569;
}

.software-card-cta { flex-shrink: 0; width: 100%; }
@media (min-width: 640px) { .software-card-cta { width: auto; } }

.software-btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #06b6d4;
  background: #071426; color: #ffffff;
  font-weight: 700; font-size: 0.875rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  cursor: pointer;
}
.software-btn:hover {
  background: #1e293b;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
@media (min-width: 640px) { .software-btn { width: auto; } }

.software-btn svg {
  width: 1rem; height: 1rem;
  color: #25f4ee;
  transition: transform 0.2s ease;
}
.software-btn:hover svg { transform: scale(1.1); }

.software-foot {
  position: relative;
  border-top: 1px solid rgba(165, 243, 252, 0.6);
  background: rgba(255, 255, 255, 0.6);
  padding: 1.25rem;
}
@media (min-width: 640px) { .software-foot { padding: 1rem 1.5rem; } }

.software-features {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 640px) { .software-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .software-features { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
