/* ==========================================================
   Kiraam tutor card + tutor profile header
   Scoped to .kt-* classes only, so no other section is affected.
   ========================================================== */
.kt-card-wrap,
.kt-profile {
  --kt-navy: #0b2e73;      /* Deep Blue: names, headings */
  --kt-muted: #5b6b8c;
  --kt-blue: #1268d5;      /* Royal Blue: buttons, links */
  --kt-blue-dark: #0e56b3;
  --kt-sky: #2aa8f2;       /* Sky Blue: icons */
  --kt-chip: #eaf4fd;
  --kt-chip-text: #1268d5;
  --kt-green: #2fa84f;
  --kt-green-bg: #e9f7ee;
  --kt-line: #e6ebf3;
}

/* ---------- Badges & chips ---------- */
.kt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--kt-green);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.kt-badge i {
  font-size: 0.8125rem;
}

.kt-chip {
  display: inline-block;
  background: var(--kt-chip);
  color: var(--kt-chip-text);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Listing card ---------- */
.kt-card-wrap {
  container-type: inline-size;
  height: 100%;
}

.kt-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "photo head"
    "chips chips"
    "meta  meta"
    "btn   btn";
  grid-template-rows: auto auto 1fr auto;
  column-gap: 14px;
  height: 100%;
  background: #fff;
  border: 1px solid var(--kt-line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 18px rgba(15, 31, 75, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-align: left;
}

.kt-card:hover {
  box-shadow: 0 10px 28px rgba(15, 31, 75, 0.1);
  transform: translateY(-2px);
}

.kt-card__photo {
  grid-area: photo;
  display: block;
  width: 96px;
  height: 108px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--kt-chip);
}

.kt-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kt-card__head {
  grid-area: head;
  min-width: 0;
}

.kt-card__name {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.kt-card__name a {
  color: var(--kt-navy);
}

.kt-card__name a:hover {
  color: var(--kt-blue);
}

.kt-card__role {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: var(--kt-muted);
  line-height: 1.4;
}

.kt-card__edu {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--kt-muted);
  line-height: 1.4;
}

.kt-card__edu i {
  font-size: 1rem;
  color: var(--kt-sky);
}

.kt-card__chips {
  grid-area: chips;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.kt-card__meta {
  grid-area: meta;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.kt-card__meta li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--kt-navy);
  line-height: 1.3;
  min-width: 0;
}

.kt-card__meta li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kt-card__meta i {
  font-size: 1.05rem;
  color: var(--kt-sky);
  flex-shrink: 0;
}

.kt-card__btn {
  grid-area: btn;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding: 9px 14px;
  border: 1.5px solid var(--kt-blue);
  border-radius: 8px;
  color: var(--kt-blue);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.kt-card__btn:hover {
  background: var(--kt-blue);
  color: #fff;
}

/* Wide card (full-width on phones/tablets): photo | info | details column */
@container (min-width: 340px) {
  .kt-card {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
      "photo head  meta"
      ".     chips meta"
      "btn   btn   btn";
    grid-template-rows: auto 1fr auto;
    column-gap: 12px;
    padding: 16px;
  }

  .kt-card__photo {
    width: 72px;
    height: 82px;
  }

  .kt-card__chips {
    margin-top: 10px;
  }

  .kt-card__meta {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0;
    padding-left: 12px;
    border-left: 1px solid var(--kt-line);
    max-width: 150px;
  }
}

@container (min-width: 560px) {
  .kt-card {
    grid-template-columns: 130px minmax(0, 1fr) auto;
    column-gap: 20px;
    padding: 20px;
  }

  .kt-card__photo {
    width: 130px;
    height: 145px;
  }

  .kt-card__name {
    font-size: 1.125rem;
  }

  .kt-card__meta {
    gap: 14px;
    padding-left: 20px;
    min-width: 160px;
  }

  .kt-card__meta li {
    font-size: 0.875rem;
  }
}

@container (max-width: 300px) {
  .kt-card {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 14px;
  }

  .kt-card__photo {
    width: 76px;
    height: 86px;
  }
}

/* ---------- Tutor profile header ---------- */
.kt-profile {
  position: relative;
  z-index: 2;
  margin-top: -15px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-areas:
    "photo body"
    "tags  tags"
    "actions actions";
  column-gap: 40px;
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 10px 40px rgba(15, 31, 75, 0.08);
}

.kt-profile__photo {
  grid-area: photo;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 9 / 10;
  background: var(--kt-chip);
}

.kt-profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kt-profile__photo .kt-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
}

.kt-badge--lg {
  font-size: 0.875rem;
  padding: 7px 12px;
  border-radius: 10px;
}

.kt-badge--lg i {
  font-size: 1rem;
}

.kt-profile__body {
  grid-area: body;
  min-width: 0;
}

.kt-profile__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 26px;
}

