#families .about-card .about-card-cover {
  aspect-ratio: auto;
  min-height: clamp(10.25rem, 17vw, 14.25rem);
  display: flex;
  align-items: flex-end;
}
#families .about-card-heading { position: relative; inset: auto; gap: .3rem; padding: 2.25rem 1.1rem 1rem; }
#families .about-card-title { font-size: clamp(1.06rem, 2vw, 1.48rem); line-height: 1.18; }
#families .about-card-kicker { font-size: .76rem; }
#families .about-card-action { padding: .32rem .72rem; font-size: .8rem; }
#families .about-card-shade { background: linear-gradient(180deg, #06282018 5%, #062820a6 58%, #062820f2); }
#families #family-lyceum img { object-position: 50% 37%; }

#situations .guide { display: block; }
#situations .guide-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.25rem;
  margin: 0 0 .85rem;
  padding: clamp(.95rem, 2.8vw, 1.45rem);
}
#situations .guide-intro h2 { margin: 0 0 .35rem; }
#situations .guide-intro p { margin: 0; }
.situations-call {
  flex: none;
  color: #153e36;
  background: #dcf0ac;
  border-radius: .7rem;
  padding: .62rem .88rem;
  font-weight: 800;
  text-decoration: none;
}
#situations .steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
#situations .step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: .42rem .55rem;
  min-height: 0;
  padding: .8rem .85rem;
  border-radius: .95rem;
}
#situations .step .step-num { width: 2rem; height: 2rem; margin: 0; }
#situations .step h3 { margin: 0; font-size: .98rem; line-height: 1.24; }
#situations .step p { grid-column: 1 / -1; align-self: start; margin: 0; font-size: .875rem; line-height: 1.42; }
#situations .step a { grid-column: 1 / -1; justify-self: start; margin: 0; font-size: .84rem; }
@media(min-width:1050px) { #situations .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media(max-width:530px) {
  #situations .guide-intro { flex-wrap: wrap; }
  #situations .steps { grid-template-columns: minmax(0, 1fr); }
  #families .about-card .about-card-cover { min-height: 8.75rem; }
  #families .about-card-heading { padding: 1.6rem .9rem .72rem; }
}

.photo-gallery-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  position: relative;
  gap: .65rem 1rem;
  margin-top: 1rem;
  padding: clamp(.85rem, 3vw, 1.4rem);
  background: linear-gradient(95deg, #123e36 20%, #123e36c9),
    url('/assets/tatar-ornament-mobile-v1.webp') right center / 21rem repeat;
  color: #fff;
}
.photo-gallery-entry svg { width: 2rem; height: 2rem; color: #d9edab; }
.photo-gallery-entry .about-card-title { display: block; color: #fff; font-size: clamp(1.05rem, 3vw, 1.5rem); }
.photo-gallery-entry p { margin: .3rem 0 0; color: #e0efea; font-size: .9rem; }
.photo-gallery-entry a { color: #173e36; background: #dcefaa; padding: .55rem .8rem; border-radius: .65rem; text-decoration: none; font-weight: 800; }
.photo-gallery-entry a::after { content: ""; position: absolute; inset: 0; }
.photo-gallery-entry:focus-within { outline: 3px solid #6f9a48; outline-offset: 3px; }
@media(max-width:520px) {
  .photo-gallery-entry { grid-template-columns: auto minmax(0, 1fr); }
  .photo-gallery-entry a { grid-column: 2; justify-self: start; }
}

.photo-gallery { min-height: 100vh; margin: 0; font: 1rem/1.52 Manrope, system-ui, sans-serif; color: #153e36; background: #eaf2e9; }
.photo-gallery * { box-sizing: border-box; }
.photo-gallery [hidden] { display: none !important; }
.gallery-wrap { width: min(100% - 2rem, 75rem); margin-inline: auto; padding: 1.25rem 0 3rem; }
.photo-gallery a { color: #145b48; }
.gallery-hero {
  margin: .85rem 0;
  padding: clamp(1.2rem, 4.5vw, 2.6rem);
  border-radius: 1.15rem;
  color: #fff;
  background: linear-gradient(95deg, #123e36 22%, #123e36b9),
    url('/assets/tatar-ornament-mobile-v1.webp') right center / 25rem repeat;
}
.gallery-hero h1 { margin: .25rem 0 .5rem; font-size: clamp(1.7rem, 6vw, 3rem); line-height: 1.1; }
.gallery-hero p { margin: .5rem 0; max-width: 50ch; }
.gallery-kicker { color: #d8edac; font-weight: 800; }
.gallery-hero nav { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .95rem; }
.gallery-hero nav a { color: #fff; border: 1px solid #ffffff63; border-radius: .65rem; padding: .3rem .55rem; text-decoration: none; }
.gallery-hero nav a:hover { background: #ffffff25; }
.gallery-note { font-size: .9rem; }
.gallery-featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .65rem; }
.gallery-featured figure { margin: 0; padding: .65rem; border: 1px solid #c9d9ce; border-radius: .9rem; background: #fff; }
.gallery-featured img { display: block; width: 100%; height: clamp(8rem, 22vw, 13rem); object-fit: contain; background: #edf4ec; border-radius: .55rem; margin-bottom: .35rem; }
.gallery-featured figcaption { color: #416a58; font-size: .76rem; margin-top: .28rem; }
.gallery-filters { display: flex; gap: .75rem 1rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.gallery-filters select { max-width: 100%; border: 1px solid #adcaaf; border-radius: .55rem; padding: .35rem; font: inherit; color: inherit; }
.gallery-group { margin-top: 1.4rem; scroll-margin-top: 1rem; }
.gallery-group h2 { margin: 0 0 .6rem; font-size: 1.3rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); align-items: start; gap: .65rem; }
.gallery-grid article { padding: .85rem; background: #fff; border: 1px solid #c9d9ce; border-radius: .9rem; min-width: 0; }
.gallery-meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; font-size: .74rem; font-weight: 750; color: #416a58; }
.gallery-grid h3 { margin: .32rem 0; font-size: 1rem; }
.gallery-grid p { margin: .25rem 0 .55rem; font-size: .9rem; }
.gallery-grid details { margin-top: .55rem; border-top: 1px solid #d9e5dc; padding-top: .45rem; }
.gallery-grid summary { cursor: pointer; font-weight: 800; }
.gallery-frames { padding-inline-start: 1.3rem; margin-block: .4rem 0; max-height: 19rem; overflow: auto; }
.gallery-frames li + li { margin-top: .2rem; }
