/* ============================================================
   MAYOREO MÉDICO — Mejoras visuales v2 (animaciones + gráficos)
   Extiende styles.css (reutiliza sus variables)
   ============================================================ */

/* ---------- Animaciones base ---------- */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes floaty2 { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes pulse-ring { 0% { transform: scale(.9); opacity: .55; } 70% { transform: scale(1.35); opacity: 0; } 100% { opacity: 0; } }
@keyframes gradpan { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes dash { to { stroke-dashoffset: 0; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sheen { to { transform: translateX(220%) rotate(18deg); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.9) translateY(10px); } 100% { opacity: 1; transform: none; } }

/* gradiente animado en el texto del hero */
.hero h1 .grad {
  background: linear-gradient(100deg, var(--sky-deep), var(--teal-deep), var(--sky), var(--teal-deep));
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradpan 6s linear infinite alternate;
}

/* ---------- Hero: gráfico molecular animado ---------- */
.hero-visual { --node: var(--sky-deep); }
.molecule { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .9; }
.molecule .link { stroke: rgba(86,174,226,.35); stroke-width: 1.5; stroke-dasharray: 6 6; animation: dash 3s linear infinite; }
.molecule .atom { fill: #fff; stroke: var(--teal-deep); stroke-width: 2; }
.molecule .atom.filled { fill: var(--teal); stroke: none; }
.molecule .orbit { transform-origin: center; animation: spin-slow 26s linear infinite; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; z-index: -2;
  background: radial-gradient(circle at 30% 30%, var(--teal), transparent 70%);
}
.hero-orb.o1 { width: 90px; height: 90px; top: 10%; left: 12%; animation: floaty 7s ease-in-out infinite; }
.hero-orb.o2 { width: 56px; height: 56px; bottom: 14%; left: 40%; background: radial-gradient(circle at 30% 30%, var(--sky), transparent 70%); animation: floaty2 9s ease-in-out infinite; }
.spec-card { animation: rise .7s cubic-bezier(.2,.8,.2,1) both, floaty 8s ease-in-out infinite; }
.spec-card.c1 { animation-delay: .15s, 0s; }
.spec-card.c2 { animation-delay: .35s, .8s; }
.spec-card.c3 { animation-delay: .55s, 1.6s; }
.spec-card .tag::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); margin-right: 7px; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(95,194,196,.6); animation: pulse-ring 2.4s ease-out infinite;
}

/* ---------- Contadores animados ---------- */
.hero-meta b { font-variant-numeric: tabular-nums; }

/* ---------- Marquee de laboratorios ---------- */
.brands { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; overflow: hidden; }
.brands-head {
  text-align: center; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--mist); margin-bottom: 18px;
}
.brands-mask { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.brands-track { display: flex; gap: 44px; width: max-content; animation: marquee 34s linear infinite; }
.brands-mask:hover .brands-track { animation-play-state: paused; }
.brand-item {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -.01em;
  color: var(--slate); white-space: nowrap; opacity: .72; transition: .2s; display: flex; align-items: center; gap: 10px;
}
.brand-item::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--grad-soft); }
.brand-item:hover { opacity: 1; color: var(--navy); }

/* ---------- Divisor de sección (ola) ---------- */
.divider { display: block; width: 100%; height: 48px; }
.divider path { fill: currentColor; }

/* ---------- Categorías: ilustración + anillo ---------- */
.cat-card { position: relative; overflow: hidden; }
.cat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(95,194,196,.16), transparent 70%); transition: .3s; opacity: .6;
}
.cat-card:hover::after { transform: scale(1.5); opacity: 1; }
.cat-card .ico { position: relative; z-index: 1; transition: transform .25s; }
.cat-card:hover .ico { transform: translateY(-3px) scale(1.06); }
.cat-card .arrow { position: absolute; right: 20px; bottom: 20px; color: var(--sky); opacity: 0; transform: translateX(-6px); transition: .25s; }
.cat-card:hover .arrow { opacity: 1; transform: none; }

/* ---------- Product card: zoom + sheen ---------- */
.prod-img { overflow: hidden; }
.prod-img img { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.prod-card:hover .prod-img img { transform: scale(1.07); }
.prod-img::after {
  content: ""; position: absolute; top: -60%; left: -30%; width: 40%; height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-120%) rotate(18deg); pointer-events: none;
}
.prod-card:hover .prod-img::after { animation: sheen .7s ease; }

