/* Hans Institute Support Centre – department dropdown */
select[name="department"] {
    height: auto !important;
    min-height: 52px !important;
    padding: 12px 40px 12px 14px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    vertical-align: middle !important;
}

/* ==========================================
   HANS INSTITUTE HOMEPAGE FIX
   Does not affect trainee dashboard
   ========================================== */

/* Hide unwanted Home page heading */
body.home .entry-title,
body.home .wp-block-post-title,
body.home h1.page-title {
    display: none !important;
}

/* Remove homepage content width restrictions */
body.home .entry-content,
body.home .wp-block-post-content {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Align homepage HTML with the slider */
body.home .hans-home {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

/* Remove unnecessary gap above the slider */
body.home .entry-content > :first-child,
body.home .wp-block-post-content > :first-child {
    margin-top: 0 !important;
}

/* Hans Institute — space below homepage slider */

body.home .hans-home {
    margin-top: 40px !important;
}

/* Hans Institute — trainee service title fix */

body.page-slug-my-credentials .entry-title,
body.page-slug-digital-transcript .entry-title,
body.page-slug-my-institute-letters .entry-title,
body.page-slug-my-placement-tracker .entry-title,
body.page-slug-my-support-centre .entry-title,
body.page-slug-my-visa-application .entry-title {
    display: none !important;
}

/* HANS INSTITUTE
   Mobile Course Bundle Card Improvements
   Tutor LMS / Astra
*/

@media (max-width: 767px) {

  /* Target cards linking to Tutor LMS bundles */
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) {
    height: auto !important;
    min-height: 0 !important;
  }

  /* Compact card content */
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-card-body,
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-course-card-body {
    height: auto !important;
    min-height: 0 !important;
    padding: 16px !important;
  }

  /* Display complete titles */
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-course-name,
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-course-card-title {
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 12px !important;
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    -webkit-line-clamp: unset !important;
  }

  /* Reduce unnecessary metadata spacing */
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-course-card-meta,
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-course-card-instructors {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* Improve metadata readability */
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-course-card-meta {
    font-size: 13px !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere;
  }

  /* Preserve the pricing and enrolment area */
  .tutor-course-card:has(
    a[href*="/course-bundle/"]
  ) .tutor-card-footer {
    height: auto !important;
    padding: 14px 16px !important;
  }
}
