/* Let illustrations keep their own proportions instead of letterboxing them. */
img { max-width: 100%; }
.course-image-band img,
.course-section img.w-100,
.featured-article img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  background: transparent;
}

/* Image frames follow the image at every viewport; widgets stay in flow. */
.course-art.course-art-photo {
  display: grid;
  gap: 16px;
  aspect-ratio: auto;
  padding: 0;
}
.course-photo-label { position: relative; top: auto; left: auto; }
.course-photo-backdrop { inset: 12% 0 22% 4%; }
.course-photo-frame,
.art-content .course-photo-frame {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
}
.course-hero-designed .course-visual .course-photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border-radius: inherit;
  background: transparent;
}
.course-photo-widget { position: relative; right: auto; bottom: auto; justify-self: end; width: 65%; min-width: 0; }
.course-art-photo .course-photo-frame { transform: none; }
.course-art-photo.art-smo .course-photo-frame { box-shadow: 0 20px 48px #18395714; }

/* Classroom photos fill their frames without stretching. */
.about-visual img { aspect-ratio: 4 / 3; object-fit: cover; background: transparent; }
.image-stack img { object-fit: cover; background: transparent; border-width: 3px; }

/* Posters and certificates remain fully readable, without extra frame space. */
.gallery-card .gallery-media,
.gallery-card .gallery-media.tall,
.gallery-card .gallery-media.wide {
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  background: transparent;
}
.gallery-card .gallery-media img { display: block; width: 100%; height: auto; aspect-ratio: auto; }
.gallery-card:hover .gallery-media img { transform: none; }

@media (max-width: 767px) {
  .course-hero-designed .course-visual { max-width: 100%; }
  .course-photo-widget { width: 85%; }
  .course-photo-label { font-size: 11px; min-width: 0; }
  .course-photo-label > i { flex-shrink: 0; }
  .art-footer { flex-wrap: wrap; gap: 8px; }
  .art-footer > span { flex: 1 1 150px; }
  .course-motion-toggle { flex-shrink: 0; }
  .course-hero-designed .course-stat strong { overflow-wrap: anywhere; font-size: 18px; }
  .course-hero-designed .course-stat span { line-height: 1.4; display: block; }
  .about-visual .visual-panel { position: relative; inset: auto; margin: 0; border-radius: 0; box-shadow: none; padding: 16px; }
  .image-stack { height: auto; min-height: 0; display: grid; gap: 16px; }
  .image-stack .main-img, .image-stack .small-img { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: auto; border: 0; }
  .image-stack .mini-metric { position: relative; inset: auto; width: 100%; }
  .gallery-card .gallery-media img { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .course-art-photo * { animation: none !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
