/* The same portrait cards form one accessible, horizontally scrolling row. */
.teachers-carousel{--teacher-card-width:clamp(320px,29.4vw,500px);--teacher-gap:28px}
.teachers-carousel .proud-gallery{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:16px;
  overscroll-behavior-x:contain;
  scroll-behavior:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--deep) var(--sage);
}
.teachers-carousel .proud-gallery::-webkit-scrollbar{height:8px}
.teachers-carousel .proud-gallery::-webkit-scrollbar-track{background:var(--sage)}
.teachers-carousel .proud-gallery::-webkit-scrollbar-thumb{background:var(--deep);border-radius:8px}
.teachers-carousel .proud-gallery:focus-visible{outline:3px solid var(--deep);outline-offset:3px}
.teachers-carousel .proud-gallery-track{display:flex;width:max-content;align-items:stretch}
.teachers-carousel.gallery-ready .proud-gallery-track{animation:teacher-gallery-drift 150s linear infinite;will-change:transform}
/* One guard group on either side keeps native touch scrolling away from an edge. */
@keyframes teacher-gallery-drift{from{transform:translateX(calc(-100% / 3))}to{transform:translateX(calc(-200% / 3))}}
.teachers-carousel.gallery-ready.is-manual .proud-gallery-track{animation:none;transform:none;will-change:auto}
.teachers-carousel .teachers-grid{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:var(--teacher-card-width);
  grid-template-columns:none;
  grid-template-rows:repeat(5,auto);
  column-gap:var(--teacher-gap);
  row-gap:0;
  flex-shrink:0;
  min-width:100vw;
  justify-content:space-between;
  padding-right:var(--teacher-gap);
  align-items:stretch;
}
.teachers-carousel .proud-gallery .teacher-card{display:grid;grid-row:span 5;grid-template-rows:subgrid;row-gap:0}
.teachers-carousel .proud-gallery .teacher-card .teacher-content{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}
.teachers-carousel .proud-gallery .teacher-photo{align-self:start;aspect-ratio:4/5}
.teachers-carousel .proud-gallery .teacher-content h3{margin-bottom:18px}
.teachers-carousel .proud-gallery .teacher-intro{font-weight:600;margin-bottom:20px}
.teachers-carousel .proud-gallery .teacher-achievements{margin-bottom:24px}
.teachers-carousel .proud-gallery .teacher-direction{margin-top:0}
.teacher-photo--placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:var(--sage);color:#566d46}
.teacher-photo--placeholder svg{width:35%;height:auto;opacity:.7}
.teacher-photo--placeholder span{font-size:18px}
@media(max-width:700px){
  .teachers-carousel{--teacher-card-width:min(84vw,360px);--teacher-gap:18px}
}
@media(prefers-reduced-motion:reduce){
  .teachers-carousel.gallery-ready .proud-gallery-track{animation:none;will-change:auto}
  .teachers-carousel .proud-gallery-group[aria-hidden]{display:none}
}

.teachers-carousel > .teacher-card--founder{margin-bottom:32px}
@media(max-width:700px){.teachers-carousel > .teacher-card--founder{margin-bottom:24px}}

/* Align portrait crowns at approximately 7% of the shared photo frame. */
.teachers-carousel .teacher-photo--valentin img{object-position:54% 41%}
.teachers-carousel .teacher-photo--evgenia img{object-position:center bottom}
.teachers-carousel .teacher-photo--regina img{object-position:center bottom;transform:scale(1.02);transform-origin:center bottom}
