/* kidteach.ru V5.4 – original students' photos, responsive and uncropped.
   Scoped to public homepage. No changes to private dashboards. */
.kt53-home .kt54-photo-frame {position:relative;display:block;isolation:isolate;overflow:hidden;margin:0;min-width:0;background:#cfdbea}
.kt53-home .kt54-photo-frame::before {content:"";position:absolute;inset:-25px;z-index:0;background-position:center;background-size:cover;background-repeat:no-repeat;filter:blur(18px) saturate(.9);transform:scale(1.09);opacity:.77;pointer-events:none}
.kt53-home .kt54-photo-robotics::before {background-image:url('/static/kidteach-gallery-v4/robotics.webp')}
.kt53-home .kt54-photo-programming::before {background-image:url('/static/kidteach-gallery-v4/programming.webp')}
.kt53-home .kt54-photo-design::before {background-image:url('/static/kidteach-gallery-v4/design-steve.webp')}
.kt53-home .kt54-photo-modeling::before {background-image:url('/static/kidteach-gallery-v4/modeling-coin.webp')}
/* 'contain' is intentional: photos of children and their projects must not be cropped. */
.kt53-home .kt54-photo-frame > img {display:block;position:relative;z-index:1;width:100%;height:100%;max-height:none;object-fit:contain;object-position:center center;border:0;border-radius:0;background:transparent;filter:none;clip-path:none;transform:none}
.kt53-home .kt54-hero-photo {height:clamp(345px,37vw,515px);border-radius:25px;box-shadow:0 25px 60px rgba(3,13,33,.3);border:1px solid rgba(213,232,255,.22)}
.kt53-home .kt54-hero-photo > img {object-position:center center}
.kt53-home .kt54-hero-photo figcaption {position:absolute;bottom:17px;left:18px;z-index:3;background:rgba(8,27,52,.86);color:#fff;padding:10px 15px;border-radius:11px;font-size:16px;font-weight:750;max-width:calc(100% - 36px);backdrop-filter:blur(5px)}
.kt53-home .kt54-gallery-section {background:var(--paper,#fff);padding:65px 0 80px}
.kt53-home .kt54-gallery-heading {margin-bottom:28px}
.kt53-home .kt54-gallery-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.kt53-home .kt54-gallery-card {display:block;min-width:0;color:inherit;border:1px solid var(--line,#dbe4f0);border-radius:20px;overflow:hidden;background:var(--paper,#fff);text-decoration:none;box-shadow:0 10px 22px rgba(25,49,84,.07);transition:transform .2s,box-shadow .2s}
.kt53-home .kt54-gallery-card:hover {transform:translateY(-4px);box-shadow:0 15px 30px rgba(22,51,90,.13)}
.kt53-home .kt54-gallery-card:focus-visible {outline:3px solid #2569dd;outline-offset:4px}
.kt53-home .kt54-gallery-image {height:205px;max-height:none;width:100%;border-radius:0}
.kt53-home .kt54-gallery-caption {display:flex;align-items:center;justify-content:space-between;gap:10px;padding:19px 20px 21px}
.kt53-home .kt54-gallery-caption h3 {font-size:20px;line-height:1.2;margin:0;color:var(--ink,#142640);font-weight:800;letter-spacing:-.02em}
.kt53-home .kt54-gallery-caption span {font-size:25px;color:#246cda;font-weight:750}
@media (max-width:1150px) {.kt53-home .kt54-gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr))}.kt53-home .kt54-gallery-image {height:240px}}
@media (max-width:760px) {.kt53-home .kt54-hero-photo {width:100%;max-width:600px;margin:0 auto;height:370px;border-radius:20px}.kt53-home .kt54-gallery-section {padding:48px 0 58px}.kt53-home .kt54-gallery-image {height:215px}}
@media (max-width:510px) {.kt53-home .kt54-hero-photo {height:320px}.kt53-home .kt54-hero-photo figcaption {font-size:15px;bottom:12px;left:12px}.kt53-home .kt54-gallery-grid {grid-template-columns:1fr;gap:16px}.kt53-home .kt54-gallery-image {height:260px}.kt53-home .kt54-gallery-caption {padding:15px 18px 17px}}
@media (prefers-reduced-motion:reduce) {.kt53-home .kt54-gallery-card {transition:none}}
