/**
 * Layout fixes — courses 4-up, full-width gallery
 */
@media (min-width: 1024px) {
  #courses .course-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  #courses .course-img-wrap {
    height: 140px !important;
  }

  #courses .course-body {
    padding: 14px 12px 16px !important;
  }

  #courses .course-body h3 {
    font-size: 15px !important;
  }

  #courses .course-body p:not(.course-duration) {
    font-size: 12px !important;
    line-height: 1.55 !important;
    margin-bottom: 12px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #courses .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

#gallery .gallery-slider-wrap {
  max-width: none !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#gallery .gallery-main,
#gallery #galleryMain {
  width: 100% !important;
  height: min(52vh, 480px) !important;
  max-height: min(52vh, 480px) !important;
  min-height: 280px !important;
  aspect-ratio: unset !important;
}

#gallery .gallery-track {
  height: 100% !important;
  max-height: min(52vh, 480px) !important;
}

#gallery .gallery-slide {
  height: 100% !important;
  max-height: min(52vh, 480px) !important;
}

#gallery .gallery-slide img {
  width: 100% !important;
  height: 100% !important;
  max-height: min(52vh, 480px) !important;
  object-fit: cover !important;
}

@media (max-width: 767px) {
  #gallery .gallery-main,
  #gallery #galleryMain {
    height: 260px !important;
    max-height: 260px !important;
  }

  #gallery .gallery-track,
  #gallery .gallery-slide,
  #gallery .gallery-slide img {
    max-height: 260px !important;
  }
}
