/* SECTION */
.teachers-section {
  position: relative;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  overflow: hidden;
  padding: 96px 0; /* a bit taller */
}

/* SWIPER */
.teachers-swiper {
  position: relative;
  width: 100%;
  padding: 12px 0 50px;
  overflow: hidden;
  touch-action: pan-y;
}

.teachers-swiper .swiper-wrapper {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition-timing-function: ease-out;
}

.teachers-swiper .swiper-slide {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: auto;
  transition: transform 0.6s ease, opacity 0.6s ease;
  opacity: 0.4;
  transform: scale(0.85);
}

.teachers-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.teachers-swiper .swiper-slide-prev,
.teachers-swiper .swiper-slide-next {
  opacity: 0.7;
  transform: scale(0.9);
  z-index: 1;
}
.teachers-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}
.teachers-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1.03);     /* pop the active */
  z-index: 2;
}

/* CARD */
.teacher-card {
  background: transparent;
  perspective: 1100px;
  height: 300px;              /* ⬅ even more compact */
  border: none;
  cursor: default;
}
.teacher-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .8s;
  transform-style: preserve-3d;
  text-align: center;
  border-radius: 18px;
  /* subtle glass look */
  background: linear-gradient(180deg,#fff, #f8fafc);
  box-shadow: 0 14px 40px rgba(2,6,23,.10);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.teacher-card-inner.is-flipped { transform: rotateY(180deg); }

/* FRONT/BACK (match your class names) */
.teacher-card-front-ca,
.teacher-card-back-ca {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.teacher-card-back-ca {
  transform: rotateY(180deg);
  padding: 24px 22px;
  justify-content: space-between;
}

/* AVATAR (smaller image area) */
.avatar-wrapper {
  position: relative;
  padding-top: 45%;            /* even shorter banner ratio */
  overflow: hidden;
  background: #f1f5f9;
}
.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%; 
  height: 100%;
  object-fit: cover;
  object-position: center top;  /* focus on the top part of image */
  transition: transform .35s ease;
}
.teacher-card:hover .avatar-img { transform: scale(1.06); }

/* gradient top overlay for text contrast if needed */
.avatar-wrapper::after{
  content:"";
  position:absolute; inset:0 0 auto 0; height:36%;
  background: linear-gradient(180deg, rgba(2,6,23,.35), transparent);
}

/* rating badge */
.avatar-badge {
  position: absolute; top: 14px; right: 14px;
  z-index: 1;
}
.avatar-badge .badge{
  background: rgba(14,165,233,.12);
  color: #0369a1;
  border: 1px solid rgba(14,165,233,.25);
  font-weight: 700;
}

/* BODY (bigger fonts) */
.teacher-body { 
  padding: 12px 12px 15px; 
}
.teacher-name {
  font-size: 1.1rem;          /* even smaller font */
  font-weight: 700;
  color: #0f172a;
  margin: 3px 0 2px;
  letter-spacing: .2px;
}
.teacher-expertise {
  color: #475569;
  font-size: 0.85rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

/* STATS (smaller compact design) */
.teacher-stats {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 10px 0 4px;
}
.stat-item { text-align: center; min-width: 90px; }
.stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #0ea5e9;
}
.stat-label {
  font-size: .8rem;
  color: #64748b;
}

/* specialties list (bigger line height) */
.specialties-list {
  list-style: none; padding: 0; margin: 10px 0 0;
}
.specialties-list li {
  padding: 10px 0;
  color: #334155;
  font-size: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.specialties-list li:last-child { border-bottom: 0; }

/* achievement chip */
.achievement {
  margin: 16px 0 10px;
  padding: 12px 14px;
  background: rgba(14,165,233,.10);
  border: 1px solid rgba(14,165,233,.25);
  border-radius: 12px;
}
.achievement-label {
  display: block;
  font-size: .85rem;
  color: #64748b;
  margin-bottom: 2px;
}
.achievement-value {
  font-weight: 700;
  color: #0369a1;
}

/* social */
.social-links {
  display: flex; justify-content: center; gap: 12px; margin-top: 12px;
}
.social-link {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f1f5f9; color: #0ea5e9;
  font-size: 18px;
  transition: all .25s ease;
  border: 1px solid #e2e8f0;
}
.social-link:hover { background:#0ea5e9; color:#fff; transform: translateY(-2px); }

/* buttons */
.btn.btn-outline-primary.btn-sm,
.btn.btn-primary.btn-sm{
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}

/* SWIPER NAV/PAGINATION */
.teachers-section .swiper-button-next,
.teachers-section .swiper-button-prev {
  width: 44px; 
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(2,6,23,.12);
  border: 1px solid #e2e8f0;
  margin-top: -22px;
  transition: all 0.3s ease;
}
.teachers-section .swiper-button-next:hover,
.teachers-section .swiper-button-prev:hover {
  background: #0ea5e9;
  border-color: #0ea5e9;
}
.teachers-section .swiper-button-next::after,
.teachers-section .swiper-button-prev::after {
  font-size: 1.3rem; color: #0ea5e9;
}
.teachers-section .swiper-pagination-bullet {
  width: 11px; height: 11px; background: #cbd5e1; opacity: 1;
}
.teachers-section .swiper-pagination-bullet-active {
  background: #0ea5e9; transform: scale(1.25);
}

/* RESPONSIVE (keep “large feel” on tablets too) */
@media (max-width: 1200px){
  .teachers-swiper .swiper-slide { width: 340px; }
  .teacher-card { height: 540px; }
}
@media (max-width: 991px){
  .teachers-section { padding: 80px 0; }
  .teachers-swiper .swiper-slide { width: 320px; }
  .teacher-card { height: 520px; }
}
@media (max-width: 767px){
  .teachers-swiper .swiper-slide { width: 300px; }
  .teacher-card { height: 500px; }
  .teachers-section .swiper-button-next,
  .teachers-section .swiper-button-prev { display: none; }
}
@media (max-width: 575px){
  .teachers-swiper .swiper-slide { width: 280px; }
  .teacher-card { height: 480px; }
}
