/* Nexomed Biomédica — sitio público */

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(11, 37, 69, 0.35); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  position: relative;
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover { color: var(--navy); background: var(--soft); }
.nav-link[aria-current="true"] { color: var(--blue); }
.nav-link[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}
.header-wa { flex-shrink: 0; }
.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }
.mobile-menu { border-top: 1px solid var(--line); background: #fff; box-shadow: 0 18px 30px -20px rgba(11, 37, 69, 0.35); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
.mobile-menu nav { padding-block: 12px 20px; }
.mobile-list { list-style: none; margin: 0 0 16px; padding: 0; }
.mobile-list .nav-link { padding: 13px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.mobile-list .nav-link:hover { background: none; }
.mobile-list .nav-link[aria-current="true"]::after { display: none; }

@media (max-width: 1180px) {
  .main-nav { display: none; }
  .menu-toggle { display: grid; }
  .header-wa { margin-left: auto; }
}
@media (max-width: 560px) {
  .header-wa { padding: 0.6em; }
  .header-wa-text { display: none; }
  .brand-main { font-size: 1.22rem; }
  .brand-top { font-size: 0.6rem; }
}

/* ---------- Portada ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 104px);
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(26, 95, 180, 0.09), transparent 60%),
    radial-gradient(600px 400px at -10% 110%, rgba(14, 148, 136, 0.07), transparent 60%),
    linear-gradient(#fff, #f7fafd);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(11, 37, 69, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(100deg, transparent 35%, #000 75%);
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 75%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-50); }
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.3rem); font-weight: 750; letter-spacing: -0.028em; max-width: 19ch; }
.hero-lead { margin-top: 22px; font-size: clamp(1rem, 1.3vw, 1.12rem); color: var(--muted); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { width: 16px; height: 16px; color: var(--teal); }

.hero-visual { position: relative; padding: 52px 8px 40px; }
.monitor {
  position: relative;
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(160deg, #0f2d52, var(--navy-950));
  box-shadow: var(--shadow-lg);
  color: #cfe0f5;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.monitor-bar { display: flex; align-items: center; gap: 12px; padding: 2px 4px 14px; font-size: 0.78rem; }
.monitor-dots { display: inline-flex; gap: 5px; }
.monitor-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.monitor-title { font-weight: 600; letter-spacing: 0.02em; color: #e5eefa; }
.monitor-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: 0.1em; color: var(--teal-300); }
.monitor-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-300); animation: pulse 1.6s ease-in-out infinite; }
.monitor-screen { border-radius: 14px; background: rgba(2, 10, 22, 0.55); border: 1px solid rgba(148, 189, 240, 0.12); padding: 10px; color: #7fb0ea; }
.ecg { display: block; width: 100%; height: clamp(120px, 15vw, 170px); }
.ecg-line { filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.45)); }
/* Barrido de refresco, como en un monitor real */
.ecg-sweep { animation: sweep 4.5s linear infinite; }
@keyframes sweep { from { transform: translateX(-60px); } to { transform: translateX(480px); } }
.monitor-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tile { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 189, 240, 0.1); font-size: 0.75rem; color: #a9c1df; }
.tile svg { width: 18px; height: 18px; color: var(--teal-300); }
.bar { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue-400), var(--teal-300)); }
.bar .w-55 { width: 55%; }
.bar .w-70 { width: 70%; }
.bar .w-90 { width: 90%; }
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
  animation: float 6s ease-in-out infinite;
}
.float-card b { display: block; font-size: 0.88rem; color: var(--ink); font-weight: 650; }
.float-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--teal-50); color: var(--teal); }
.float-icon svg { width: 19px; height: 19px; }
.float-a { left: -12px; bottom: 0; }
.float-b { right: 36px; top: -4px; animation-delay: -3s; }

@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes float { 50% { transform: translateY(-6px); } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .hero-visual { max-width: 560px; width: 100%; margin-inline: auto; }
}
@media (max-width: 560px) {
  .hero-actions .btn { width: 100%; white-space: normal; }
  .float-a { left: 0; }
  .float-b { right: 0; }
  .tile span { font-size: 0.68rem; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-soft { background: var(--soft); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 720; }
.section-head p:not(.eyebrow) { margin-top: 14px; color: var(--muted); font-size: 1.04rem; }

/* Categorías de servicios */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.service-card:hover { border-color: var(--blue-100); box-shadow: var(--shadow); transform: translateY(-2px); }
.service-card .icon-tile { margin-bottom: 4px; }
.service-title { font-size: 1.12rem; font-weight: 650; }
.service-desc { color: var(--muted); font-size: 0.93rem; flex-grow: 1; }
.service-count { font-size: 0.8rem; font-weight: 600; color: var(--teal); letter-spacing: 0.02em; }
.service-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--navy); text-decoration: none; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.link-arrow:hover { color: var(--blue); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Catálogo ---------- */
.catalog-toolbar {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 10;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.search-field { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%;
  height: 48px;
  padding: 0 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.16); }
.search-clear { position: absolute; right: 6px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.search-clear:hover { background: var(--soft); color: var(--ink); }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--navy); }
.chip-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 0.75rem; font-weight: 600; text-align: center; }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.is-active .chip-count { background: rgba(255, 255, 255, 0.16); color: #fff; }
.catalog-status { min-height: 1.5em; margin: 18px 2px 8px; font-size: 0.88rem; color: var(--muted); }

.catalog-groups { display: grid; gap: 20px; }
.cat-group {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.cat-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.icon-tile-lg { width: 52px; height: 52px; border-radius: 14px; }
.icon-tile-lg .icon { width: 26px; height: 26px; }
.cat-head h3 { font-size: 1.3rem; font-weight: 680; }
.cat-desc { margin-top: 8px; color: var(--muted); font-size: 0.93rem; }
.cat-cta { margin-top: 4px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-content: start; }
.item-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.item-card:hover { border-color: var(--blue-100); box-shadow: var(--shadow); }
.item-media { aspect-ratio: 16 / 10; max-height: 150px; width: 100%; background: var(--soft); border-bottom: 1px solid var(--line); overflow: hidden; }
.item-media img { width: 100%; height: 100%; object-fit: cover; }
.item-media.is-placeholder {
  display: grid;
  place-items: center;
  color: var(--blue-400);
  background:
    radial-gradient(circle at 30% 20%, rgba(26, 95, 180, 0.08), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(11, 37, 69, 0.035) 15px 16px),
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(11, 37, 69, 0.035) 15px 16px),
    var(--blue-50);
}
.item-media.is-placeholder { aspect-ratio: auto; height: 76px; }
.placeholder-icon { width: 30px; height: 30px; stroke-width: 1.4; }
.item-body { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; padding: 14px 14px 16px; }
.item-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.item-name { font-size: 1rem; font-weight: 640; line-height: 1.3; }
.item-desc { font-size: 0.86rem; color: var(--muted); white-space: pre-line; }
.item-name, .item-desc { margin-bottom: 6px; }
.item-cta { margin-top: auto; align-self: flex-start; }
.cat-empty { display: flex; gap: 12px; align-items: flex-start; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); font-size: 0.92rem; }
.cat-empty .icon { margin-top: 2px; color: var(--blue-400); }