/* ---------- Badges de entrega ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: .64rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; line-height: 1;
}
.badge-cf { background: rgba(86,174,226,.14); color: #1E6FA8; border: 1px solid rgba(86,174,226,.3); }
.badge-nac { background: rgba(47,169,124,.13); color: #1E7A57; border: 1px solid rgba(47,169,124,.28); }
.badge-vol { background: rgba(14,58,92,.08); color: var(--navy); border: 1px solid var(--line-2); }
.prod-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.prod-img .corner-badge { position: absolute; top: 10px; left: 10px; z-index: 2; box-shadow: var(--shadow-sm); }

/* ---------- TL;DR / respuesta rápida (GEO) ---------- */
.tldr {
  background: linear-gradient(100deg, rgba(86,174,226,.08), rgba(95,194,196,.10));
  border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 4px 0 20px;
}
.tldr .lbl { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); font-weight: 600; }
.tldr p { color: var(--ink); font-size: 1.02rem; margin-top: 4px; }

/* ---------- Datos clave (extractable) ---------- */
.keyfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 26px; }
.keyfact {
  display: flex; gap: 11px; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.keyfact svg { flex: 0 0 auto; color: var(--sky-deep); margin-top: 1px; }
.keyfact .k { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); display: block; }
.keyfact .v { font-size: .92rem; color: var(--ink); font-weight: 600; line-height: 1.35; }

