/* Lancelot mobile layer — same content, context-appropriate navigation and composition. */
.rp-mobile-dock{display:none}

@media (max-width:820px){
  :root{
    --rp-mobile-dock:68px;
    --rp-system-safe:max(env(safe-area-inset-bottom, 0px), 18px);
  }
  html{scroll-padding-top:88px}
  body{padding-bottom:calc(var(--rp-mobile-dock) + var(--rp-system-safe) + 18px)!important}

  /* Consistent top shell: legacy desktop links are replaced by the thumb dock. */
  #site-nav .nav-links,
  body>nav .nl,
  header .nl,
  header .nav-links,
  nav .mobile-menu,
  .mobile-menu{display:none!important}
  html body #site-nav{
    height:78px!important;
    padding:12px 18px 22px!important;
    background-color:#eaf1fd!important;
    background-image:none!important;
    border:0!important;
    border-radius:0 0 52% 52%/0 0 18px 18px!important;
    box-shadow:0 1px 0 rgba(30,57,194,.15)!important;
    backdrop-filter:none!important;
    isolation:isolate;
  }
  #site-nav>a:first-of-type{min-height:44px}

  /* Primary mobile navigation stays in the natural thumb zone. */
  .rp-mobile-dock{
    display:grid;
    position:fixed;
    top:auto!important;
    left:12px;
    right:12px;
    bottom:calc(10px + var(--rp-system-safe));
    width:auto!important;
    height:auto!important;
    margin:0!important;
    z-index:190;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:end;
    min-height:64px;
    padding:6px 6px 5px;
    border:1px solid rgba(30,57,194,.18);
    border-radius:25px 25px 29px 29px;
    background:#f8faff;
    box-shadow:
      0 18px 46px rgba(19,36,88,.2),
      0 1px 0 rgba(255,255,255,.9) inset;
    overflow:visible;
    transition:transform .3s cubic-bezier(.22,1,.36,1),opacity .2s ease;
  }
  .rp-mobile-dock::before{
    content:'';
    position:absolute;
    left:24px;
    right:24px;
    top:-1px;
    height:2px;
    border-radius:999px;
    background:linear-gradient(90deg,#31c21e 0 42%,#1e39c2 42% 100%);
    opacity:.82;
  }
  .rp-mobile-dock a{
    position:relative;
    display:flex;
    min-width:0;
    min-height:52px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    border-radius:17px;
    color:#42516f;
    font:750 9px/1.05 'Plus Jakarta Sans',sans-serif;
    text-decoration:none;
    -webkit-tap-highlight-color:transparent;
    transition:color .18s ease,background-color .18s ease,transform .18s ease;
  }
  .rp-mobile-dock a svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .rp-mobile-dock a:active{transform:scale(.95)}
  .rp-mobile-dock a[aria-current="page"]{color:#1e39c2;background:#edf2ff}
  .rp-mobile-dock a[aria-current="page"]::after{
    content:'';
    position:absolute;
    bottom:3px;
    width:4px;
    height:4px;
    border-radius:50%;
    background:#31c21e;
  }
  .rp-mobile-dock .rp-mobile-dock__agenda{
    width:62px;
    height:62px;
    min-height:60px;
    justify-self:center;
    margin:-15px auto 0;
    border:4px solid #f8faff;
    border-radius:48% 52% 46% 54%/52% 48% 55% 45%;
    background:#1e39c2;
    color:#f7f9ff;
    box-shadow:
      0 10px 25px rgba(30,57,194,.34),
      0 0 0 1px rgba(30,57,194,.12);
  }
  .rp-mobile-dock .rp-mobile-dock__agenda svg{width:22px;height:22px}
  .rp-mobile-dock .rp-mobile-dock__agenda::before{
    content:'';
    position:absolute;
    right:7px;
    top:7px;
    width:6px;
    height:6px;
    border:2px solid #1e39c2;
    border-radius:50%;
    background:#31c21e;
    box-shadow:0 0 0 2px #f8faff;
  }
  body.rp-consent-pending .rp-mobile-dock,
  body.rp-dialog-open .rp-mobile-dock,
  body.profile-open .rp-mobile-dock{opacity:0;transform:translateY(130%);pointer-events:none}

  /* Floating utilities clear the navigation and never cover the last line. */
  .rp-privacy-launcher{bottom:calc(92px + var(--rp-system-safe))!important;left:12px!important;min-width:48px!important;min-height:48px!important}
  .rp-kiba,
  .rp-kiba.rp-kiba--with-toggle{right:12px!important;bottom:calc(92px + var(--rp-system-safe))!important}
  .rp-chat-launcher{min-width:58px!important;min-height:48px!important}
  .rp-chat-panel,
  .rp-kiba--with-toggle .rp-kiba-panel{
    right:10px!important;
    bottom:calc(154px + var(--rp-system-safe))!important;
    width:calc(100vw - 20px)!important;
    max-height:min(70svh,620px)!important;
  }
  .ttoggle,.theme-toggle{
    position:fixed!important;
    top:12px!important;
    right:12px!important;
    bottom:auto!important;
    left:auto!important;
    z-index:205!important;
    gap:2px!important;
    padding:3px!important;
    border:1px solid rgba(30,57,194,.16)!important;
    border-radius:999px!important;
    background:#f8faff!important;
    box-shadow:0 8px 24px rgba(30,57,194,.13)!important;
    transform:none!important;
  }
  .ttoggle button,.theme-toggle button{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    border-radius:50%!important;
  }
  .rp-consent{bottom:0!important;padding:8px!important}
  .rp-consent-card{max-height:calc(100svh - 16px);overflow:auto}

  /* Mobile hero: information first, official mark as a separate photographic act. */
  #nav-hero-surface{display:none!important}
  #hero-track{height:auto!important;min-height:830px!important;background:#f7f9ff!important}
  #hero-stage{
    --rp-mark-top:452px;
    --rp-mark-h:clamp(260px,70vw,280px);
    position:relative!important;
    top:auto!important;
    height:830px!important;
    min-height:830px!important;
    overflow:hidden!important;
    background:#f7f9ff!important;
  }
  #hero-stage::before{
    content:'';
    position:absolute;
    left:50%;
    top:430px;
    width:340px;
    height:340px;
    z-index:0;
    border-radius:50%;
    background:
      radial-gradient(circle at 31% 34%,rgba(49,194,30,.13),transparent 36%),
      radial-gradient(circle at 73% 39%,rgba(30,57,194,.13),transparent 38%);
    filter:blur(8px);
    transform:translateX(-50%);
    pointer-events:none;
  }
  #hero-stage::after{
    content:'';
    position:absolute;
    left:-18%;
    right:-18%;
    top:425px;
    height:360px;
    z-index:0;
    border:1px solid rgba(30,57,194,.18);
    border-radius:50%;
    background:
      linear-gradient(135deg,rgba(49,194,30,.055),transparent 46%),
      linear-gradient(315deg,rgba(30,57,194,.05),transparent 52%),
      #f7f9ff;
    box-shadow:
      0 0 0 12px rgba(49,194,30,.025),
      0 0 0 24px rgba(30,57,194,.018);
    pointer-events:none;
  }
  #hero-copy{
    position:relative!important;
    inset:auto!important;
    z-index:5!important;
    display:flex!important;
    width:100%!important;
    height:auto!important;
    max-width:none!important;
    justify-content:flex-start!important;
    padding:112px 20px 0!important;
    opacity:1!important;
    transform:none!important;
    pointer-events:auto!important;
  }
  #hero-copy>div:first-child{max-width:28ch;margin-bottom:14px!important;font-size:9px!important;line-height:1.5!important}
  #hero-copy h1{max-width:9.5ch;font-size:clamp(2.55rem,13vw,3.45rem)!important;line-height:.96!important;letter-spacing:-.055em!important}
  #hero-copy p{max-width:35ch!important;margin-top:18px!important;color:#43504a!important;font-size:15px!important;line-height:1.62!important}
  #hero-copy>div:last-child{width:100%;margin-top:24px!important;gap:10px!important}
  #hero-copy>div:last-child a{min-height:48px;display:inline-flex;align-items:center;justify-content:center;padding:12px 21px!important}
  #hero-mask,
  #hero-mask-rim{
    inset:var(--rp-mark-top) 8px auto!important;
    width:calc(100% - 16px)!important;
    height:calc(var(--rp-mark-h) + 14px)!important;
    opacity:1!important;
    transform:none!important;
    -webkit-mask-position:center center!important;
    mask-position:center center!important;
    -webkit-mask-size:auto var(--rp-mark-h)!important;
    mask-size:auto var(--rp-mark-h)!important;
    background-position:center center!important;
    background-size:auto var(--rp-mark-h)!important;
    transform-origin:50% 52%!important;
    animation:rp-mobile-hero-breathe 6.5s ease-in-out infinite!important;
  }
  #hero-mask{z-index:2!important;opacity:.94!important}
  #hero-mask img{object-position:50% 42%!important}
  #hero-mask-rim{
    z-index:3!important;
    opacity:.82!important;
    filter:
      drop-shadow(0 12px 22px rgba(49,194,30,.12))
      drop-shadow(0 18px 30px rgba(30,57,194,.12))!important;
  }
  #hero-logo-pulse{
    display:block!important;
    left:50%!important;
    top:calc(var(--rp-mark-top) + 7px)!important;
    width:calc(var(--rp-mark-h) * .8208)!important;
    height:var(--rp-mark-h)!important;
    z-index:4!important;
    opacity:.58!important;
    transform:translateX(-50%)!important;
    mix-blend-mode:screen!important;
  }
  #hero-logo-pulse .hero-pulse-halo{opacity:.13!important;filter:blur(5px)!important}
  #hero-logo-pulse .hero-pulse-core{opacity:.7!important;filter:blur(.8px)!important}
  #hero-logo-pulse .hero-pulse-pin{opacity:.76!important}
  #hero-full,#hero-cue,#hero-stats{display:none!important}

  @keyframes rp-mobile-hero-breathe{
    0%,100%{transform:translateY(0) scale(.988)}
    50%{transform:translateY(-5px) scale(1)}
  }

  /* Home sections: desktop grids must become true single-column mobile flows.
     Most of these layouts are inline in the original page, so the overrides
     intentionally use !important. */
  #nosotros>div{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    gap:42px!important;
    padding:76px 20px 84px!important;
  }
  #nosotros>div>div{
    min-width:0!important;
  }
  #nosotros .real-gallery{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:none!important;
    grid-auto-rows:auto!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    gap:10px!important;
    transform:none!important;
  }
  #nosotros .real-gallery figure{
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    aspect-ratio:1/1!important;
    border-radius:20px!important;
  }
  #nosotros .real-gallery figure>img{
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    object-fit:cover!important;
  }
  #nosotros .reveal>div:last-child{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #nosotros .reveal>div:last-child>div{
    min-width:0!important;
    padding:14px 10px!important;
  }

  #filosofia .philosophy-layout{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:100%!important;
  }
  #filosofia .philosophy-layout>div{
    width:100%!important;
    min-width:0!important;
  }
  #filosofia .philosophy-layout>div:first-child{
    min-height:0!important;
    order:1;
  }
  #filosofia .philosophy-layout>div:first-child>div{
    position:relative!important;
    top:auto!important;
    width:100%!important;
    height:min(124vw,520px)!important;
    min-height:410px!important;
  }
  #filosofia .philosophy-layout>div:last-child{
    order:2;
    padding:64px 20px 80px!important;
  }
  #filosofia .cat-photo-mask{
    inset:12px 10px 0!important;
  }
  #filosofia .cat-photo-mask img{
    transform:translateX(-14%) scale(1.04)!important;
    object-position:50% 18%!important;
  }
  #filosofia .philosophy-layout h2,
  #filosofia .philosophy-layout h3,
  #filosofia .philosophy-layout p{
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  #diferencias>div{
    width:100%!important;
    max-width:100%!important;
    padding:76px 20px 84px!important;
  }
  #diferencias>div>.reveal:first-child{
    margin-bottom:30px!important;
  }
  #diferencias>div>.reveal:last-child{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
    width:100%!important;
  }
  #diferencias>div>.reveal:last-child>div{
    min-width:0!important;
    padding:24px 22px!important;
  }

  [data-screen-label="CTA"]>div{
    width:100%!important;
    max-width:100%!important;
    padding:72px 20px 116px!important;
  }
  [data-screen-label="CTA"] .reveal>div:last-child{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  [data-screen-label="CTA"] .reveal>div:last-child>a{
    width:100%!important;
    min-height:48px!important;
    justify-content:center!important;
    text-align:center;
  }

  #contacto>div{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    gap:42px!important;
    padding:76px 20px 88px!important;
  }
  #contacto>div>div{
    min-width:0!important;
  }
  #contacto>div>div:last-child>div{
    display:grid!important;
    grid-template-columns:76px minmax(0,1fr)!important;
    gap:12px!important;
    min-width:0!important;
  }
  #contacto a{
    max-width:100%;
    overflow-wrap:anywhere;
  }
  .footer-col{min-width:0}
  .footer-col a{
    min-height:40px;
    display:flex;
    align-items:center;
    overflow-wrap:anywhere;
  }
  .ecosystem-trigger{
    width:100%;
    justify-content:space-between;
    line-height:1.35;
  }

  /* Touch and reading comfort. */
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .service-link,
  .service-all,
  .cbtn,
  .hlink{min-height:44px}
  .ttoggle button,
  .theme-toggle button,
  .theme-btn,
  #btnL,#btnD{min-width:44px!important;min-height:44px!important}
  .footer-social,.fsoc{width:44px!important;height:44px!important}
  footer,.site-footer{padding-bottom:calc(112px + var(--rp-system-safe))!important}

  /* Team: one professional per row, faces remain legible before opening details. */
  .team-specialists-grid{grid-template-columns:1fr!important}
  .team-featured-grid .doctor-card,
  .team-specialists-grid .doctor-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:clamp(220px,75vw,252px)!important;
    min-height:0!important;
    aspect-ratio:auto!important;
  }
  .team-specialists-grid .doctor-card>img{object-position:center 28%!important}
  .doctor-card::after{min-height:32px;display:flex;align-items:center}
  .profile-overlay{padding:6px!important}
  .profile-panel{height:calc(100svh - 12px)!important;max-height:calc(100svh - 12px)!important;grid-template-rows:minmax(250px,38svh) minmax(0,1fr)!important}
  .profile-photo{object-position:center!important}
  .profile-close{width:48px!important;height:48px!important}

  /* Horizontal section filters remain usable instead of being clipped. */
  .sticky-nav,.tabs,.filter-tabs,.cat-tabs{
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
  }
  .sticky-nav::-webkit-scrollbar,.tabs::-webkit-scrollbar,.filter-tabs::-webkit-scrollbar,.cat-tabs::-webkit-scrollbar{display:none}

  /* Inner pages: a shared mobile composition instead of nine unrelated
     desktop layouts squeezed into a narrow viewport. */
  main,
  main#contenido,
  .wrap,
  .sec,
  .sec>.wrap,
  .privacy-layout,
  .privacy-content,
  .privacy-index{
    min-width:0;
    max-width:100%;
  }
  .page-hero{
    overflow:hidden!important;
    min-height:clamp(560px,158vw,650px)!important;
    padding-inline:20px!important;
  }
  .page-hero .hero-inner{
    width:100%!important;
    min-width:0!important;
  }
  .page-hero h1,
  .page-hero p,
  .page-hero .stag{
    max-width:100%!important;
    overflow-wrap:normal;
    word-break:normal;
  }
  .page-hero h1{
    text-wrap:balance;
  }
  .page-nav,
  .filter-bar{
    display:flex!important;
    width:calc(100% - 24px)!important;
    max-width:calc(100% - 24px)!important;
    margin-inline:auto!important;
    padding:7px!important;
    gap:4px!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .page-nav::-webkit-scrollbar,
  .filter-bar::-webkit-scrollbar{display:none}
  .page-nav a,
  .filter-bar a,
  .filter-bar button,
  .filter-bar .fbtn{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    min-height:44px!important;
    padding-inline:16px!important;
    scroll-snap-align:start;
    white-space:nowrap;
  }
  .sec,
  .sec>.wrap{
    width:100%!important;
  }
  .grid,
  .g2,
  .g3,
  .g4,
  .cta-double,
  .contact-grid,
  .chan-grid-resp,
  .soc-grid{
    max-width:100%!important;
  }
  .grid>*,
  .g2>*,
  .g3>*,
  .g4>*,
  .cta-double>*,
  .contact-grid>*,
  .chan-grid-resp>*,
  .soc-grid>*,
  .card,
  .spec-card,
  .hcard,
  .chan-card,
  .soc-card,
  .lab-profile,
  .cta-card{
    min-width:0!important;
    max-width:100%!important;
  }
  .chan-card,
  .chan-val,
  .citt,
  .citt span,
  .citt strong,
  .cform,
  .cform input,
  .cform select,
  .cform textarea{
    overflow-wrap:anywhere;
  }
  .cform input,
  .cform select,
  .cform textarea{
    width:100%!important;
    max-width:100%!important;
  }
  .cta-card,
  .cta-bar{
    overflow:hidden;
  }
  .fi,
  .ft,
  .fb,
  .fl{
    min-width:0;
    max-width:100%;
  }
  .fl a,
  .fc a,
  .privacy-content a{
    overflow-wrap:anywhere;
  }

  /* Privacy is also a real mobile page: legal tables stay readable without
     forcing the entire document wider than the device. */
  .privacy-layout{
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    padding:48px 16px 124px!important;
    gap:34px!important;
  }
  .privacy-layout>*{
    width:100%!important;
    min-width:0!important;
  }
  .privacy-index{
    padding:20px!important;
  }
  .privacy-content section{
    min-width:0!important;
    padding-bottom:36px!important;
    margin-bottom:36px!important;
  }
  .privacy-table{
    display:table!important;
    width:100%!important;
    max-width:100%!important;
    table-layout:fixed;
    overflow:visible!important;
  }
  .privacy-table th,
  .privacy-table td{
    width:auto!important;
    padding:11px 7px!important;
    overflow-wrap:anywhere;
    word-break:normal;
  }
  .privacy-contact{
    width:100%!important;
    min-width:0!important;
    padding:24px 20px!important;
  }
  .privacy-contact a{
    max-width:100%;
    justify-content:center;
    white-space:normal!important;
    text-align:center;
  }
}

