/* =========================================================
 * MUSK POST TYPE - ĐỘI NGŨ CHUYÊN GIA
 *
 * Dùng cho cả trang danh sách và trang chi tiết.
 * Chỉ được nạp trên archive / single / taxonomy của post type.
 * ========================================================= */

.musk-expert {
  position: relative;
  z-index: 0;
  padding: 70px 0 80px;
  background: #f4f6fb;
  color: #17191f;
}

/* Dải vát góc nối liền banner phía trên.
   Màu phải trùng nền của khối này. */

.musk-expert .musk-top__shape {
  background: #f4f6fb;
}

.musk-expert,
.musk-expert *,
.musk-expert *::before,
.musk-expert *::after {
  box-sizing: border-box;
}

.musk-expert__container {
  width: 100%;
  max-width: 1140px;
  padding: 0 20px;
  margin: 0 auto;
}

/* =========================================================
 * BREADCRUMB
 * ========================================================= */

.musk-expert__breadcrumb {
  margin-bottom: 22px;
  color: #66707f;
  font-size: 14px;
}

.musk-expert__breadcrumb a {
  color: #1f4fd8;
  text-decoration: none;
}

.musk-expert__breadcrumb span {
  margin-left: 6px;
}

/* =========================================================
 * TRANG CHI TIẾT - BỐ CỤC
 * ========================================================= */

.musk-expert__layout {
  display: grid;
  grid-template-columns:
    minmax(0, 33%)
    minmax(0, 67%);
  align-items: start;
  gap: 26px;
}

/* Cột trái - chỉ còn ảnh, tên, giới thiệu ngắn. Bám theo khi
   cuộn (position: sticky) vì cột phải thường dài hơn nhiều -
   cần align-items: start ở lưới cha thì sticky mới có tác dụng,
   xem cùng cách làm ở blog/single.css. */

.musk-expert__profile {
  position: sticky;
  top: 110px;
  padding: 30px 26px 34px;
  border: 1px solid #e6eaf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(8, 20, 46, 0.06);
  text-align: center;
}

.musk-expert__photo-wrap {
  position: relative;
  margin-bottom: 20px;
}

/* Hình chữ nhật đứng bo góc thay vì ảnh tròn - vừa hiện đại hơn
   vừa không cắt mất phần vai/áo như crop tròn hay bị. */

.musk-expert__photo {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  border-radius: 10px;
  background: #eef2fb;
}

.musk-expert__photo img {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover;
}

.musk-expert__photo--empty {
  background:
    linear-gradient(180deg, #eef2fb 0%, #dde5f6 100%);
}

.musk-expert__linkedin {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0a66c2;
  color: #fff;
  transition: background-color 0.25s ease;
}

.musk-expert__linkedin:hover {
  background: #084d92;
}

.musk-expert__linkedin svg {
  width: 18px;
  height: 18px;
}

.musk-expert__name {
  margin: 0 0 12px;
  color: #0b1b3b;
  font-weight: 700;
  line-height: 1.25;
}

.musk-expert__intro {
  color: #3a4557;
  line-height: 1.75;
  text-align: left;
}

.musk-expert__intro p {
  margin: 0;
}

.musk-expert__intro p + p {
  margin-top: 14px;
}

/* Cột phải */

.musk-expert__details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 30px 30px 34px;
  border: 1px solid #e6eaf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(8, 20, 46, 0.06);
  gap: 26px;
}

/* =========================================================
 * KHỐI THÔNG TIN
 * ========================================================= */

.musk-expert__block-title {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  color: #0b1b3b;
  font-weight: 700;
  line-height: 1.3;
  gap: 10px;
}

.musk-expert__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef2ff;
  color: #1f4fd8;
}

.musk-expert__icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.musk-expert__list {
  padding: 0 0 0 4px;
  margin: 0;
  list-style: none;
}

