/* Local school photographs get a quiet editorial layout instead of a generic grid. */
#school-grounds {
  margin-bottom: 58px;
  padding: 0;
  background: transparent;
}

#school-grounds .section-head {
  align-items: center;
  margin-bottom: 18px;
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, 174px);
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.moment.fixed-ground {
  min-height: 0;
  border: 1px solid #e6e0d5;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(40, 56, 48, .09);
}

.moment.fixed-ground:first-child {
  grid-column: span 7;
  grid-row: span 2;
  border: 1px solid #e6e0d5;
  box-shadow: 0 12px 30px rgba(40, 56, 48, .12);
}

.moment.fixed-ground:nth-child(2) { grid-column: span 5; }
.moment.fixed-ground:nth-child(3) { grid-column: span 3; }
.moment.fixed-ground:nth-child(4) { grid-column: span 2; }
.moment.fixed-ground img { filter: saturate(.9) contrast(1.02); }
.moment.fixed-ground:first-child img { object-position: center; }
.moment.fixed-ground:nth-child(2) img { object-position: center 58%; }
.moment.fixed-ground:nth-child(4) img { object-position: center 42%; }
.moment.fixed-ground span {
  left: 14px;
  bottom: 13px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 7px;
  background: rgba(255,255,255,.9);
  color: #293b35;
  font: 600 11px 'Noto Serif Bengali', serif;
  box-shadow: none;
}

/* Teacher archive follows the same light, structured visual system as the rest of the site. */
.teachers {
  max-width: 1320px;
  margin: 0 auto 76px;
  padding: 36px;
  border: 1px solid #dce8e1;
  border-radius: 18px;
  background: linear-gradient(140deg, #edf8fc, #ffffff 72%);
}

.teachers .section-head { margin-bottom: 8px; }
.teachers .section-head h2 { color: #263b34; }
.teacher-note {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fffdf8;
  color: #748078;
  font: 12px 'Noto Serif Bengali', serif;
}

.teacher-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.teacher-card {
  position: relative;
  min-height: 176px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid #e1e9e4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(40, 56, 48, .045);
}
.teacher-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 17px;
  right: 17px;
  height: 3px;
  border-radius: 0 0 5px 5px;
  background: #f3b04c;
}
.teacher-avatar,
.teacher-card:nth-child(3n+2) .teacher-avatar,
.teacher-card:nth-child(3n) .teacher-avatar {
  width: 52px;
  height: 52px;
  margin: 9px 0 13px;
  border: 1px solid #dbe9e1;
  border-radius: 12px;
  background: #eaf5ef;
  color: #236047;
  font: 700 18px 'Noto Serif Bengali', serif;
}
.teacher-card:nth-child(4n+2) .teacher-avatar { background: #fff4df; border-color: #f0deba; color: #9a6928; }
.teacher-card:nth-child(4n+3) .teacher-avatar { background: #eef4f7; border-color: #d9e5ea; color: #3f6c7a; }
.teacher-card h3 { margin: 0 0 9px; color: #293a35; font: 700 16px 'Noto Serif Bengali', serif; }
.teacher-card p { margin: 4px 0; color: #6b7973; font: 12px/1.5 'Noto Serif Bengali', serif; }
.teacher-card p b { color: #a57532; font-weight: 700; }
.teacher-more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 23px 0 0;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: #f9a839;
  color: #fff;
  font: 700 13px 'Noto Serif Bengali', serif;
  box-shadow: none;
}
.teacher-more:hover { background: #e99a28; transform: translateY(-1px); }
.teacher-more span { font: 20px/1 'DM Sans', sans-serif; }

/* Photo-first archive: only confirmed photos and details are shown. */
.teacher-grid:not(:has(.teacher-empty)) {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  justify-content: center;
}
.teacher-photo-card {
  min-height: 0;
  padding: 12px;
  text-align: center;
}
.teacher-photo-card::before { display: none; }
.teacher-photo-card img {
  display: block;
  width: min(100%, 280px);
  aspect-ratio: 4 / 5;
  margin: 0 auto 15px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  background: #eaf7fc;
}
.teacher-photo-card h3 { margin-bottom: 6px; }
.teacher-empty {
  grid-column: 1 / -1;
  width: min(430px, 100%);
  margin: 6px auto 0;
  padding: 30px 28px;
  border: 1px dashed #cfe7f0;
  border-radius: 16px;
  background: rgba(255,255,255,.58);
  text-align: center;
}
.teacher-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #dff2f9;
  color: #336a80;
  font-size: 21px;
}
.teacher-empty p { margin: 0; color: #657d88; font: 14px/1.7 'Noto Serif Bengali', serif; }
.teacher-upcoming {
  width: fit-content;
  max-width: 100%;
  margin: 26px auto 0;
  padding: 9px 15px;
  border: 1px solid #cfe7f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #657d88;
  font: 13px/1.5 'Noto Serif Bengali', serif;
  text-align: center;
}

@media (max-width: 850px) {
  #school-grounds, .teachers { margin-right: 20px; margin-left: 20px; }
  .moments-grid { grid-template-rows: repeat(2, 145px); }
  .teacher-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  #school-grounds { margin-bottom: 42px; }
  .moments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 220px 130px 130px; gap: 10px; }
  .moment.fixed-ground:first-child { grid-column: 1 / -1; grid-row: auto; }
  .moment.fixed-ground:nth-child(2), .moment.fixed-ground:nth-child(3), .moment.fixed-ground:nth-child(4) { grid-column: auto; grid-row: auto; }
  .moment.fixed-ground:nth-child(4) { grid-column: span 2; }
  .teachers { margin-bottom: 48px; padding: 24px 18px; border-radius: 14px; }
  .teachers .section-head { display: block; }
  .teachers .section-head p { margin-top: 9px; }
  .teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .teacher-card { min-height: 166px; padding: 14px; }
  .teacher-card::before { left: 14px; right: 14px; }
  .teacher-card h3 { font-size: 15px; }
  .teacher-upcoming { margin-top: 20px; padding: 8px 12px; font-size: 12px; }
}