@media (max-width:359px){
  #hero-track,#hero-stage{height:880px!important;min-height:880px!important}
  #hero-stage{--rp-mark-top:548px;--rp-mark-h:245px}
  #hero-stage::before{top:520px;width:300px;height:300px}
  #hero-stage::after{top:515px;height:335px}
  #hero-copy h1{font-size:2.45rem!important}
  #hero-copy>div:last-child a{width:100%}
  .rp-mobile-dock{left:6px;right:6px}
  .rp-mobile-dock a{font-size:8px}
  #contacto>div>div:last-child>div{
    grid-template-columns:minmax(0,1fr)!important;
    gap:6px!important;
  }
  .footer-links{grid-template-columns:minmax(0,1fr)!important}
  .page-hero{
    min-height:560px!important;
    padding-inline:16px!important;
  }
  .page-hero h1{
    font-size:clamp(2.8rem,16vw,3.45rem)!important;
  }
  .sec{
    padding-left:16px!important;
    padding-right:16px!important;
  }
  .page-nav,
  .filter-bar{
    width:calc(100% - 16px)!important;
    max-width:calc(100% - 16px)!important;
  }
  .privacy-hero{
    padding-inline:16px!important;
  }
  .privacy-nav{
    gap:10px!important;
    padding-inline:14px!important;
  }
  .privacy-brand{
    gap:6px!important;
    font-size:14px!important;
    white-space:nowrap;
  }
  .privacy-brand img{
    width:32px!important;
    height:32px!important;
  }
  .privacy-nav__links .home-link{
    padding:9px 12px!important;
    font-size:11px!important;
    white-space:nowrap;
  }
  .privacy-hero h1{
    font-size:2.65rem!important;
  }
  .privacy-layout{
    padding-inline:12px!important;
  }
  .privacy-index,
  .privacy-contact{
    padding:18px 16px!important;
  }
  .privacy-table{
    font-size:11px!important;
  }
  .privacy-table th,
  .privacy-table td{
    padding:9px 5px!important;
  }
}