.catalog-empty { margin-top: 8px; padding: 48px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: #fff; }
.catalog-empty > .icon { width: 32px; height: 32px; color: var(--blue-400); margin-bottom: 12px; }
.catalog-empty h3 { font-size: 1.15rem; }
.catalog-empty p { margin: 8px auto 0; max-width: 46ch; color: var(--muted); }
.catalog-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

@media (max-width: 900px) {
  .cat-group { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .cat-head { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start; }
  .cat-cta { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .catalog-toolbar { position: static; padding: 10px; }
  .item-grid { grid-template-columns: 1fr; gap: 10px; }
  .item-card { flex-direction: row; }
  .item-media, .item-media.is-placeholder { flex: 0 0 88px; width: 88px; height: auto; max-height: none; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .placeholder-icon { width: 28px; height: 28px; }
  .item-body { padding: 12px; }
}

/* ---------- ¿Por qué elegirnos? ---------- */
.why-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.why-intro { position: sticky; top: calc(var(--header-h) + 32px); }
.why-intro h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 720; }
.why-intro p:not(.eyebrow) { margin-top: 14px; color: var(--muted); font-size: 1.04rem; }
.why-list { display: grid; }
.why-item { display: flex; gap: 18px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.why-item:first-child { padding-top: 0; }
.why-item:last-child { border-bottom: 0; }
.why-item h3 { font-size: 1.08rem; font-weight: 650; }
.why-item p { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-intro { position: static; }
}

/* ---------- Llamado a la acción ---------- */
.cta-section { padding-bottom: clamp(64px, 9vw, 112px); }
.cta-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 5vw, 56px);
  border-radius: 24px;
  background: radial-gradient(600px 300px at 100% 0%, rgba(45, 212, 191, 0.16), transparent 60%), linear-gradient(135deg, var(--navy), #123d6e);
  color: #c9d9ee;
  overflow: hidden;
}
.cta-copy { max-width: 620px; }
.cta-panel h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 700; }
.cta-panel p { margin-top: 12px; }
.cta-social { display: flex; align-items: center; gap: 14px; margin-top: 22px; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; color: #a9c1df; }
@media (max-width: 760px) {
  .cta-panel { flex-direction: column; align-items: flex-start; }
  .cta-panel .btn { width: 100%; white-space: normal; }
}

/* ---------- Redes sociales ---------- */
.social { display: flex; gap: 8px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); color: var(--navy); background: #fff; transition: all 0.2s var(--ease); }
.social a:hover { color: #fff; background: var(--navy); border-color: var(--navy); }
.social .icon { width: 19px; height: 19px; }
.social-light a { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
.social-light a:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.footer-brand p { margin-top: 18px; max-width: 40ch; color: var(--muted); }
.footer-title { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.footer-title-gap { margin-top: 26px; }
.footer-col ul { display: grid; gap: 8px; }
.footer-col a:not(.btn) { color: var(--text); text-decoration: none; }
.footer-col a:not(.btn):hover { color: var(--blue); text-decoration: underline; }
.footer-note { color: var(--muted); margin-bottom: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 20px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.footer-bottom a { color: var(--text); }
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { padding-bottom: 96px; }
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #1c9e53;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(18, 140, 70, 0.6), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.wa-float:hover { transform: scale(1.06); background: #178a48; }
.wa-float .icon { width: 28px; height: 28px; }
body.menu-open .wa-float { display: none; }

/* ---------- Páginas internas ---------- */
.page { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 96px); min-height: 60vh; }
.page-narrow { max-width: 820px; }
.link-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; color: var(--muted); font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.link-back:hover { color: var(--blue); }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 740; }
.prose-meta { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.prose h2 { margin-top: 36px; font-size: 1.2rem; font-weight: 660; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.page-center { display: grid; place-items: center; text-align: center; }
.not-found { max-width: 560px; }
.not-found .hero-actions { justify-content: center; }
.not-found h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.not-found p:not(.eyebrow) { margin-top: 12px; color: var(--muted); }
.not-found-ecg { width: 220px; margin: 0 auto 20px; color: var(--teal); }

/* ---------- Animación de aparición ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
