/* ATO-536: group wrappers must be transparent to the existing DESKTOP grids. */
body[data-route="/"] .ek-f2-group,
body[data-route="/"] .ek-f2-rail,
body[data-route="/problemas/"] .ek-f2-group,
body[data-route="/problemas/"] .ek-f2-rail,
body[data-route="/osteopatia/"] .approved-techniques .ek-f2-rail{display:contents!important}
.ek-f2-group-title,.ek-f2-techniques-title,.ek-f2-home-shortcuts{display:none!important}

/* Keep only fine editorial section separators, not extra short decorative strokes. */
body[data-route="/osteopatia/"] .reading .ek-section:not(.help-section):not(.ek-band),
body[data-route="/osteopatia/craneal/"] .reading .ek-section:not(.help-section):not(.ek-band),
body[data-route="/osteopatia/visceral/"] .reading .ek-section:not(.help-section):not(.ek-band),
body[data-route="/osteopatia/induccion-miofascial/"] .reading .ek-section:not(.help-section):not(.ek-band){
  border-top:1px solid var(--ek-line,#303b322b)!important
}
body[data-route="/osteopatia/"] .reading .ek-section>h2::after,
body[data-route="/osteopatia/craneal/"] .reading .ek-section>h2::after,
body[data-route="/osteopatia/visceral/"] .reading .ek-section>h2::after,
body[data-route="/osteopatia/induccion-miofascial/"] .reading .ek-section>h2::after{
  display:none!important;content:none!important
}
body[data-route="/osteopatia/"] .reading .ek-section>h2,
body[data-route="/osteopatia/craneal/"] .reading .ek-section>h2,
body[data-route="/osteopatia/visceral/"] .reading .ek-section>h2,
body[data-route="/osteopatia/induccion-miofascial/"] .reading .ek-section>h2{
  border-bottom:0!important;box-shadow:none!important
}
@media(max-width:700px){
  /* Same swipe model, different editorial treatments. */
  body[data-route="/"] .home-problems .directory,
  body[data-route="/problemas/"] .ek-problem-discovery .ek-discovery-grid,
  body[data-route="/osteopatia/"] .approved-techniques{
    display:block!important;max-width:100%!important;min-width:0!important
  }
  body[data-route="/"] .ek-f2-group,
  body[data-route="/problemas/"] .ek-f2-group{
    display:block!important;margin:0 0 20px!important
  }
  body[data-route="/"] .ek-f2-group-title,
  body[data-route="/problemas/"] .ek-f2-group-title,
  body[data-route="/osteopatia/"] .ek-f2-techniques-title{
    display:block!important;margin:0 0 14px!important;padding:0!important;max-width:none!important;
    font:500 16px/1.32 var(--ek-font-body,Inter,sans-serif)!important;
    color:inherit!important;letter-spacing:0!important;border:0!important
  }
  body[data-route="/"] .ek-f2-rail,
  body[data-route="/problemas/"] .ek-f2-rail,
  body[data-route="/osteopatia/"] .approved-techniques .ek-f2-rail{
    display:flex!important;flex-wrap:nowrap!important;gap:12px!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;scroll-padding-inline:0;
    overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
    touch-action:pan-x pan-y;scrollbar-width:none;
    width:100%;max-width:100%;min-width:0;margin:0!important;
    align-items:stretch;padding:2px 0 5px!important
  }
  .ek-f2-rail::-webkit-scrollbar{display:none}
  body[data-route="/"] .ek-f2-rail>.directory-item{
    display:flex!important;flex-direction:column;box-sizing:border-box;
    flex:0 0 calc(100% - 30px)!important;width:auto!important;min-width:0;
    scroll-snap-align:start;min-height:260px;
    border:1px solid var(--ek-line)!important;border-radius:16px!important;
    background:var(--ek-white,#fff)!important;
    padding:22px 22px 20px 28px!important
  }
  body[data-route="/"] .ek-f2-rail>.directory-item h3{
    margin:0 0 13px!important;
    font-size:clamp(19px,5vw,23px)!important;line-height:1.24!important
  }
  body[data-route="/"] .ek-f2-rail>.directory-item p{
    font-size:14px!important;line-height:1.48!important;margin:0 0 12px!important
  }
  body[data-route="/"] .ek-f2-rail>.directory-item p:last-child{
    margin-top:auto!important;margin-bottom:0!important
  }
  body[data-route="/"] .ek-f2-rail>.directory-item a{
    min-height:44px;display:inline-flex;align-items:center;
    white-space:normal;text-overflow:clip;overflow:visible
  }

  /* Photographic Problems cards: no line-clamp, text starts beyond the 30px peek. */
  body[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card{
    display:flex!important;flex-direction:column;justify-content:flex-end;
    flex:0 0 calc(100% - 30px)!important;box-sizing:border-box;
    width:auto!important;min-width:0!important;max-width:none!important;
    min-height:360px!important;height:auto!important;aspect-ratio:auto!important;
    scroll-snap-align:start;overflow:hidden
  }
  body[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-body{
    display:flex!important;flex-direction:column;box-sizing:border-box;
    width:100%;height:auto!important;min-width:0;
    margin-top:auto!important;padding:24px 22px 24px 36px!important;gap:10px
  }
  body[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-title{
    display:block!important;white-space:normal!important;overflow:visible!important;
    text-overflow:clip!important;font-size:clamp(19px,5vw,23px)!important;
    line-height:1.24!important
  }
  body[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-desc{
    display:block!important;overflow:visible!important;max-height:none!important;
    white-space:normal!important;-webkit-line-clamp:unset!important;
    font-size:13px!important;line-height:1.48!important
  }
  body[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-more{display:none!important}
  body[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-cta{
    white-space:normal!important
  }

  /* Four clear Osteopathy cards in one rail. */
  body[data-route="/osteopatia/"] .approved-techniques{
    margin:clamp(26px,6vw,42px) auto!important
  }
  body[data-route="/osteopatia/"] .approved-techniques .ek-f2-rail>.technique-card{
    display:flex!important;flex-direction:column;box-sizing:border-box;
    flex:0 0 calc(100% - 30px)!important;min-width:0!important;
    scroll-snap-align:start;border-radius:16px!important;
    min-height:315px;padding:22px 22px 20px 28px!important
  }
  body[data-route="/osteopatia/"] .approved-techniques .technique-card .approved-link{
    margin-top:auto!important;padding-top:16px!important
  }
  body[data-route="/osteopatia/"] .approved-techniques .technique-card a{
    min-height:44px;display:inline-flex;align-items:center
  }

  /* Two mobile shortcuts, both visible; never a two-item carousel. */
  body[data-route="/"] .ek-f2-home-shortcuts{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;margin:18px auto 32px;padding:0
  }
  body[data-route="/"] .ek-f2-home-shortcuts a{
    box-sizing:border-box;display:flex;flex-direction:column;
    justify-content:space-between;gap:12px;min-width:0;min-height:132px;
    padding:18px 16px;border:1px solid var(--ek-line);
    border-radius:16px;background:var(--ek-white,#fff);
    color:var(--ek-ink);text-decoration:none;
    font:500 clamp(14px,3.8vw,16px)/1.35 var(--ek-font-body,Inter,sans-serif)
  }
  body[data-route="/"] .ek-f2-home-shortcuts a>span:last-child{align-self:flex-end}
  body[data-route="/"] .ek-f2-home-shortcuts a:focus-visible,
  .ek-f2-dots button:focus-visible{outline:2px solid var(--ek-action,#303b32);outline-offset:3px}

  /* Reuse the existing .related-dots presentation from content-layout.css. */
  body.ek-integrated .related-dots.ek-f2-dots{margin:10px 0 14px}

}
@media(max-width:340px){
 body[data-route="/"] .ek-f2-home-shortcuts{grid-template-columns:1fr}
 body[data-route="/"] .ek-f2-home-shortcuts a{min-height:80px}
}


/* ATO-536: fix nested category rows squeezed by inherited 3-column grids on mobile.
   The screenshot showed each carousel confined to one grid track. Explicitly span
   the full area even if a parent grid rule survives the cascade. */
@media(max-width:700px){
  body.ek-integrated .ek-discovery-grid:has(>.ek-f2-group),
  body.ek-integrated .home-problems .directory:has(>.ek-f2-group){
    display:block!important;grid-template-columns:none!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
  }
  body.ek-integrated .ek-f2-group{
    display:block!important;grid-column:1/-1!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
  }
  body.ek-integrated .ek-f2-group>.ek-f2-rail,
  body.ek-integrated .approved-techniques>.ek-f2-rail{
    display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    grid-column:1/-1!important;
  }
  body.ek-integrated .ek-f2-rail>.ek-ed-card,
  body.ek-integrated .ek-f2-rail>.directory-item,
  body.ek-integrated .ek-f2-rail>.technique-card{
    flex:0 0 calc(100% - 30px)!important;width:calc(100% - 30px)!important;
    min-width:0!important;max-width:none!important;
  }

}

/* ATO-536 Home: the existing two goal links, immediately after the hero,
   become compact cards only on mobile. Desktop keeps original line links. */
@media(max-width:700px){
 body[data-route="/"] main.ek-home>.goal-paths,
 body[data-route="/"] main[data-family="home"]>.goal-paths{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;width:calc(100% - 32px)!important;max-width:100%!important;
  margin:14px auto 26px!important;padding:0!important;border:0!important
 }
 body[data-route="/"] main>.goal-paths>a{
  display:flex!important;flex-direction:column!important;justify-content:space-between!important;
  gap:14px!important;min-width:0!important;min-height:124px!important;
  box-sizing:border-box!important;padding:18px 16px!important;
  background:var(--ek-white,#fff)!important;border:1px solid var(--ek-line)!important;
  border-radius:16px!important;color:var(--ek-ink)!important;text-decoration:none!important;
  font:500 clamp(14px,3.8vw,16px)/1.35 var(--ek-font-body,Inter,sans-serif)!important
 }
 body[data-route="/"] main>.goal-paths>a svg{align-self:flex-end!important}
}
@media(max-width:340px){body[data-route="/"] main>.goal-paths{grid-template-columns:1fr!important}}
