/* =========================================================
   SECTION 10 — ĐỘI NGŨ GIÁO VIÊN
   Dựng theo ảnh mẫu khách gửi: nền xanh rất nhạt, tiêu đề navy
   cỡ lớn, 3 thẻ trắng có VIỀN MÀU ở cạnh trên, mỗi thẻ một con số.
   ========================================================= */

.team{
  --team-orange: #ff4800;   /* eyebrow                 */
  --team-navy:   #0d2a5c;   /* tiêu đề + tên hạng mục  */
  --team-muted:  #8b93a5;   /* nhãn "GIÁO VIÊN"        */
  --team-desc:   #5b6478;   /* dòng mô tả              */
  --team-cyan:   #29a8d8;   /* thẻ 1                   */
  --team-red:    #f5522d;   /* thẻ 2                   */
  --team-green:  #59bd45;   /* thẻ 3                   */

  background: #eaf6fd;
  padding-block: clamp(44px, 5.6vw, 80px);
}

.team__inner{
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--page-pad));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* --- tiêu đề ----------------------------------------------------------- */

.team__head{ text-align: center; }

.team__eyebrow{
  text-transform: uppercase;
  color: var(--team-orange);
}

.team__title{
  margin-top: 12px;
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: var(--team-navy);
  text-wrap: balance;
}

.team__desc{
  max-width: 780px;
  margin: clamp(16px, 1.8vw, 26px) auto 0;
  color: var(--team-desc);
}

/* --- 3 thẻ số ---------------------------------------------------------- */

/* 2 hàng chung: [con số] · [tên hạng mục]. (Nhãn "GIÁO VIÊN" dưới
   mỗi thẻ đã bỏ theo yêu cầu.)
   Thẻ 03 có tên dài gấp đôi 2 thẻ kia nên xuống 2 dòng — subgrid cho
   cả 3 thẻ dùng chung chiều cao hàng, nên con số và dòng tên của cả
   3 thẻ vẫn bắt đầu cùng một độ cao. */
.team__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(14px, 1.6vw, 24px);
  margin-top: clamp(28px, 3.4vw, 48px);
}

.team__card{
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  row-gap: 0;
  justify-items: center;
  padding: clamp(26px, 2.8vw, 40px) clamp(18px, 1.9vw, 28px) clamp(30px, 3.2vw, 46px);
  border-radius: clamp(12px, 1.1vw, 16px);
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 60, 120, .08);

  /* viền màu ở cạnh trên — mỗi thẻ một màu, đặt qua biến bên dưới */
  border-top: 5px solid var(--card-accent);
}

.team__card--1{ --card-accent: var(--team-cyan);  }
.team__card--2{ --card-accent: var(--team-red);   }
.team__card--3{ --card-accent: var(--team-green); }

.team__number{
  font-weight: 800;
  font-size: clamp(30px, 3.06vw, 44px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--card-accent);
}

.team__card-title{
  margin-top: clamp(16px, 1.6vw, 24px);
  font-weight: 700;
  font-size: clamp(13px, 1.11vw, 16px);
  line-height: 1.4;
  letter-spacing: -.01em;
  text-align: center;
  text-wrap: balance;
  color: var(--team-navy);
}



/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767px){
  .team__grid{ grid-template-columns: 1fr; }
  .team__card{ padding-block: 24px 28px; }
}

@media (max-width: 599px){
  .team{ padding-block: 36px; }
}

/* Trình duyệt chưa hỗ trợ subgrid: quay lại flex và giữ chỗ 2 dòng
   cho tên hạng mục để 3 thẻ vẫn cao bằng nhau. */
