/* ============================================================
   Nova Tutor Academy — cards.css
   Service cards, value cards, faculty highlights, card grids
   ============================================================ */

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Base card ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition:
    box-shadow 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.22s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(245, 166, 35, 0.3);
}
.card:hover::before {
  transform: scaleY(1);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gold-light);
  color: var(--navy);
  border-radius: var(--radius-md);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
  font-family: var(--font-display);
}
.card h3 {
  color: var(--navy);
  margin-bottom: 10px;
}
.card p {
  font-size: 0.9rem;
}
.card .text-link {
  font-size: 0.88rem;
}

/* ── Value card (about page) ── */
.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border-top: 3px solid var(--gold);
  transition: box-shadow 0.2s;
}
.value-card:hover {
  box-shadow: var(--shadow-md);
}
.value-card h3 {
  color: var(--navy);
  margin-bottom: 12px;
}
.value-card p {
  font-size: 0.9rem;
}

/* ── Section-soft cards get slate bg ── */
.section-soft .card {
  background: var(--white);
}

/* ── Faculty highlight boxes ── */
.faculty-highlight {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.highlight-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}
.highlight-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
}
.highlight-card span:last-child {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Faculty grid ── */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.faculty-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 12px 34px rgba(15, 31, 61, 0.08);
  transition:
    box-shadow 0.2s,
    transform 0.2s,
    border-color 0.2s;
}
.faculty-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(245, 166, 35, 0.28);
}
.faculty-hero {
  position: relative;
  padding-bottom: 18px;
}
.faculty-hero-image {
  position: relative;
  height: 155px;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 18% 24%,
      rgba(245, 166, 35, 0.22),
      transparent 22%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.18),
      transparent 18%
    ),
    linear-gradient(135deg, #0f1f40 0%, #17386d 52%, #274d8c 100%);
}
.faculty-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.faculty-hero-brand {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.faculty-hero-brand::before {
  content: "";
  position: absolute;
  width: min(220px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 32% 30%,
      rgba(255, 255, 255, 0.18),
      transparent 28%
    ),
    radial-gradient(
      circle at 70% 72%,
      rgba(245, 166, 35, 0.22),
      transparent 34%
    ),
    rgba(255, 255, 255, 0.08);
  filter: blur(0.2px);
}
.faculty-hero-brand img {
  position: relative;
  width: clamp(72px, 12vw, 132px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(10, 20, 42, 0.35));
}
.faculty-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.22),
      transparent 28%
    ),
    linear-gradient(135deg, #102042, #17386d);
}
.faculty-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 20, 42, 0.06), rgba(10, 20, 42, 0.4)),
    linear-gradient(135deg, rgba(245, 166, 35, 0.1), transparent 42%);
  pointer-events: none;
}
.faculty-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 31, 61, 0.92);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 31, 61, 0.18);
}
.faculty-badge::before {
  content: "🎓";
  font-size: 0.85rem;
}
.faculty-content {
  padding: 0 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.faculty-avatar {
  width: 130px;
  height: 130px;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #17386d);
  color: var(--white);
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  flex-shrink: 0;
  margin: -68px auto 0;
  border: 4px solid var(--white);
  box-shadow: 0 14px 30px rgba(15, 31, 61, 0.16);
}
.faculty-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.faculty-content h3 {
  text-align: center;
  margin-top: 2px;
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1.1;
}
.faculty-info {
  display: grid;
  background: linear-gradient(
    180deg,
    rgba(245, 247, 252, 0.92),
    rgba(245, 247, 252, 0.7)
  );
  border: 1px solid rgba(15, 31, 61, 0.06);
  border-radius: 16px;
  overflow: hidden;
}
.info-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
}
.info-item + .info-item {
  border-top: 1px solid rgba(15, 31, 61, 0.06);
}
.info-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
}
.info-separator {
  width: 1px;
  height: 28px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(15, 31, 61, 0.18),
    transparent
  );
  justify-self: center;
}
.info-item > strong,
.info-item .faculty-subjects {
  justify-self: end;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: right;
}
.info-item.subjects-item {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 14px;
}
.subjects-item .info-separator {
  display: none;
}
.info-item.subjects-item .faculty-subjects {
  justify-self: stretch;
  text-align: left;
}
.faculty-subjects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
}
.faculty-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: 0.72rem;
  line-height: 1.25;
  padding: 4px 10px;
  background: rgba(245, 166, 35, 0.14);
  color: var(--navy);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 999px;
  font-weight: 700;
}
.faculty-subjects-more {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 2px;
}
.faculty-subjects-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px dashed rgba(15, 31, 61, 0.24);
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 800;
  cursor: pointer;
  appearance: none;
}
.faculty-subjects-toggle:hover,
.faculty-subjects-toggle:focus-visible {
  border-color: var(--gold);
  background: rgba(245, 166, 35, 0.08);
}
.subjects-less-label {
  display: none;
}
.faculty-subjects-more.is-expanded .subjects-more-label {
  display: none;
}
.faculty-subjects-more.is-expanded .subjects-less-label {
  display: inline;
}
.faculty-subjects-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.faculty-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  color: var(--gold);
  margin: -2px 0;
}
.faculty-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 166, 35, 0.6),
    transparent
  );
}
.faculty-divider .divider-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
  background: var(--white);
  padding: 0 4px;
}
.faculty-divider-quote {
  color: var(--gold);
  margin-top: 2px;
}
.faculty-description {
  margin-top: -2px;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
  text-align: left;
  padding: 0 6px;
}
.faculty-card::after {
  content: "";
  display: block;
  height: 10px;
  background: linear-gradient(
    90deg,
    #13284f,
    #1d3a70 48%,
    #f5a623 48.5%,
    #13284f 49%,
    #13284f 100%
  );
  margin-top: auto;
}

.latest-tutors-grid .faculty-card {
  height: 100%;
}

/* ── Faculty intro / toolbar ── */
.faculty-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.faculty-search {
  display: flex;
  align-items: center;
  width: min(100%, 600px);
  margin: 0 auto;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.faculty-search input {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font-body);
  width: 100%;
  min-width: 0;
  outline: none;
  transition: border-color 0.18s;
}
.faculty-search input:focus {
  border-color: var(--blue);
}
.faculty-toolbar {
  margin-bottom: 8px;
}
#facultyStatus {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 30px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .faculty-grid {
    grid-template-columns: 1fr 1fr;
  }
  .faculty-hero-image {
    height: 210px;
  }
}
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .faculty-grid {
    grid-template-columns: 1fr;
  }
  .faculty-search {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .faculty-search input {
    font-size: 1rem;
  }
  .faculty-content {
    padding: 0 18px 24px;
  }
  .faculty-avatar {
    width: 112px;
    height: 112px;
    margin-top: -62px;
  }
  .faculty-content h3 {
    font-size: 1.35rem;
  }
  .faculty-hero-image {
    height: 180px;
  }
  .info-item {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
  }
  .info-separator {
    width: 100%;
    height: 1px;
  }
  .info-item > strong,
  .info-item .faculty-subjects {
    justify-self: start;
    text-align: left;
  }
  .faculty-subjects {
    justify-content: flex-start;
  }
}
