.teaching-gallery-section{
    padding:74px 0;
    background:#fff;
    border-top:1px solid #edf0f2;
}
.teaching-gallery-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:32px;
    align-items:end;
    margin-bottom:24px;
}
.teaching-gallery-head h2{
    max-width:720px;
    margin:8px 0 0;
    color:#202124;
    font-size:34px;
    line-height:1.15;
    letter-spacing:-.03em;
}
.teaching-gallery-head p{
    max-width:660px;
    margin:12px 0 0;
    color:#5f6368;
    font-size:14px;
    line-height:1.7;
}
.teaching-gallery-controls{
    display:flex;
    gap:8px;
}
.teaching-gallery-controls button{
    width:42px;
    height:42px;
    border:1px solid #dadce0;
    border-radius:6px;
    background:#fff;
    color:#202124;
    font-size:18px;
    cursor:pointer;
}
.teaching-gallery-controls button:hover{
    border-color:#1a73e8;
    color:#1a73e8;
}
.teaching-gallery-shell{
    overflow:hidden;
}
.teaching-gallery-track{
    display:flex;
    gap:16px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    scrollbar-width:none;
    -ms-overflow-style:none;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
}
.teaching-gallery-track::-webkit-scrollbar{
    display:none;
}
.teaching-gallery-slide{
    flex:0 0 calc((100% - 16px) / 2);
    min-width:0;
    scroll-snap-align:start;
}
.teaching-gallery-image{
    position:relative;
    overflow:hidden;
    width:100%;
    height:320px;
    border:1px solid #dadce0;
    border-radius:7px;
    background:#f8fafd;
}
.teaching-gallery-image img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center center;
    transform:translateZ(0);
}
.teaching-gallery-type{
    position:absolute;
    left:12px;
    bottom:12px;
    padding:6px 9px;
    border-radius:4px;
    background:rgba(255,255,255,.94);
    color:#202124;
    font-family:"JetBrains Mono",monospace;
    font-size:9px;
    font-weight:800;
    letter-spacing:.06em;
}
.teaching-gallery-slide p{
    margin:10px 2px 0;
    min-height:38px;
    color:#3c4043;
    font-size:12px;
    line-height:1.55;
}
.teaching-gallery-progress{
    display:flex;
    align-items:center;
    gap:8px;
    justify-content:flex-end;
    margin-top:16px;
    color:#5f6368;
    font-family:"JetBrains Mono",monospace;
    font-size:9px;
    font-weight:700;
}
.teaching-gallery-progress i{
    width:46px;
    height:1px;
    background:#dadce0;
}
@media(max-width:900px){
    .teaching-gallery-slide{
        flex-basis:calc((100% - 16px) / 2);
    }
    .teaching-gallery-image{
        height:285px;
    }
}
@media(max-width:640px){
    .teaching-gallery-section{
        padding:50px 0;
    }
    .teaching-gallery-head{
        grid-template-columns:1fr auto;
        gap:16px;
        align-items:end;
    }
    .teaching-gallery-head h2{
        font-size:27px;
    }
    .teaching-gallery-head p{
        font-size:13px;
    }
    .teaching-gallery-slide{
        flex-basis:88%;
    }
    .teaching-gallery-image{
        height:260px;
    }
    .teaching-gallery-controls button{
        width:38px;
        height:38px;
    }
}
@media(max-width:390px){
    .teaching-gallery-image{
        height:220px;
    }
}
/* GALLERY MOBILE FIX V4 */
@media(max-width:640px){
    .teaching-gallery-track{
        gap:12px !important;
        padding-right:8% !important;
        scroll-snap-type:x mandatory !important;
    }

    .teaching-gallery-slide{
        flex:0 0 92% !important;
        width:92% !important;
        max-width:92% !important;
        scroll-snap-align:start !important;
    }

    .teaching-gallery-image{
        width:100% !important;
        height:270px !important;
        aspect-ratio:auto !important;
    }

    .teaching-gallery-image img{
        width:100% !important;
        height:100% !important;
        object-fit:cover !important;
        object-position:center center !important;
    }

    .teaching-gallery-slide p{
        min-height:0 !important;
        margin-top:10px !important;
        font-size:13px !important;
        line-height:1.55 !important;
    }

    .teaching-gallery-controls{
        gap:6px !important;
    }

    .teaching-gallery-controls button{
        width:38px !important;
        height:38px !important;
    }
}

@media(max-width:390px){
    .teaching-gallery-slide{
        flex-basis:92% !important;
        width:92% !important;
        max-width:92% !important;
    }

    .teaching-gallery-image{
        height:245px !important;
    }
}
/* MEDIA FIT FIX V1 */
.teaching-gallery-image{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:auto !important;
    padding:8px;
    background:#f8fafd;
}

.teaching-gallery-image img{
    display:block !important;
    width:auto !important;
    max-width:100% !important;
    height:auto !important;
    max-height:520px !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
    object-position:center !important;
    margin:0 auto !important;
}

@media (max-width:720px){
    .teaching-gallery-image img{
        max-height:440px !important;
    }
}
/* GALLERY UNIFORM CARD V2 */
.teaching-gallery-slide{
    display:flex !important;
    flex-direction:column !important;
}

.teaching-gallery-image{
    position:relative !important;
    width:100% !important;
    height:auto !important;
    aspect-ratio:4 / 3 !important;
    min-height:0 !important;
    padding:8px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
    background:#f8fafd !important;
    border:1px solid #dadce0 !important;
    border-radius:8px !important;
}

.teaching-gallery-image img{
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
    object-position:center center !important;
    margin:0 !important;
}

.teaching-gallery-slide p{
    min-height:42px !important;
    margin:10px 0 0 !important;
}

@media(max-width:720px){
    .teaching-gallery-image{
        width:100% !important;
        height:auto !important;
        aspect-ratio:4 / 3 !important;
    }

    .teaching-gallery-image img{
        width:100% !important;
        height:100% !important;
        object-fit:contain !important;
    }

    .teaching-gallery-slide p{
        min-height:0 !important;
    }
}