.kt-profile__name {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 600;
  color: var(--kt-navy);
  line-height: 1.2;
}

.kt-profile__role {
  margin: 0;
  font-size: 1.25rem;
  color: var(--kt-muted);
}

.kt-profile__share .tutor-profile__share-list {
  margin: 0;
  padding: 0;
}

.kt-stats {
  display: flex;
  flex-wrap: wrap;
  row-gap: 18px;
  margin-bottom: 26px;
}

.kt-stat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0 24px;
  border-left: 1px solid var(--kt-line);
  min-width: 0;
}

.kt-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.kt-stats--lg .kt-stat {
  padding-right: 48px;
}

.kt-stat i {
  font-size: 1.75rem;
  color: var(--kt-sky);
  line-height: 1;
}

.kt-stat strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--kt-navy);
  line-height: 1.3;
}

.kt-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.9375rem;
  color: var(--kt-muted);
}

.kt-profile__tags {
  grid-area: tags;
  margin-top: 28px;
}

.kt-tag-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.kt-tag-row__label {
  flex: 0 0 110px;
  font-size: 1rem;
  color: var(--kt-muted);
}

.kt-tag-row__list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.kt-chip--lg {
  font-size: 0.9375rem;
  padding: 11px 20px;
}

.kt-profile__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  padding-top: 32px;
  border-top: 1px solid var(--kt-line);
}

.kt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 32px;
  border-radius: 10px;
  font-size: 1.125rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.kt-btn i {
  font-size: 1.375rem;
}

.kt-btn--primary {
  min-width: 260px;
  background: var(--kt-blue);
  color: #fff;
}

.kt-btn--primary:hover {
  background: var(--kt-blue-dark);
  color: #fff;
}

.kt-btn--outline {
  border: 1.5px solid var(--kt-blue);
  color: var(--kt-blue);
  background: #fff;
}

.kt-btn--outline:hover {
  background: var(--kt-blue);
  color: #fff;
}

@media (max-width: 1199px) {
  .kt-profile {
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 28px;
    padding: 28px;
  }

  .kt-stat {
    padding: 0 16px;
  }

  .kt-stats--lg .kt-stat {
    padding-right: 32px;
  }
}

@media (max-width: 767px) {
  .kt-profile {
    margin-top: -60px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "body"
      "tags"
      "actions";
    padding: 20px;
    border-radius: 16px;
  }

  .kt-profile__photo {
    width: 160px;
    margin-bottom: 18px;
  }

  .kt-profile__photo .kt-badge {
    top: 8px;
    left: 8px;
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  .kt-profile__top {
    flex-direction: column;
    margin-bottom: 20px;
  }

  .kt-profile__name {
    font-size: 1.5rem;
  }

  .kt-profile__role {
    font-size: 1.0625rem;
  }

  .kt-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
  }

  .kt-stat,
  .kt-stats--lg .kt-stat {
    padding: 0;
    border-left: 0;
  }

  .kt-stat i {
    font-size: 1.5rem;
  }

  .kt-stat strong {
    font-size: 0.9375rem;
  }

  .kt-stat span {
    font-size: 0.8125rem;
  }

  .kt-profile__tags {
    margin-top: 6px;
  }

  .kt-tag-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .kt-tag-row__label {
    flex: none;
  }

  .kt-chip--lg {
    font-size: 0.8125rem;
    padding: 8px 14px;
  }

  .kt-profile__actions {
    padding-top: 20px;
    gap: 12px;
  }

  .kt-btn {
    flex: 1 1 100%;
    min-width: 0;
    min-height: 50px;
    font-size: 1rem;
  }
}
