/* Only the teacher cards are copied from the reference. */
.teacher-grid{--text:Manrope,Segoe UI,system-ui,sans-serif;font-family:var(--text)}
/* Stage portraits: one photograph fills the entire card. */
.teacher-grid{gap:24px}
.teacher-grid .teacher-profile{--ink:#fffaf4;--ink-rgb:255,250,244;--ink-dim:rgba(255,250,244,.86);--ink-faint:rgba(255,250,244,.64);position:relative;isolation:isolate;display:flex;flex-direction:column;gap:0;align-items:stretch;min-width:0;min-height:800px;padding:0;overflow:hidden;border:1px solid rgba(255,250,244,.15);border-radius:12px;background:#090a0c;color:var(--ink);box-shadow:none}
.teacher-grid .teacher-profile[hidden]{display:none}
.teacher-grid .teacher-profile.teacher-filter-exit{position:fixed;z-index:2;min-height:0;pointer-events:none}
.glow-on .teacher-grid .teacher-profile::after,.teacher-grid .teacher-profile::after{display:none}
.teacher-grid .teacher-profile:hover{transform:none;box-shadow:none;border-color:var(--accent)}
.teacher-profile .teacher-photo{position:absolute;inset:0;z-index:-1;width:100%;height:100%;margin:0;border-radius:0;aspect-ratio:auto;overflow:hidden;background:#141416}
.teacher-profile .teacher-photo img{width:100%;height:78%;object-fit:cover;object-position:50% 24%;transition:transform .7s ease}
.teacher-profile .teacher-photo::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,transparent 0%,transparent 34%,rgba(6,7,8,.25) 48%,rgba(6,7,8,.9) 66%,#08090a 80%)}
.teacher-profile .teacher-info{position:relative;z-index:1;display:flex;flex-direction:column;gap:24px;margin-top:auto;padding:30px;background:none;border:0}
.teacher-profile h2{position:static;margin:0 0 4px;color:#fffaf4;font-family:var(--text);text-transform:none;line-height:1.08;letter-spacing:-.025em}
.teacher-first-name{display:block;font-size:25px;font-weight:400;margin-bottom:8px}
.teacher-last-name{display:block;font-size:46px;font-weight:800;text-transform:uppercase;letter-spacing:-.04em}
.teacher-meta-label{display:block;margin-bottom:10px;font-size:11px;font-weight:600;line-height:1.4;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint)}
.teacher-specialties{display:flex;align-items:center;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0;font-size:17px;font-weight:650;line-height:1.4;letter-spacing:-.015em;color:var(--ink)}
.teacher-specialties li{display:flex;align-items:center;gap:8px;margin:0;padding:4px 12px 4px 6px;border:1px solid rgba(255,250,244,.15);border-radius:999px;background:rgba(13,14,15,.72);white-space:nowrap}
.teacher-specialties .dir-icon{width:34px;height:34px;align-self:center}
.teacher-location-group{padding-top:16px;border-top:1px solid rgba(255,250,244,.16)}
.teacher-locations{display:flex;gap:10px 16px;flex-wrap:wrap;align-items:center;min-height:22px}
.teacher-campus{display:inline-flex;align-items:center;gap:8px;padding:0;border:0;border-radius:0;background:none;color:var(--ink-dim);font-size:14px;font-weight:500;line-height:1.45;white-space:nowrap}
.teacher-campus i{width:16px;height:20px;flex:none;background:var(--accent);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a8 8 0 0 0-8 8c0 6 8 12 8 12s8-6 8-12a8 8 0 0 0-8-8zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E") center/contain no-repeat}
.teacher-campus--otradnoe{--campus-dot:#69cd98}
.teacher-campus--butovo{--campus-dot:#71b4ed}
.teacher-profile .teacher-book{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:13px 21px;border:1px solid var(--accent);border-radius:999px;background:rgba(6,7,8,.5);color:var(--ink);text-decoration:none;font-size:16px;font-weight:700;line-height:1.4;transition:background .25s,color .25s}
.teacher-profile .teacher-book:hover{background:var(--accent);color:var(--on-accent)}
.teacher-bio{border-top:1px solid rgba(255,250,244,.16);color:var(--ink-dim);overflow-wrap:anywhere}
.teacher-bio summary{min-height:44px;padding-block:12px;cursor:pointer;font-size:14px;font-weight:700;color:var(--ink)}
.teacher-bio p{margin:0 0 10px;font-size:14px;line-height:1.55}
.teacher-bio p:last-child{margin-bottom:0}
.teacher-book-arrow{display:flex;align-items:center;justify-content:center;flex:none;transition:transform .25s}
.teacher-book svg{width:24px;height:24px}
.teacher-book:hover .teacher-book-arrow{transform:translateX(3px)}
.teacher-book:focus-visible{outline:2px solid #fff;outline-offset:4px}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){.teacher-profile:hover .teacher-photo img{transform:scale(1.025)}}
@media(max-width:900px){.teacher-profile .teacher-info{padding:26px}}
@media(max-width:700px){

.teacher-grid{gap:20px}.teacher-grid .teacher-profile{min-height:730px;border-radius:12px}
.teacher-profile .teacher-info{padding:22px;gap:18px}.teacher-first-name{font-size:22px}.teacher-last-name{font-size:36px}.teacher-specialties{font-size:16px;gap:8px}.teacher-specialties .dir-icon{width:34px;height:34px}.teacher-campus{font-size:13px}.teacher-locations{gap:10px 16px}.teacher-profile .teacher-book{font-size:14px;padding-inline:18px;min-height:50px}}
@media(max-width:360px){.teacher-profile .teacher-info{padding:18px;gap:16px}.teacher-last-name{font-size:31px}.teacher-specialties{font-size:14px}.teacher-specialties .dir-icon{width:30px;height:30px}}
@media(prefers-reduced-motion:reduce){.teacher-grid .teacher-profile,.teacher-profile .teacher-photo img,.teacher-book,.teacher-book-arrow{transition:none!important;animation:none!important}.teacher-profile:hover .teacher-photo img{transform:none}}

/* Fine studio contours echo the reference without covering the portrait. */
.teacher-profile .teacher-info::before{content:"";position:absolute;z-index:-1;right:-1px;top:65px;width:48%;height:230px;pointer-events:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='250' viewBox='0 0 200 250' fill='none'%3E%3Cg stroke='%23ff6a1a' stroke-opacity='.32'%3E%3Cpath d='M200 8C116 26 97 91 22 171M200 34C127 50 107 111 48 181M200 60C144 74 122 132 75 192M200 86C164 99 147 145 102 204M200 112C177 128 166 160 132 217'/%3E%3C/g%3E%3C/svg%3E") right top/contain no-repeat;opacity:.8;transition:opacity .4s,transform .7s}
.teacher-profile:nth-child(3n) .teacher-info::before{border-radius:50% 0 0 0;transform:rotate(-16deg);transform-origin:right top}
.teacher-profile h2::after{content:"";display:block;width:48px;height:3px;margin-top:18px;background:var(--accent)}
.teacher-profile .teacher-info::after{content:"";position:absolute;z-index:-1;inset:auto 0 0;height:70px;pointer-events:none;background:linear-gradient(15deg,rgba(255,106,26,.085),transparent 65%)}
.teacher-campus + .teacher-campus::before{content:"";height:14px;width:1px;background:rgba(255,250,244,.3);margin-right:6px;order:-1}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.teacher-profile:hover .teacher-info::before{opacity:1}}
@media(max-width:700px){.teacher-profile h2::after{margin-top:16px;width:44px}.teacher-profile .teacher-info::before{top:60px}.teacher-specialties li{padding-right:10px}.teacher-campus + .teacher-campus::before{margin-right:2px}}

/* Founder uses the same card geometry and visual priority as the team. */
.teacher-profile .teacher-founder-note{align-self:flex-start;margin-top:-12px;font-size:12px;line-height:1.5;font-weight:500;color:var(--ink-dim);border-bottom:1px solid rgba(255,250,244,.22);padding-bottom:5px}
.teacher-profile .teacher-photo--initials{background:linear-gradient(145deg,#30312f,#141719 60%,#08090a)}
.teacher-photo--initials>span{position:absolute;top:10%;left:0;right:0;text-align:center;font-family:var(--display);font-size:clamp(90px,10vw,150px);line-height:1.2;font-weight:600;letter-spacing:-.08em;color:#ffffff27}
.teacher-profile .teacher-campus--pending{white-space:normal;font-size:13px;line-height:1.6;max-width:260px}

/* Equal cards, with the incomplete final row centered automatically.
   Flex wrapping also balances results after direction/branch filtering. */

.teacher-grid{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:24px}
.teacher-grid .teacher-profile{flex:0 0 calc((100% - 72px)/4);min-height:740px}
@media(min-width:1280px){
 .teacher-profile .teacher-info{padding:26px 22px;gap:20px}
 .teacher-first-name{font-size:23px}
 .teacher-last-name{font-size:clamp(30px,2.45vw,38px)}
 .teacher-specialties{font-size:15px;gap:6px}
 .teacher-specialties .dir-icon{width:28px;height:28px}
 .teacher-specialties li{gap:5px;padding:4px 9px 4px 5px}
 .teacher-campus{font-size:13px;white-space:normal}
 .teacher-locations{gap:9px 12px}
 .teacher-profile .teacher-book{font-size:14px;padding:13px 15px;min-height:52px}
}
@media(min-width:701px) and (max-width:1279px){
 
 .teacher-grid .teacher-profile{flex-basis:calc((100% - 24px)/2);min-height:780px}
}
@media(max-width:700px){
 .teacher-grid{gap:20px}
 .teacher-grid .teacher-profile{flex-basis:100%;min-height:730px}
}

/* Counts are recalculated after CMS rendering and filtering. */
.teacher-results{display:flex;align-items:center;min-height:56px}
.teacher-results p{margin:0;font-size:13px;color:var(--ink-faint)}
@media(min-width:1280px){
 .teacher-grid .teacher-profile{flex-basis:calc((100% - 48px)/3)}
 .teacher-grid[data-columns="4"] .teacher-profile{flex-basis:calc((100% - 72px)/4)}
}
