/* ATO-539 · User-authorized compact desktop cards, search sidebar, legal menu.
   This sheet is generated ONLY for the isolated Cloudflare preview. */

/* Legal information: same 12px typography as footer, narrower and quieter.
   Preserve 44px touch target on every link and on the legal trigger. */
.ek-footer .ek-legal-context nav {
  width:184px!important;
  max-width:min(184px,calc(100vw - 32px))!important;
  padding:6px!important;
  border-radius:14px!important;
}
.ek-footer .ek-legal-context nav a {
  font-size:12px!important;
  line-height:1.45!important;
  font-weight:400!important;
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  box-sizing:border-box!important;
  padding:6px 9px!important;
}
.ek-footer .ek-legal-context summary {min-width:44px!important;min-height:44px!important}

/* DESKTOP: same native rail and related-dots logic already in F2.
   Two entire cards are visible, third is the second (last) scroll position.
   Mobile F2 is intentionally untouched. */
@media(min-width:901px){
  body.ek-integrated[data-route="/problemas/"] .ek-problem-discovery .ek-discovery-grid,
  body.ek-integrated[data-route="/"] .home-problems .directory {
    display:block!important;
    grid-template-columns:none!important;
    width:100%!important;
    min-width:0!important;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-group,
  body.ek-integrated[data-route="/"] .ek-f2-group{
    display:block!important;
    grid-column:auto!important;
    width:100%!important;
    margin:0 0 clamp(22px,3vw,38px)!important;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-group-title,
  body.ek-integrated[data-route="/"] .ek-f2-group-title{
    display:block!important;
    font:500 clamp(17px,1.5vw,20px)/1.3 var(--ek-font-body,Inter,sans-serif)!important;
    margin:0 0 16px!important;
    color:inherit!important;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-group>.ek-f2-rail,
  body.ek-integrated[data-route="/"] .ek-f2-group>.ek-f2-rail{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:16px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory!important;
    scrollbar-width:none;
    width:100%!important;
    min-width:0!important;
    padding:0 0 3px!important;
    margin:0!important;
    align-items:stretch!important;
  }
  body.ek-integrated .ek-f2-group>.ek-f2-rail::-webkit-scrollbar{display:none}
  body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card{
    flex:0 0 calc((100% - 16px)/2)!important;
    width:calc((100% - 16px)/2)!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:300px!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    scroll-snap-align:start;
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-end!important;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-body{
    min-width:0!important;
    padding:20px 24px 22px!important;
    height:auto!important;
    overflow:visible!important;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-title{
    font-size:clamp(21px,2.1vw,27px)!important;
    line-height:1.18!important;
    overflow:visible!important;
    white-space:normal!important;
    text-overflow:clip!important;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-desc{
    font-size:13px!important;line-height:1.42!important;
    max-height:none!important;overflow:visible!important;
    white-space:normal!important;-webkit-line-clamp:unset!important;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-more{display:none!important}
  body.ek-integrated[data-route="/"] .ek-f2-rail>.directory-item{
    flex:0 0 calc((100% - 16px)/2)!important;
    width:calc((100% - 16px)/2)!important;
    min-width:0!important;max-width:none!important;
    box-sizing:border-box!important;scroll-snap-align:start;
    min-height:230px!important;
    padding:25px 28px!important;
    display:flex!important;flex-direction:column;
  }
  body.ek-integrated[data-route="/"] .ek-f2-rail>.directory-item p:last-child{margin-top:auto!important}
  /* This shares the already-approved Te puede interesar dot shape. */
  body.ek-integrated[data-route="/problemas/"] .ek-f2-dots,
  body.ek-integrated[data-route="/"] .ek-f2-dots{
    display:flex!important;
    justify-content:center!important;
    gap:9px!important;
    margin:13px auto 0!important;
    min-height:24px;
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-dots button,
  body.ek-integrated[data-route="/"] .ek-f2-dots button {
    width:7px!important;height:7px!important;min-width:7px!important;
    min-height:7px!important;border-radius:50%!important;
    border:0!important;padding:0!important;
    background:#b4b8ab;
    cursor:pointer;
  }
  body.ek-integrated .ek-f2-dots button[aria-current="true"]{
    background:var(--ek-ink,#303b32)!important;
    transform:scale(1.15);
  }
  body.ek-integrated[data-route="/problemas/"] .ek-f2-dots button[aria-current="true"]{
    background:var(--ek-catalogue-ink,#eee)!important;
  }
  /* Search results are the same live search DOM and links, moved alongside. */
  body.ek-integrated[data-route="/problemas/"] .hub-search{width:min(1120px,100%)!important}
  body.ek-integrated[data-route="/problemas/"] .hub-search .symptom-search{
    display:grid!important;
    grid-template-columns:minmax(270px,2fr) minmax(0,3fr)!important;
    grid-template-rows:auto 1fr;
    grid-template-areas:"form results" "chips results";
    column-gap:clamp(24px,3vw,44px);
    align-items:start;
    max-width:100%!important;
    padding-top:24px!important;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .symptom-form{
    grid-area:form;min-width:0;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .symptom-chips{
    grid-area:chips;align-self:start;min-width:0;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar{
    grid-area:results;
    min-width:0;max-width:100%;
    max-height:580px;overflow-y:auto;overscroll-behavior:contain;
    border:1px solid #ffffff26;
    border-radius:16px;
    background:#ffffff0b;
    padding:12px 14px 16px;
    box-sizing:border-box;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar[hidden]{display:none!important}
  body.ek-integrated[data-route="/problemas/"] .hub-search .symptom-search:not(:has(.ek-f5-search-sidebar:not([hidden]))){
    grid-template-columns:1fr!important;
    grid-template-areas:"form" "chips";
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar .symptom-status{
    display:block;min-height:16px;margin:0 0 12px!important;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar .symptom-results{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    margin:0!important;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar .symptom-results[hidden]{display:none!important}
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar .search-hit a{
    padding:13px!important;min-height:100%;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar .symptom-result{
    padding:0!important;
  }
}
@media(min-width:901px) and (max-width:1119px){
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar .symptom-results{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:900px){
  /* Inline results, no sideways panel on tablets/mobile. */
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar{
    display:block;min-width:0;width:100%;margin-top:16px;
  }
  body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar[hidden]{
    display:none!important;
  }
}

/* ATO-539 · Photo card parity: same compact overlay as "Te puede interesar".
   Zero reserved description gap. The copy always stays in the DOM for SEO. */
@media(min-width:901px){
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card,
 body.ek-unified[data-route="/problemas/"] main.ek-problem-hub .related>ul>li>a{
   height:300px!important;min-height:300px!important;max-height:300px!important;
   aspect-ratio:auto!important;position:relative!important;overflow:hidden!important;
   border-radius:18px!important;isolation:isolate;
 }
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-body,
 body.ek-unified[data-route="/problemas/"] main.ek-problem-hub .related .related-text{
   position:absolute!important;left:12px!important;right:12px!important;bottom:12px!important;
   width:auto!important;height:auto!important;min-height:0!important;
   padding:17px 19px!important;gap:8px!important;
   display:flex!important;flex-direction:column!important;justify-content:flex-end!important;
   background:rgba(29,39,35,.88)!important;border-radius:14px!important;
   box-sizing:border-box!important;
 }
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-desc{
   display:block!important;
   opacity:0!important;visibility:hidden!important;max-height:0!important;
   margin:0!important;overflow:hidden!important;
   -webkit-line-clamp:unset!important;white-space:normal!important;
   transition:opacity .2s ease,max-height .2s ease,visibility .2s!important;
 }
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card:is(:hover,:focus-within) .ek-ed-card-desc{
   opacity:1!important;visibility:visible!important;max-height:15em!important;
   margin-top:6px!important;
 }
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-title{
   margin:0!important;min-height:0!important;
 }
 /* The existing related cards already have this exact reveal behavior.
    Keep their description collapsed too and match height with hub cards. */
 body.ek-unified[data-route="/problemas/"] main.ek-problem-hub .related>ul>li>a:is(:hover,:focus-visible) .related-text{max-height:calc(100% - 24px)}
}
@media(max-width:900px){
 /* Touch users cannot hover. Keep a compact legible caption with real text. */
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card{
   min-height:290px!important;height:clamp(290px,76vw,370px)!important;
   max-height:none!important;
 }
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-body{
   padding:14px 17px!important;gap:7px!important;
   border-radius:14px!important;
 }
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-desc{
   display:-webkit-box!important;-webkit-box-orient:vertical!important;
   -webkit-line-clamp:3!important;line-clamp:3!important;
   overflow:hidden!important;max-height:4.6em!important;
   opacity:1!important;visibility:visible!important;
   font-size:13px!important;line-height:1.45!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.ek-integrated[data-route="/problemas/"] .ek-f2-rail>.ek-ed-card .ek-ed-card-desc{transition:none!important}
}

/* ATO-539 · Real search drawer, same graphite language as About reader.
   No sidebar in the grid and no automatic opening while typing. */
body.ek-integrated[data-route="/problemas/"] .hub-search .symptom-search{
 display:block!important;grid-template-columns:none!important;
 grid-template-areas:none!important;max-width:740px!important;margin-inline:auto!important;
 padding-top:24px!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .symptom-search .symptom-chips{
 margin-top:20px!important;
}
html.ek-search-drawer-open,html.ek-search-drawer-open body{
 overflow:hidden!important;overscroll-behavior:none!important;
}
.ek-search-drawer-scrim[hidden]{display:none!important}
.ek-search-drawer-scrim{
 position:fixed!important;inset:0!important;z-index:169!important;
 background:rgba(12,20,17,.52)!important;
 backdrop-filter:blur(5px);
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar.ek-search-drawer{
 position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;
 display:flex!important;flex-direction:column!important;
 width:min(690px,calc(100vw - 24px))!important;height:100dvh!important;
 max-height:100dvh!important;max-width:100%!important;
 margin:0!important;padding:0!important;box-sizing:border-box!important;
 z-index:170!important;
 border:0!important;border-left:1px solid #d5e1d233!important;
 border-radius:0!important;
 background:#26332d!important;color:#f4f0e7!important;
 box-shadow:-18px 0 44px #0a151025!important;
 overflow:hidden!important;overscroll-behavior:contain!important;
 transform:translate3d(101%,0,0);
 transition:transform .22s cubic-bezier(.2,.7,.25,1);
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar.ek-search-drawer[hidden]{
 display:none!important
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar.ek-search-drawer.is-open{
 transform:translate3d(0,0,0)!important
}
.ek-search-drawer-head{
 flex:none;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;
 padding:clamp(24px,4vw,40px) clamp(20px,3vw,36px) 20px;
 border-bottom:1px solid #ffffff26;
}
.ek-search-drawer-eyebrow{
 font-size:11px!important;letter-spacing:.06em!important;
 margin:0 0 10px!important;color:#c9cec2!important;
}
.ek-search-drawer-head h2{
 font:400 clamp(26px,3vw,36px)/1.2 Georgia,serif!important;
 margin:0 0 8px!important;color:#f4f0e7!important;
}
.ek-search-drawer-head .symptom-status{
 margin:0!important;color:#c9cec2!important;
 font-size:13px!important;line-height:1.4!important;
}
.ek-search-drawer-close{
 flex:none;display:grid;place-items:center;
 min-width:44px;min-height:44px;border-radius:50%;
 border:1px solid #ffffff66;background:#ffffff12;color:#f4f0e7;
 cursor:pointer;
}
.ek-search-drawer-close:focus-visible{outline:2px solid #fff;outline-offset:2px}
.ek-search-drawer-body{
 flex:1;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;
 -webkit-overflow-scrolling:touch;
 padding:24px clamp(18px,3vw,34px) calc(32px + env(safe-area-inset-bottom,0));
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:12px!important;margin:0!important;max-width:none!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results[hidden]{
 display:none!important
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-result{
 min-width:0!important;overflow-wrap:anywhere;
}
@media(max-width:700px){
 body.ek-integrated[data-route="/problemas/"] .hub-search .symptom-search{
   max-width:100%!important;padding-top:20px!important
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar.ek-search-drawer{
   left:0!important;right:0!important;top:auto!important;bottom:0!important;
   width:100%!important;height:min(88dvh,780px)!important;max-height:88dvh!important;
   border:0!important;border-top:1px solid #ffffff33!important;
   border-radius:22px 22px 0 0!important;
   transform:translate3d(0,101%,0);
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar.ek-search-drawer.is-open{
   transform:translate3d(0,0,0)!important
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results{
   grid-template-columns:minmax(0,1fr)!important;gap:10px!important
 }
 .ek-search-drawer-head{padding:20px 18px 16px}
 .ek-search-drawer-body{padding:18px 16px calc(20px + env(safe-area-inset-bottom,0))}
 .ek-search-drawer-head h2{font-size:26px!important}
}
@media(prefers-reduced-motion:reduce){
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-f5-search-sidebar.ek-search-drawer{
   transition:none!important
 }
}

/* Same photo/title/short-description model on mobile, without hover.
   Related content is not hidden for touch users on this hub. */
@media(max-width:700px){
 body.ek-unified[data-route="/problemas/"] main.ek-problem-hub .related>ul>li>a{
  height:clamp(290px,76vw,370px)!important;min-height:290px!important;
  aspect-ratio:auto!important;overflow:hidden!important;
 }
 body.ek-unified[data-route="/problemas/"] main.ek-problem-hub .related .related-text{
  left:12px!important;right:12px!important;bottom:12px!important;
  padding:14px 17px!important;
 }
 body.ek-unified[data-route="/problemas/"] main.ek-problem-hub .related .related-text>span:not(.related-label):not(.related-action):not(.related-cta){
  display:-webkit-box!important;visibility:visible!important;opacity:1!important;
  max-height:4.6em!important;overflow:hidden!important;
  -webkit-line-clamp:3!important;line-clamp:3!important;
  -webkit-box-orient:vertical!important;
  line-height:1.45!important;
 }
}