@media (min-width:568px) and (max-width:900px) and (orientation:landscape){
  body{padding-bottom:0!important}
  .rp-mobile-dock{display:none}
  .rp-privacy-launcher{bottom:12px!important}
  .rp-kiba,.rp-kiba.rp-kiba--with-toggle{bottom:12px!important}
  .rp-kiba-panel,.rp-kiba--with-toggle .rp-kiba-panel{bottom:66px!important}
  #hero-track,#hero-stage{height:620px!important;min-height:620px!important}
  #hero-copy{width:56%!important;padding:102px 24px 24px!important}
  #hero-copy h1{font-size:clamp(2.2rem,5.6vw,3rem)!important}
  #hero-copy p{font-size:13px!important;line-height:1.5!important}
  #hero-copy>div:last-child{margin-top:18px!important}
  #hero-mask,#hero-mask-rim{
    inset:105px 18px auto auto!important;
    width:43%!important;
    height:450px!important;
    -webkit-mask-size:auto 390px!important;
    mask-size:auto 390px!important;
    background-size:auto 390px!important;
  }
  #hero-stage::after{left:50%;right:-10%;top:72px;height:500px}
}

@media (prefers-reduced-motion:reduce){
  .rp-mobile-dock{transition:none}
  #hero-mask,#hero-mask-rim{animation:none!important}
  #hero-logo-pulse{display:none!important}
  #hero-mask-rim{display:block!important;opacity:1!important}
  #hero-mask{display:block!important;opacity:.94!important}
}

@media (max-width:900px){.legal-index{position:static!important;max-width:none!important}}

.lp-mcta{display:none}
@media (max-width:820px){.lp-mcta{display:flex}header .lp-nav,#site-nav .lp-nav{display:none!important}}