@supports not (grid-template-rows: subgrid){
  .team__card{
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .team__card-title{ min-height: calc(2 * 1.4em); }
}

/* =========================================================
   DẢI CHÂN DUNG GIÁO VIÊN

   Thẻ nền TRẮNG để tách thông tin từng giáo viên. Không đổ bóng xám
   như bản đầu — chỉ một viền xanh rất nhạt, nhờ vậy vẫn rõ ranh giới
   thẻ mà không tạo mảng xỉn trên nền section.

   Dải tự trôi ngang nhờ js/section10.js nhân đôi danh sách rồi đẩy
   scrollLeft từng khung hình. Vẫn là vùng cuộn thật nên người dùng
   vuốt tay được; đưa chuột vào hoặc chạm thì dải dừng.
   ========================================================= */

.teachers{
  --tc-gap: clamp(14px, 1.6vw, 22px);
  margin-top: clamp(32px, 4vw, 56px);
}

.teachers__label{
  margin-bottom: clamp(16px, 1.8vw, 24px);
  color: var(--team-desc);
  font-size: clamp(14px, 1.16vw, 16px);
  font-weight: 600;
  text-align: center;
}

/* KHÔNG đệm, cũng KHÔNG lề âm.
   - Bỏ đệm vì dải chạy vòng sẽ lộ vết nối: ở scrollLeft = 0 dải đệm
     bên trái trống, còn ở điểm vòng lại thì chỗ đó là mép thẻ phía
     trước — nhảy một cái 24px.
   - Bỏ lề âm vì từ 1248px trở lên khối .team__inner đã bị bó theo
     max-width và căn giữa, kéo lề âm ra nữa là tràn ngang cả trang.
   Hai mép để mask lo, không cần tràn ra ngoài cột nội dung. */
.teachers__viewport{
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* KHÔNG dùng scroll-snap: điểm neo sẽ kéo giật dải đang tự trôi */
}
.teachers__viewport::-webkit-scrollbar{ display: none; }

/* hai mép mờ dần, để thẻ trôi vào/ra không bị cắt cụt đột ngột */
@supports (mask-image: linear-gradient(90deg, #000, #000)){
  .teachers__viewport{
    mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  }
}

.teachers__track{
  display: flex;
  gap: var(--tc-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 4 thẻ một màn ở desktop */
.teachers__item{
  flex: 0 0 calc((100% - 3 * var(--tc-gap)) / 4);
}

.tcard{
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #d8e9f6;
  border-radius: 18px;
  overflow: hidden;              /* ảnh bo theo góc thẻ */
  background: #fff;
  transition: border-color .2s ease, transform .2s ease;
}
.tcard:hover{
  border-color: var(--team-orange);
  transform: translateY(-3px);
}

/* --- ô ảnh vuông ------------------------------------------------------- */

.tcard__media{
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--team-orange);  /* lót cùng tông nền ảnh khi đang tải */
}

.tcard__photo{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* nút mũi tên góc trên phải, báo hiệu thẻ bấm được */
.tcard__go{
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  color: var(--team-orange);
  transition: background-color .2s ease, color .2s ease;
}
.tcard__go svg{
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}
.tcard:hover .tcard__go{
  background: var(--team-orange);
  color: #fff;
}

/* --- phần chữ ---------------------------------------------------------- */

.tcard__body{
  display: block;
  padding: clamp(14px, 1.5vw, 20px) clamp(14px, 1.4vw, 18px) clamp(16px, 1.8vw, 22px);
  text-align: left;
}

.tcard__name{
  display: block;
  color: var(--team-navy);
  font-size: clamp(14px, 1.18vw, 17px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.tcard__degree{
  display: block;
  margin-top: 8px;
  color: var(--team-orange);
  font-size: clamp(12.5px, 1.02vw, 14.5px);
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}

.tcard__school{
  display: block;
  margin-top: 5px;
  color: var(--team-desc);
  font-size: clamp(12px, .95vw, 13.5px);
  font-weight: 500;
  line-height: 1.45;
  text-wrap: pretty;
}

/* --- nút khám phá ------------------------------------------------------ */

.teachers__more{
  display: flex;
  justify-content: center;
  margin-top: clamp(22px, 2.4vw, 34px);
}

.teachers__more a{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 34px;
  border-radius: 999px;
  background: var(--team-orange);
  color: #fff;
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255, 72, 0, .26);
  transition: transform .2s ease, box-shadow .2s ease;
}
.teachers__more a:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 72, 0, .34);
}
.teachers__more svg{
  width: 1.1em;
  height: 1.1em;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}


/* --- màn hẹp ----------------------------------------------------------- */

@media (max-width: 1023px){
  .teachers__item{ flex-basis: calc((100% - 2 * var(--tc-gap)) / 3); }
}

@media (max-width: 767px){
  /* 1 thẻ rưỡi: hé thẻ sau để người dùng biết còn vuốt được */
  .teachers__item{ flex-basis: calc((100% - var(--tc-gap)) / 1.75); }
}

@media (max-width: 420px){
  .teachers__item{ flex-basis: 78%; }
}

@media (prefers-reduced-motion: reduce){
  .tcard,
  .tcard__go,
  .teachers__more a{ transition: none; }

  .tcard:hover,
  .teachers__more a:hover{ transform: none; }
}