/* ---------- Panel de disponibilidad (PDP) ---------- */
.avail-box { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 18px 0 6px; }
.avail-box .ab-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-weight: 700; color: #fff;
  font-size: .92rem; background: var(--grad);
}
.avail-box.cf .ab-head { background: linear-gradient(94deg, #2E8FD0, #1E6FA8); }
.avail-box.nac .ab-head { background: linear-gradient(94deg, #2FA97C, #1E7A57); }
.avail-box .ab-body { padding: 14px 18px; display: grid; gap: 8px; background: #fff; }
.avail-row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.avail-row .l { color: var(--slate); }
.avail-row .r { font-weight: 700; color: var(--navy); font-family: var(--font-mono); }
.avail-note { font-size: .78rem; color: var(--mist); padding: 0 18px 14px; background: #fff; }
.qty-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--navy); color: #fff; font-family: var(--font-mono); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.exp-tag { font-family: var(--font-mono); font-size: .72rem; color: var(--slate); }

/* ---------- Página Disponibilidad ---------- */
.disp-hero { padding: 66px 0 26px; }
.disp-wrap { padding-bottom: 80px; }
.disp-group { margin-top: 40px; }
.disp-group-head {
  display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--r-md); color: #fff;
  margin-bottom: 6px;
}
.disp-group-head.cf { background: linear-gradient(94deg, #1E6FA8, #2E8FD0); background-image: radial-gradient(300px 120px at 92% 0,rgba(95,194,196,.4),transparent), linear-gradient(94deg,#1E6FA8,#2E8FD0); }
.disp-group-head.nac { background: linear-gradient(94deg, #1E7A57, #2FA97C); }
.disp-group-head .ic { font-size: 1.7rem; line-height: 1; }
.disp-group-head h2 { color: #fff; font-size: 1.35rem; margin: 0; }
.disp-group-head p { color: rgba(255,255,255,.85); font-size: .86rem; margin-top: 2px; }
.disp-sub { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); font-weight: 600; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.disp-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.disp-table { display: grid; gap: 8px; }
.disp-item {
  display: grid; grid-template-columns: 46px 1fr auto auto; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; transition: .15s;
}
.disp-item:hover { border-color: var(--sky); box-shadow: var(--shadow-sm); }
.disp-item .thumb { width: 46px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #F7FBFD; display: grid; place-items: center; overflow: hidden; }
.disp-item .thumb img { max-height: 34px; max-width: 40px; object-fit: contain; mix-blend-mode: multiply; }
.disp-item .nm { font-family: var(--font-display); color: var(--navy); font-weight: 700; font-size: .96rem; }
.disp-item .nm a { color: var(--navy); }
.disp-item .nm small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--mist); font-size: .76rem; }
.disp-item .exp { text-align: right; }
.disp-item .verify { color: #C77700; font-size: .7rem; font-family: var(--font-mono); }
.disp-item.vol { border-left: 3px solid var(--teal); }
.disp-legal {
  margin-top: 44px; background: var(--navy); color: #DCEBF5; border-radius: var(--r-lg); padding: 34px 38px;
  background-image: radial-gradient(400px 200px at 90% 10%, rgba(95,194,196,.22), transparent);
}
.disp-legal h3 { color: #fff; font-size: 1.2rem; margin-bottom: 14px; }
.disp-legal ul { list-style: none; display: grid; gap: 10px; }
.disp-legal li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.disp-legal li svg { flex: 0 0 auto; color: var(--teal); margin-top: 3px; }
.disp-warn {
  display: flex; gap: 12px; align-items: flex-start; background: rgba(199,119,0,.08);
  border: 1px solid rgba(199,119,0,.25); border-radius: var(--r-md); padding: 16px 20px; margin-top: 22px;
  font-size: .86rem; color: #8A5300;
}
.disp-warn svg { flex: 0 0 auto; color: #C77700; margin-top: 1px; }

/* ---------- Reveal variantes ---------- */
.reveal.up { transform: translateY(30px); }
.reveal.left { transform: translateX(-26px); }
.reveal.right { transform: translateX(26px); }
.reveal.in { transform: none; }
.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: .04s; }
.stagger.in > *:nth-child(2) { transition-delay: .10s; }
.stagger.in > *:nth-child(3) { transition-delay: .16s; }
.stagger.in > *:nth-child(4) { transition-delay: .22s; }
.stagger.in > *:nth-child(5) { transition-delay: .28s; }
.stagger.in > *:nth-child(6) { transition-delay: .34s; }
.stagger.in > *:nth-child(7) { transition-delay: .40s; }
.stagger.in > *:nth-child(8) { transition-delay: .46s; }

/* franja disponibilidad en header/CTA */
.avail-cta {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .76rem;
  color: var(--teal-deep); font-weight: 600; background: rgba(95,194,196,.1); border: 1px solid rgba(95,194,196,.3);
  padding: 7px 14px; border-radius: 999px;
}
.avail-cta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47,169,124,.5); animation: pulse-ring 2s ease-out infinite; }

/* ---------- Densidad: menos espacio muerto ---------- */
.hero { padding: 54px 0 60px; }
section.block { padding: 64px 0; }
.hero-visual { min-height: 420px; }
.hero .hero-cross { opacity: .07; width: 330px; }
.section-head { margin-bottom: 30px; }

/* ---------- Hero: tarjetas de producto reales ---------- */
.hero-shot {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-md); padding: 12px; width: min(238px, 74%);
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both, floaty 8s ease-in-out infinite;
}
.hero-shot .img {
  aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  border: 1px solid var(--line);
  background: radial-gradient(200px 120px at 50% 120%, rgba(95,194,196,.14), transparent), linear-gradient(180deg,#FBFDFE,#EFF6FB);
}
.hero-shot .img img { max-height: 122px; max-width: 86%; object-fit: contain; mix-blend-mode: multiply; }
.hero-shot .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.hero-shot .meta b { font-family: var(--font-display); color: var(--navy); font-size: .92rem; letter-spacing: -.01em; }
.hero-shot .tag { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); font-weight: 600; }
.hero-shot.c1 { top: 0; right: 0; z-index: 2; animation-delay: .15s, 0s; }
.hero-shot.c2 { top: 32%; left: -6%; z-index: 3; width: min(224px, 70%); animation-delay: .32s, .8s; }
.hero-shot.c3 { bottom: 0; right: 16%; z-index: 2; width: min(216px, 66%); animation-delay: .5s, 1.6s; }

/* ---------- Categorías con miniatura real ---------- */
.cat-card { padding-right: 80px; }
.cat-card::after { display: none; }
.cat-thumb {
  position: absolute; right: 16px; top: 16px; width: 56px; height: 56px; border-radius: 12px;
  overflow: hidden; background: #F7FBFD; border: 1px solid var(--line); display: grid; place-items: center; z-index: 1;
  transition: border-color .2s, transform .2s;
}
.cat-thumb img { max-height: 44px; max-width: 48px; object-fit: contain; mix-blend-mode: multiply; }
.cat-card:hover .cat-thumb { border-color: var(--teal); transform: scale(1.05); }

/* ---------- Muro de portafolio (marquee de productos) ---------- */
.pmarquee { background: linear-gradient(180deg,#fff,#F4F9FC); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; overflow: hidden; }
.pmarquee .wrap { margin-bottom: 16px; }
.pmarquee-mask { overflow: hidden; -webkit-mask-image: linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent); mask-image: linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent); }
.pmarquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 70s linear infinite; }
.pmarquee-mask:hover .pmarquee-track { animation-play-state: paused; }
.pshot { flex: 0 0 auto; width: 142px; text-decoration: none !important; }
.pshot .img { height: 112px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg,#fff,#F1F7FB); display: grid; place-items: center; overflow: hidden; transition: .2s; }
.pshot:hover .img { border-color: var(--sky); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.pshot .img img { max-height: 90px; max-width: 82%; object-fit: contain; mix-blend-mode: multiply; }
.pshot span { display: block; text-align: center; margin-top: 8px; font-family: var(--font-mono); font-size: .68rem; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Sección split con visual ---------- */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: center; }
.split-visual { position: relative; background: radial-gradient(400px 300px at 30% 20%, rgba(86,174,226,.16), transparent), linear-gradient(140deg,#EAF4FB,#E5F5F5); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px; display: grid; place-items: center; min-height: 320px; box-shadow: var(--shadow-sm); overflow: hidden; }
.split-visual > img { max-height: 232px; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 20px 30px rgba(10,42,67,.16)); }
.split-visual .cold-badge { position: absolute; top: 18px; left: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-radius: 999px; padding: 7px 14px; font-family: var(--font-mono); font-weight: 700; font-size: .8rem; color: #1E6FA8; z-index: 2; }
.split-visual .deliv-chips { position: absolute; bottom: 18px; left: 18px; right: 18px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; z-index: 2; }
.split-list { list-style: none; display: grid; gap: 10px; margin: 16px 0 22px; }
.split-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--slate); }
.split-list li svg { flex: 0 0 auto; color: var(--teal-deep); margin-top: 3px; }

/* ---------- Tabla comparativa + definiciones (cobertura) ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
table.cmp { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .92rem; }
table.cmp th { text-align: left; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); background: #F3F8FB; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
table.cmp td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
table.cmp td:first-child { font-weight: 700; color: var(--navy); }
table.cmp tr:last-child td { border-bottom: 0; }
.deflist { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.deflist dt { font-family: var(--font-display); font-weight: 700; color: var(--navy); padding: 12px 16px 2px; }
.deflist dd { margin: 0; padding: 0 16px 12px; color: var(--slate); font-size: .92rem; border-bottom: 1px solid var(--line); }
.deflist dd:last-child { border-bottom: 0; }

/* ---------- Enlaces cruzados (misma sustancia / laboratorio) ---------- */
.xlinks { display: grid; gap: 12px; }
.xlink { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; }
.xlbl { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); font-weight: 600; margin-bottom: 10px; }
.xrow { display: flex; gap: 8px; flex-wrap: wrap; }
.xchip { font-size: .84rem; font-weight: 600; color: var(--navy); background: #F1F7FB; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px; text-decoration: none !important; transition: .15s; }
.xchip:hover { border-color: var(--sky); color: var(--sky-deep); background: #fff; }

/* ---------- Consentimiento en formularios ---------- */
.consent { display: flex; gap: 9px; align-items: flex-start; font-size: .8rem; color: var(--slate); margin: 4px 0 12px; }
.consent input { margin-top: 3px; accent-color: var(--sky-deep); }

.foot-legal a { color: #BFE0F2; }
.foot-legal a:hover { color: #fff; }

/* ---------- Icono decorativo (marca de agua) ---------- */
.page-hero { position: relative; overflow: hidden; }
.hero-deco {
  position: absolute; right: -40px; top: -30px; width: 260px; height: auto;
  opacity: .07; transform: rotate(8deg); pointer-events: none; z-index: 0;
  animation: floaty2 12s ease-in-out infinite;
}
.page-hero .wrap { position: relative; z-index: 1; }
.cta-band { position: relative; overflow: hidden; }
.cta-deco {
  position: absolute; right: 30px; bottom: -40px; width: 200px; opacity: .10;
  transform: rotate(-10deg); pointer-events: none;
}
.cta-band > div { position: relative; z-index: 1; }
footer.site { position: relative; overflow: hidden; }
.foot-deco {
  position: absolute; left: -50px; bottom: -50px; width: 240px; opacity: .05;
  transform: rotate(-6deg); pointer-events: none; filter: brightness(0) invert(1);
}

@media (max-width: 860px) {
  .hero-deco { width: 160px; opacity: .05; }
  .hero-visual { min-height: 340px; margin-top: 6px; }
  .hero-shot { width: min(210px, 60%); }
  .hero-shot.c2 { left: 0; }
  .hero-shot.c3 { right: 4%; }
  .split { grid-template-columns: 1fr; }
  .keyfacts { grid-template-columns: 1fr; }
  .disp-item { grid-template-columns: 40px 1fr auto; }
  .disp-item .exp { grid-column: 2 / -1; text-align: left; }
  .brands-track { animation-duration: 24s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .brands-track { animation: none; }
  .reveal, .stagger > * { transition: none; opacity: 1; transform: none; }
}