.musk-expert__list li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 7px;
  color: #3a4557;
  font-size: 15px;
  line-height: 1.6;
}

.musk-expert__list li::before {
  position: absolute;
  top: 9px;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9aa6b8;
  content: "";
}

/* Chứng chỉ chia nhiều cột */

.musk-expert__block--columns .musk-expert__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0 20px;
}

/* =========================================================
 * TRANG DANH SÁCH
 * ========================================================= */

.musk-expert__archive-intro {
  margin-bottom: 22px;
  color: #3a4557;
  line-height: 1.7;
  text-align: center;
}

.musk-expert__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}

.musk-expert__filter {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border: 1px solid #e2e4e8;
  border-radius: 7px;
  background: #fff;
  color: #777d87;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.musk-expert__filter:hover {
  border-color: #1558f4;
  color: #1558f4;
}

.musk-expert__filter.is-active {
  border-color: rgba(21, 88, 244, 0.42);
  background: #eef2ff;
  color: #1558f4;
}

/* Lưới đều nhau, mọi thẻ cao bằng nhau bất kể tên dài ngắn.
   Số cột cố định theo màn hình: 3 / 2 / 1. */

.musk-expert__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}

.musk-expert__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 20px 24px;
  border: 1px solid #e6eaf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(8, 20, 46, 0.04);
  text-align: center;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.musk-expert__card:hover {
  transform: translateY(-3px);
  border-color: #d9e0ee;
  box-shadow: 0 16px 36px rgba(8, 20, 46, 0.1);
}

.musk-expert__card-link {
  display: block;
  padding: 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

/* Nút đẩy xuống đáy thẻ, các thẻ thẳng hàng nhau. */

.musk-expert__card-action {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 18px;
}

.musk-expert__card-photo {
  overflow: hidden;
  width: 100%;
  max-width: 150px;
  aspect-ratio: 4 / 5;
  margin: 0 auto 16px;
  border-radius: 10px;
  background: #eef2fb;
}

.musk-expert__card-photo img {
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover;
}

.musk-expert__card-name {
  margin: 0 0 6px;
  color: #0b1b3b;
  font-weight: 700;
  line-height: 1.3;
}

/* Chức vụ giới hạn 2 dòng: dài hơn thì thẻ cao lệch nhau. */

.musk-expert__card-role {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #2f6fe4;
  font-weight: 500;
}

.musk-expert__pagination {
  margin-top: 34px;
  text-align: center;
}

.musk-expert__empty {
  padding: 40px 0;
  color: #66707f;
  text-align: center;
}

/* =========================================================
 * TABLET - LƯỚI 2 CỘT
 * ========================================================= */

@media (max-width: 1024px) {
  .musk-expert__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* =========================================================
 * MOBILE
 * ========================================================= */

@media (max-width: 767px) {
  .musk-expert {
    padding: 40px 0 56px;
  }

  .musk-expert__layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .musk-expert__profile,
  .musk-expert__details {
    padding: 24px 20px 26px;
  }

  /* Cột trái không còn nằm cạnh cột phải nữa (đã xuống 1 cột) -
     sticky lúc này chỉ làm ảnh dính lại đè lên nội dung bên
     dưới, phải tắt hẳn. */

  .musk-expert__profile {
    position: static;
    top: auto;
  }

  .musk-expert__details {
    gap: 22px;
  }

  .musk-expert__photo {
    max-width: 160px;
  }

  .musk-expert__list li {
    font-size: 14px;
  }

  .musk-expert__block--columns .musk-expert__list {
    grid-template-columns: 1fr;
  }

  .musk-expert__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .musk-expert__card {
    padding: 20px 14px 18px;
  }

  .musk-expert__card-action {
    padding-top: 14px;
  }

  .musk-expert__card-photo {
    width: 96px;
    height: 96px;
    margin-bottom: 12px;
  }

  .musk-expert__filter {
    padding: 7px 16px;
    font-size: 13px;
  }
}
