/*
 Theme Name: TutorStarter Child
 Template: tutorstarter
 Description: Child theme for TutorStarter
 Version: 1.0.0
*/

/* --------- Design tokens --------- */
:root {
  --card-w: 300px;
  --avatar: 100px;
  --radius: 8px;
  --card-bg: #f9f9f9;
  --card-bd: #ddd;
  --shadow: 0 2px 5px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 10px rgba(0,0,0,0.15);
}

/* --------- Instructor list layout --------- */
/* Use a responsive grid that naturally wraps cards */
.tutor-instructor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-w), 1fr));
  gap: 20px;
  justify-items: center;
}

/* --------- Card --------- */
.tutor-instructor-card {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: calc(var(--card-w) + 60px);
  padding: 15px;
  border: 1px solid var(--card-bd);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  /* Place transitions on the base state so hover both applies and reverts smoothly */
  transition: box-shadow .25s ease, transform .25s ease;
}

/* Tutor photo */
.tutor-instructor-avatar {
  width: var(--avatar) !important;
  height: var(--avatar) !important;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
}

/* Text block */
.tutor-text-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tutor-text-wrapper h3,
.tutor-text-wrapper p {
  margin: 0;
  text-align: left;
}

.tutor-text-wrapper h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.tutor-text-wrapper p {
  font-size: 14px;
  color: #666;
}

/* Link covers the whole card */
.tutor-instructor-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tutor-instructor-link:hover .tutor-instructor-card {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tutor-instructor-card {
    transition: none;
  }
}

/* --------- Hide “Courses” section on Tutor dashboard/profile --------- */
/* More robust: hide the entire group whenever a course list exists */
.tutor-dashboard-content .tutor-dashboard-item-group:has(.tutor-dashboard-course-list) {
  display: none !important;
}
/* Defensive fallback: hide the list itself regardless */
.tutor-dashboard-content .tutor-dashboard-course-list {
  display: none !important;
}

/* --------- Profile header tweaks --------- */
/* Hide all spans that follow the H3 in .profile-name (course stats) */
.profile-name h3 ~ span {
  display: none !important;
}

