.teacher-page-container {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

.teacher-side-panel {
  width: 280px;
  background: linear-gradient(180deg, #ae3725 0%, #8f2718 100%);
  border-radius: 18px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(123, 29, 16, 0.16);
}

.teacher-side-panel__head {
  padding: 26px 28px 18px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
}

.teacher-side-panel__body {
  padding: 0 28px 28px;
}

.teacher-side-panel__summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.88);
}

.teacher-side-panel__links {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.teacher-side-panel__links li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.teacher-side-panel__links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

.teacher-side-panel__links a span:last-child {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.teacher-side-panel__links a:hover {
  color: #fae385;
}

.teacher-side-panel__links a.is-active {
  color: #fae385;
  font-weight: 700;
}

.teacher-content {
  width: 100%;
  overflow: hidden;
}

.teacher-summary {
  margin-top: 26px;
  padding: 24px 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff5f1 0%, #ffffff 100%);
  border: 1px solid #f2ddd4;
}

.teacher-summary__title {
  margin: 0 0 8px;
  color: #8f2718;
  font-size: 24px;
  font-weight: 700;
}

.teacher-summary__text {
  margin: 0;
  color: #5e5048;
  font-size: 16px;
  line-height: 1.9;
}

.teacher-grid {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.teacher-card {
  min-width: 0;
}

.teacher-card__link {
  display: block;
  height: 100%;
  background: #fff;
  border: 1px solid #eee4dd;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(58, 35, 28, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.teacher-card__link:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(58, 35, 28, 0.16);
  border-color: #d6b2a2;
}

.teacher-card__image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(180deg, #f8f1ed 0%, #efe4dd 100%);
  overflow: hidden;
}

.teacher-card__image-wrap1 {
  position: relative;
  aspect-ratio: 7 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(180deg, #f8f1ed 0%, #efe4dd 100%);
  overflow: hidden;
}

.teacher-card__image {
  width: 84%;
  height: 84%;
  object-fit: contain;
  display: block;
}

.teacher-card__meta {
  padding: 18px 16px 20px;
  text-align: center;
}

.teacher-card__name {
  display: block;
  margin-top: 0;
  color: #3b2e28;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.teacher-pagination .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.teacher-pagination .pagination a,
.teacher-pagination .pagination span {
  min-width: 92px;
  text-align: center;
}

.teacher-pagination .pagination .is-current {
  background: #ae3725;
  color: #fff;
}

.teacher-pagination .pagination .is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.teacher-detail {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 42px;
  margin-top: 28px;
  padding: 32px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #eee4dd;
  box-shadow: 0 16px 42px rgba(58, 35, 28, 0.08);
}

.teacher-detail__media {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f0ea 0%, #ecdfd7 100%);
}

.teacher-detail__media img {
  display: block;
  width: 100%;
  height: auto;
}

.teacher-detail__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f8ebe5;
  color: #ae3725;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}

.teacher-detail__title {
  margin: 18px 0 10px;
  color: #2f241f;
  font-size: 38px;
  line-height: 1.2;
}

.teacher-detail__subtitle {
  margin: 0 0 24px;
  color: #9b5a45;
  font-size: 16px;
  line-height: 1.8;
}

.teacher-detail__intro {
  color: #4d413b;
  font-size: 18px;
  line-height: 2;
}

.teacher-detail__intro p {
  margin: 0;
}

.teacher-detail__actions {
  margin-top: 30px;
}

.teacher-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 13px 22px;
  border-radius: 999px;
  background: #ae3725;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s ease;
}

.teacher-back-link:hover {
  background: #8f2718;
  color: #fff;
}

@media screen and (max-width: 1360px) {
  .teacher-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (max-width: 1100px) {
  .teacher-page-container {
    flex-direction: column;
    gap: 28px;
  }

  .teacher-side-panel {
    width: 100%;
  }

  .teacher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-detail {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .teacher-detail__media {
    max-width: 420px;
  }
}

@media screen and (max-width: 680px) {
  .teacher-summary {
    padding: 18px 16px;
  }

  .teacher-summary__title {
    font-size: 20px;
  }

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

  .teacher-card__name {
    font-size: 18px;
  }

  .teacher-detail {
    padding: 18px;
    gap: 24px;
  }

  .teacher-detail__title {
    font-size: 28px;
  }

  .teacher-detail__intro {
    font-size: 16px;
  }
}
