/* ============================================================
   INSTRUCTORS (Prompt 11) — cards, home section, directory, profile.
   Portrait 4:5 cards; mobile swipe like other discovery surfaces.
   ============================================================ */

.instructors { background: var(--cj-background); padding-block: var(--cj-space-16) var(--cj-space-20); }
.instructors-head { display: grid; gap: var(--cj-space-4); margin-bottom: var(--cj-space-8); max-width: 720px; }
.instructors-head h2 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
.instructors-intro { color: var(--color-text-muted); font-size: clamp(1rem, 2.4vw, 1.125rem); line-height: 1.65; }
@media (min-width: 1024px) {
  .instructors-head { grid-template-columns: 1fr auto; align-items: end; max-width: none; }
  .instructors-all { justify-self: end; }
}

.instructors-track {
  display: flex; gap: var(--cj-space-4);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-inline: calc(var(--space-4) * -1);
  padding-inline: var(--space-4);
  padding-bottom: var(--space-2);
}
.instructors-track::-webkit-scrollbar { display: none; }
.instructors-hint { text-align: center; color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 600; margin-top: var(--space-3); }
.instructors-hint span { color: var(--cj-primary); }

/* Reusable instructor card. */
.instructor-card {
  position: relative; flex: 0 0 84vw; max-width: 400px;
  scroll-snap-align: center;
  background: var(--cj-surface); border: 1px solid var(--cj-border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base);
}
.instructor-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--cj-navy-deep); }
.instructor-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) var(--ease-out); }
.instructor-body { padding: var(--cj-space-4); display: grid; gap: var(--space-1); align-content: start; flex: 1; }
.instructor-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; line-height: 1.3; margin: 0; }
.instructor-specs { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cj-primary); margin: 0; }
.instructor-bio { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; margin: 0; }
.instructor-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-2); }
.instructor-count { font-size: 0.75rem; font-weight: 700; background: var(--cj-primary-soft); color: var(--cj-primary-active); border-radius: var(--radius-pill); padding: 4px 10px; white-space: nowrap; }
.instructor-link { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 700; color: var(--cj-primary); width: fit-content; }
.instructor-link svg { width: 16px; height: 16px; transition: transform var(--duration-fast) var(--ease-out); }
.instructor-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

@media (hover: hover) and (pointer: fine) {
  .instructor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #C4D5E6; }
  .instructor-card:hover .instructor-media img { transform: scale(1.04); }
  .instructor-card:hover .instructor-link svg { transform: translateX(3px); }
}

/* Directory + profile. */
.instructors-page { background: var(--cj-background); padding-block: var(--cj-space-8) var(--cj-space-16); }
.instructors-hero { max-width: 720px; margin-bottom: var(--cj-space-8); display: grid; gap: var(--space-3); }
.instructors-grid { display: grid; gap: var(--cj-space-4); margin-top: var(--cj-space-8); }
.instructors-grid .instructor-card, .instructors-grid .course-card, .instructors-grid .video-card { flex: none; max-width: none; }

.instructor-profile { background: var(--cj-white); padding-block: var(--cj-space-8) var(--cj-space-16); }
.profile-hero { display: grid; gap: var(--cj-space-8); margin-bottom: var(--cj-space-12); }
.profile-photo { border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 4 / 5; max-width: 420px; background: var(--cj-navy-deep); box-shadow: var(--shadow-md); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.profile-specs { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cj-primary); }
.profile-social { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.profile-social a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 var(--space-4); border: 1px solid var(--cj-border); border-radius: var(--radius-pill); font-weight: 700; font-size: var(--text-sm); }
.profile-social a:hover { border-color: var(--cj-primary); color: var(--cj-primary-hover); }
.profile-about { max-width: 760px; margin-bottom: var(--cj-space-12); }
.profile-chips { list-style: none; padding: 0; margin: 0 0 var(--cj-space-12); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.profile-chips li { background: var(--cj-primary-soft); color: var(--cj-primary-active); font-weight: 700; font-size: var(--text-sm); border-radius: var(--radius-pill); padding: 8px 18px; }
.instructor-profile section { margin-bottom: var(--cj-space-12); }
.instructor-profile section:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .instructors-track { display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .instructors-track .instructor-card { flex: none; max-width: none; }
  .instructors-hint { display: none; }
  .instructors-grid { grid-template-columns: repeat(2, 1fr); gap: var(--cj-space-6); }
  .profile-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
}
@media (min-width: 1024px) {
  .instructors-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .instructors-track { grid-template-columns: repeat(4, 1fr); gap: var(--cj-space-6); }
  .instructors-grid { grid-template-columns: repeat(4, 1fr); }
}
