/* ALSU / expert profiles: accessible mobile navigation for buyers */
.expert-header{isolation:isolate}
.expert-nav-toggle{display:none;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:44px;height:44px;flex:0 0 44px;background:transparent;border:1px solid #d5e1d9;border-radius:8px;color:#0e2d24}
.expert-nav-toggle span{width:17px;height:2px;border-radius:2px;background:currentColor;display:block;transition:transform .2s,opacity .2s}
.expert-nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.expert-nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.expert-nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.expert-nav-toggle:focus-visible{outline:3px solid #6c3be8;outline-offset:3px}
@media(max-width:1050px){.expert-nav-toggle{display:flex;order:3}.expert-header{position:sticky}.expert-header nav{display:none!important;position:absolute;top:calc(100% - 1px);left:20px;right:20px;flex-direction:column;align-items:stretch;gap:0;padding:10px 16px;background:#f8faf8;border:1px solid #d5e1d9;border-radius:0 0 15px 15px;box-shadow:0 20px 40px #0e2d2426}.expert-header nav.is-open{display:flex!important}.expert-header nav a{display:block;padding:15px 5px;border-bottom:1px solid #e0e9e3;font-size:.92rem}.expert-header nav a:last-child{border-bottom:0}}
@media(max-width:760px){.expert-header>.button{order:2}.expert-nav-toggle{width:42px;height:42px;flex-basis:42px}.booking-grid label{font-size:.82rem}}
@media(max-width:420px){.expert-header{gap:8px}.expert-header .brand img{width:98px}.expert-header>.button{width:43px;height:43px}.expert-nav-toggle{width:42px;flex-basis:42px}}
@media(prefers-reduced-motion:reduce){.expert-nav-toggle span{transition:none}}

/* The optimized profile portrait lives in a picture wrapper. */
.portrait-frame>picture{display:block;width:100%;height:100%}
.portrait-frame>picture>img{display:block;width:100%;height:100%;object-fit:cover}

/* Phase 2: explicit keyboard focus and sufficient mobile tap area. */
.expert-header nav a{display:inline-flex;align-items:center;min-height:44px}
.expert-nav-toggle{min-height:44px;min-width:44px}
.expert-page a:focus-visible,.expert-page button:focus-visible,.expert-page select:focus-visible,.expert-page input:focus-visible{outline:3px solid #6c3be8;outline-offset:3px}
@media(max-width:1050px){.expert-header nav a{display:flex;min-height:44px}}

/* Cross-device audit: the previous mobile button was narrower than its label,
   wrapping white text beyond the green surface on iPhone. */
.expert-header>.button.expert-header-booking{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;min-width:44px;width:auto;max-width:none;
  min-height:44px;white-space:nowrap;line-height:1.15;
  padding:10px 14px;font-size:.78rem;gap:7px;
}
.expert-header-booking-mobile{display:none}
.expert-header-booking-desktop{display:inline}
.expert-header-booking-arrow{display:inline;font-size:.9rem}
.video-external-link{
  display:inline-flex;align-items:center;min-height:44px;
  margin-top:12px;color:#e4fff0;text-decoration:underline;
  text-decoration-color:#b9e6ce;text-underline-offset:5px;
  font-size:.83rem;font-weight:650;
}
.video-external-link:focus-visible{outline:3px solid #c9b4ff;outline-offset:3px}
.video-dialog-content .source-link{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:760px){
 .expert-header>.button.expert-header-booking{
   order:2;width:auto;min-width:92px;max-width:none;
   height:44px;min-height:44px;padding:10px 12px;
   border-radius:7px;font-size:.82rem;gap:6px;
 }
 .expert-header-booking-desktop{display:none}
 .expert-header-booking-mobile{display:inline}
 .expert-header .brand img{max-width:110px;height:auto}
 .video-external-link{min-height:46px}
 .profile-dialog{padding:26px 18px;width:calc(100% - 20px);max-height:92dvh}
 .profile-dialog .dialog-close{width:44px;height:44px}
 .video-frame{width:100%;aspect-ratio:16/9}
 .video-dialog-content .source-link{font-size:.85rem}
}
@media(max-width:420px){
 .expert-header>.button.expert-header-booking{
   flex:0 0 auto;min-width:88px;width:auto;height:44px;
   padding:9px 11px;font-size:.8rem;white-space:nowrap;
   border-radius:7px;
 }
 .expert-header>.button.expert-header-booking .expert-header-booking-arrow{font-size:.85rem}
 .expert-header .brand img{width:96px}
 .expert-header .expert-nav-toggle{width:42px;min-width:42px;flex-basis:42px}
}
@media(max-width:350px){
 .expert-header{gap:6px;padding-inline:12px}
 .expert-header>.button.expert-header-booking{min-width:78px;padding-inline:8px}
}

/* Speaker video actions — avoid an adjacent 2nd CTA on narrow Safari screens.
   Applied equally to the published profiles and the future-profile template. */
.video-feature .video-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  column-gap:24px;
  row-gap:12px;
  margin-top:8px;
}
.video-feature .video-actions>.button.light{
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:48px;
  white-space:normal;
}
.video-feature .video-actions>.video-external-link{
  margin-top:0;
  min-height:48px;
  line-height:1.45;
}
@media(max-width:760px){
  .video-feature .video-layout{row-gap:34px}
  .video-feature .video-actions{
    flex-direction:column;
    align-items:stretch;
    gap:15px;
    margin-top:12px;
  }
  .video-feature .video-actions>.button.light{
    width:100%;
    max-width:360px;
    min-height:58px;
    padding:15px 20px;
    border-radius:5px 20px 5px 5px;
    font-size:clamp(.88rem,3.7vw,1rem);
    line-height:1.4;
  }
  .video-feature .video-actions>.video-external-link{
    width:fit-content;
    max-width:100%;
    min-height:44px;
    padding:7px 0;
    font-size:.86rem;
    line-height:1.5;
  }
  .video-feature .video-poster{margin-top:0}
}
@media(max-width:360px){
  .video-feature .video-actions>.button.light{padding-inline:15px;gap:10px}
}

/* Phase 3.1: self-hosted MP4 playback inside ALSU; native iOS / desktop controls. */
.video-frame video {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#050807;
}
.video-frame .video-playback-error{
  color:#fff;
  font-size:.95rem;
  line-height:1.55;
  text-align:center;
  padding:18px;
}
.video-feature .video-external-link[hidden],
.video-dialog-content .source-link[hidden] {
  display:none!important;
}

/* Authorized photographs: true-to-source editorial grid below the speaker video. */
.speaker-gallery{margin-top:clamp(48px,7vw,90px);border-top:1px solid #d8e2dd;padding-top:clamp(28px,4vw,48px)}
.speaker-gallery-heading{display:flex;justify-content:space-between;align-items:end;gap:25px;margin-bottom:25px}
.speaker-gallery-heading h3{font-size:clamp(1.65rem,3.8vw,3.25rem);letter-spacing:-.05em;line-height:1.1;margin:8px 0 12px}
.speaker-gallery-heading p:not(.profile-eyebrow){color:#516b5e;line-height:1.65;max-width:550px}
.speaker-gallery-heading>span{white-space:nowrap;font-size:.78rem;color:#516b5e}
.speaker-gallery-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:13px}
.speaker-gallery-item{min-width:0;grid-column:span 2;position:relative;overflow:hidden;display:block;cursor:zoom-in;border:0;padding:0;background:#112d23;color:#fff;text-align:left;aspect-ratio:1.35;border-radius:3px 24px 3px 3px;isolation:isolate}
.speaker-gallery-item:nth-child(1),.speaker-gallery-item:nth-child(2){grid-column:span 3;aspect-ratio:1.7}
.speaker-gallery-item img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center;transition:transform .4s ease}
.speaker-gallery-item:hover img{transform:scale(1.035)}
.speaker-gallery-item:after{content:'';position:absolute;inset:45% 0 0;background:linear-gradient(transparent,rgba(5,25,18,.85))}
.speaker-gallery-caption{position:absolute;z-index:1;left:0;right:0;bottom:0;padding:14px 17px;display:flex;align-items:flex-end;gap:11px;font-size:.72rem}
.speaker-gallery-caption strong{flex:1;font-size:.82rem;line-height:1.32}
.speaker-gallery-caption span:first-child{opacity:.78;white-space:nowrap}
.speaker-gallery-caption span:last-child{font-size:1.25rem;color:#c0abff}
.speaker-gallery-item:focus-visible{outline:4px solid #6c3be8;outline-offset:4px}
.speaker-gallery-dialog{position:fixed;inset:0;margin:auto;border:0;background:#10251d;color:#fff;width:min(1000px,calc(100vw - 24px));max-width:none;max-height:min(96dvh,930px);border-radius:7px 27px 7px 7px;overflow-y:auto;padding:55px 25px 25px;box-shadow:0 24px 90px #0008}
.speaker-gallery-dialog::backdrop{background:rgba(5,17,12,.92)}
.speaker-gallery-dialog-body{display:flex;flex-direction:column;gap:17px;align-items:center}
.speaker-gallery-dialog img{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain;border-radius:4px}
.speaker-gallery-dialog #speaker-gallery-caption{text-align:center;font-size:.95rem;line-height:1.5}
.speaker-gallery-close{position:absolute;right:14px;top:10px;border:1px solid #ffffff60;background:transparent;color:#fff;width:44px;height:44px;font-size:1.8rem;line-height:1;border-radius:50%;cursor:pointer}
.speaker-gallery-dialog-controls{display:flex;align-items:center;justify-content:center;gap:25px}
.speaker-gallery-dialog-controls button{width:46px;height:46px;border:1px solid #ffffff75;color:#fff;background:transparent;border-radius:50%;font-size:1.2rem;cursor:pointer}
.speaker-gallery-dialog-controls [data-gallery-counter]{font-size:.85rem;letter-spacing:.1em;font-variant-numeric:tabular-nums}
.speaker-gallery-dialog button:focus-visible{outline:3px solid #c9b4ff;outline-offset:3px}
@media(max-width:760px){
 .speaker-gallery{margin-top:40px;padding-top:28px}
 .speaker-gallery-heading{display:block;margin-bottom:20px}
 .speaker-gallery-heading>span{display:block;margin-top:12px;white-space:normal}
 .speaker-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
 .speaker-gallery-item,.speaker-gallery-item:nth-child(1),.speaker-gallery-item:nth-child(2){grid-column:span 1;aspect-ratio:.9;border-radius:3px 15px 3px 3px}
 .speaker-gallery-item:first-child{grid-column:span 2;aspect-ratio:1.65}
 .speaker-gallery-caption{gap:5px;padding:11px;font-size:.65rem}
 .speaker-gallery-caption strong{font-size:.73rem}
 .speaker-gallery-dialog{width:calc(100vw - 14px);max-height:95dvh;padding:60px 12px 16px}
 .speaker-gallery-dialog img{max-height:65dvh}
}
@media(prefers-reduced-motion:reduce){.speaker-gallery-item img{transition:none}.speaker-gallery-item:hover img{transform:none}}

/* Gallery is nested in the dark-green video section. Respect contrast and preserve
   the panoramic evidence of actual stage/audience events on narrow screens. */
.video-feature .speaker-gallery{border-top-color:rgba(255,255,255,.27)}
.video-feature .speaker-gallery-heading h3{color:#fff}
.video-feature .speaker-gallery-heading p:not(.profile-eyebrow){color:#daeee4}
.video-feature .speaker-gallery-heading>span{color:#cce3d6}
.video-feature .speaker-gallery-heading .profile-eyebrow{color:#b6e9c8}
@media(max-width:760px){
 .video-feature .speaker-gallery-grid{
   display:grid;
   grid-auto-flow:column;
   grid-auto-columns:minmax(82%,1fr);
   grid-template-columns:none;
   overflow-x:auto;
   overscroll-behavior-inline:contain;
   scroll-snap-type:x mandatory;
   scrollbar-width:none;
   padding:4px 4px 15px;
 }
 .video-feature .speaker-gallery-grid::-webkit-scrollbar{display:none}
 .video-feature .speaker-gallery-item,
 .video-feature .speaker-gallery-item:nth-child(1),
 .video-feature .speaker-gallery-item:nth-child(2){
   grid-column:auto;
   aspect-ratio:1.65;
   scroll-snap-align:start;
 }
}

/* The file-backed Neried profile must never flash obsolete YouTube links before JS boots. */
body[data-expert-slug="neried-echeverry-prada"] .video-actions .video-external-link,
body[data-expert-slug="neried-echeverry-prada"] .video-dialog-content .source-link{display:none!important}

/* A verifiable book reference belongs beside the published ISBN, not an unpublished manuscript. */
.credentials-grid .publication-source,.credentials-dialog .publication-source{
  display:inline-flex;align-items:center;min-height:42px;
  margin-left:7px;color:#0e7b48;text-decoration:underline;
  text-underline-offset:4px;text-decoration-thickness:1.5px;font-weight:700;
}
.credentials-grid .publication-source:focus-visible,
.credentials-dialog .publication-source:focus-visible{
  outline:3px solid #7540c4;outline-offset:4px;border-radius:2px;
}
@media(max-width:760px){
 .credentials-grid .publication-source,
 .credentials-dialog .publication-source{display:flex;margin:8px 0 0;width:fit-content;}
}

/* Standalone photo gallery: rendered only if one or more verified photos exist. */
.speaker-gallery-section{padding-block:clamp(38px,5vw,74px)}
.speaker-gallery-section .speaker-gallery{margin-top:0;padding-top:clamp(28px,3vw,42px)}
.speaker-gallery-heading h2{font-size:clamp(1.65rem,3.8vw,3.25rem);letter-spacing:-.05em;line-height:1.1;margin:8px 0 12px}
.speaker-gallery-section .speaker-gallery-heading h2{color:var(--expert-personal-dark,#0e2d24)}
@media(max-width:760px){.speaker-gallery-section{padding-block:36px}.speaker-gallery-heading h2{font-size:clamp(1.7rem,7vw,2.35rem)}}
