/* ================== About page — hero, story, team, gallery ================== */

body.about-page .content {
  padding-bottom: 48px;
}

body.about-page .content > .section:only-child {
  display: block;
  min-height: auto;
}

.about-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Who we are — auto filmstrip at top */
.about-who-wrap {
  margin-bottom: 32px;
}

.about-who-strip {
  position: relative;
  overflow: hidden;
  direction: ltr;
  border-radius: 18px;
  margin-bottom: 0;
  min-height: clamp(120px, 18vw, 168px);
  background: linear-gradient(180deg, #eef4fa 0%, #e2ebf5 100%);
  border: 1px solid rgba(22, 84, 147, 0.12);
  box-shadow: 0 8px 28px rgba(14, 60, 106, 0.1);
}

.about-who-strip:hover .about-who-strip__track {
  animation-play-state: paused;
}

.about-who-strip::before,
.about-who-strip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}

.about-who-strip::before {
  left: 0;
  background: linear-gradient(90deg, rgba(238, 244, 250, 0.95), transparent);
}

.about-who-strip::after {
  right: 0;
  background: linear-gradient(270deg, rgba(238, 244, 250, 0.95), transparent);
}

.about-who-strip__track {
  display: flex;
  width: max-content;
  will-change: transform;
  pointer-events: auto;
}

.about-who-strip--ready .about-who-strip__track {
  animation: about-who-pan 55s linear infinite;
}

.about-who-strip__row {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
}

.about-who-strip__frame {
  flex-shrink: 0;
  width: clamp(88px, 14vw, 120px);
  aspect-ratio: 3 / 4;
  padding: 6px;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.about-who-strip__link {
  cursor: pointer;
}

.about-who-strip__link:hover,
.about-who-strip__link:focus-visible {
  transform: scale(1.04);
  z-index: 1;
}

.about-who-strip__link:focus-visible {
  outline: 2px solid #165493;
  outline-offset: 2px;
  border-radius: 14px;
}

.about-who-strip__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(14, 60, 106, 0.14);
}

.about-who-strip__frame--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  margin: 6px;
  width: calc(clamp(88px, 14vw, 120px) - 12px);
  height: calc(100% - 12px);
  box-shadow: inset 0 0 0 1px rgba(22, 84, 147, 0.12);
}

.about-who-strip__frame--empty span {
  font-family: "EasaFalaGalan", "Faruma", Arial, sans-serif;
  font-size: 1.75rem;
  color: rgba(22, 84, 147, 0.3);
  line-height: 1;
}

@keyframes about-who-pan {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .about-who-strip--ready .about-who-strip__track {
    animation: none;
  }
}

/* Intro title above filmstrip */
.about-intro-head {
  text-align: center;
  line-height: 0;
  margin-bottom: 20px;
}

.about-intro-head img {
  width: clamp(150px, 28vw, 280px);
  height: auto;
  display: inline-block;
}

/* Hero — kept for reference if needed elsewhere */
.about-hero-wrap {
  margin-bottom: 32px;
}

.about-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(22, 84, 147, 0.1);
  box-shadow: 0 10px 36px rgba(14, 60, 106, 0.08);
}

.about-hero-banner {
  margin: 0;
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.about-hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(-5%) scale(1.05);
  transform-origin: center top;
}

.about-hero-heading {
  position: absolute;
  top: 8%;
  left: 58%;
  transform: translateX(calc(-50% + 2cm));
  z-index: 2;
  margin: 0;
  line-height: 0;
  animation: aboutHeadIn 0.8s ease forwards;
  pointer-events: none;
}

@keyframes aboutHeadIn {
  from {
    opacity: 0;
    transform: translateX(calc(-50% + 2cm + 36px));
  }
  to {
    opacity: 1;
    transform: translateX(calc(-50% + 2cm));
  }
}

.about-hero-heading img {
  width: clamp(150px, 28vw, 280px);
  height: auto;
  display: block;
}

/* Stats */
.about-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.about-stat {
  background: linear-gradient(145deg, #165493 0%, #1e6aab 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(22, 84, 147, 0.22);
}

.about-stat strong {
  display: block;
  font-family: "EasaFalaGalan", "Faruma", Arial, sans-serif;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  margin-bottom: 4px;
}

.about-stat span {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.92;
}

/* Story */
.about-story {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 44px;
}

.about-card {
  background: #fff;
  border-radius: 18px;
  padding: clamp(20px, 2.5vw, 32px);
  box-shadow: 0 6px 24px rgba(14, 60, 106, 0.07);
  border: 1px solid rgba(22, 84, 147, 0.08);
}

.about-card p {
  color: #3a4a5e;
  font-size: clamp(16px, 1.85vw, 19px);
  line-height: 2.2;
  margin: 0;
  padding: 0;
  text-align: justify;
}

.about-banner {
  display: block;
  margin: 0;
  width: 100%;
  line-height: 0;
}

.about-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(14, 60, 106, 0.12);
}

/* Section titles */
.about-section-title {
  font-family: "EasaFalaGalan", "Faruma", Arial, sans-serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: normal;
  color: #165493;
  text-align: center;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(22, 84, 147, 0.12);
  position: relative;
}

.about-section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 2px;
  background: #165493;
  border-radius: 2px;
}

.about-block {
  margin-bottom: 44px;
}

.about-block:last-child {
  margin-bottom: 0;
}

/* Team grid — 4 per row */
.about-team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.about-person {
  margin: 0;
  text-align: center;
}

.about-person-photo {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, #eef4fa 0%, #e2ebf5 100%);
  box-shadow: 0 8px 22px rgba(14, 60, 106, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-person:hover .about-person-photo {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(14, 60, 106, 0.16);
}

.about-person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.35s ease;
}

.about-person:hover .about-person-photo img,
.about-person:focus-within .about-person-photo img {
  filter: grayscale(0%);
}

.about-person-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  transition: transform 0.22s ease;
}

.about-person-link:hover {
  transform: translateY(-2px);
}

.about-person-link:focus-visible {
  outline: 2px solid #165493;
  outline-offset: 4px;
}

.about-person-link .about-person-photo img {
  filter: grayscale(100%);
}

.about-person-link:hover .about-person-photo img,
.about-person-link:focus-visible .about-person-photo img {
  filter: grayscale(0%);
}

.about-person figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #165493;
  line-height: 1.4;
}

/* Teacher profile page */
body.teacher-page .content {
  padding-bottom: 48px;
}

.teacher-loading,
.teacher-error {
  text-align: center;
  color: #627d98;
  font-size: 17px;
  padding: 48px 16px;
}

.teacher-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: #165493;
  text-decoration: none;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(22, 84, 147, 0.08);
  transition: background 0.2s ease;
}

.teacher-back:hover {
  background: rgba(22, 84, 147, 0.14);
}

.teacher-hero {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 28px 36px;
  align-items: start;
  background: #fff;
  border-radius: 22px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 28px;
  border: 1px solid rgba(22, 84, 147, 0.1);
  box-shadow: 0 10px 36px rgba(14, 60, 106, 0.08);
}

.teacher-photo-wrap {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, #eef4fa 0%, #e2ebf5 100%);
  box-shadow: 0 8px 24px rgba(14, 60, 106, 0.12);
}

.teacher-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.teacher-head h2 {
  font-family: "EasaFalaGalan", "Faruma", Arial, sans-serif;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: normal;
  color: #165493;
  margin: 0 0 8px;
}

.teacher-role {
  margin: 0 0 18px;
  color: #486581;
  font-size: 16px;
  line-height: 1.6;
}

.teacher-subjects-wrap {
  margin-bottom: 20px;
}

.teacher-subjects-label {
  display: block;
  font-size: 13px;
  color: #627d98;
  margin-bottom: 8px;
}

.teacher-subjects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.teacher-subjects li {
  font-size: 13px;
  color: #165493;
  background: rgba(22, 84, 147, 0.08);
  border: 1px solid rgba(22, 84, 147, 0.14);
  border-radius: 999px;
  padding: 6px 12px;
}

.teacher-courses-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #165493 0%, #1e6aab 100%);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(22, 84, 147, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teacher-courses-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 84, 147, 0.3);
}

.teacher-section {
  background: #fff;
  border-radius: 20px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(22, 84, 147, 0.08);
  box-shadow: 0 6px 24px rgba(14, 60, 106, 0.07);
}

.teacher-section h3 {
  font-family: "EasaFalaGalan", "Faruma", Arial, sans-serif;
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: normal;
  color: #165493;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(22, 84, 147, 0.12);
}

.teacher-bio {
  color: #3a4a5e;
  font-size: clamp(16px, 1.85vw, 18px);
  line-height: 2.15;
  margin: 0 0 1.2em;
  text-align: justify;
}

.teacher-bio:last-child {
  margin-bottom: 0;
}

.team-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef4fa 0%, #e2ebf5 100%);
  font-family: "EasaFalaGalan", "Faruma", Arial, sans-serif;
  font-size: 3rem;
  color: rgba(22, 84, 147, 0.35);
}

.team-teacher-link {
  margin-bottom: 0;
}

.team-teacher-note {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(22, 84, 147, 0.12);
  font-size: 15px;
  line-height: 1.7;
}

.team-teacher-note a {
  color: #165493;
  text-decoration: none;
}

.team-teacher-note a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .teacher-hero {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .teacher-head {
    text-align: center;
  }

  .teacher-subjects {
    justify-content: center;
  }
}

@media (max-width: 960px) {
  .about-stats-row {
    grid-template-columns: 1fr;
  }

  .about-team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-hero-heading {
    top: 7%;
    left: 50%;
    transform: translateX(-50%);
  }

  .about-hero-heading img {
    width: clamp(130px, 32vw, 220px);
  }
}

@media (max-width: 560px) {
  .about-team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .about-person figcaption {
    font-size: 14px;
  }

  .about-hero-heading {
    top: 6%;
    left: 50%;
    transform: translateX(-50%);
  }

  .about-hero-heading img {
    width: clamp(110px, 38vw, 170px);
  }
}

@media (max-width: 768px) {
  body.about-page .content,
  body.about-page main.content {
    margin-right: 0;
    max-width: 100%;
    width: 100%;
    padding: 16px 12px 32px;
    overflow-x: hidden;
  }

  .about-hero-banner img {
    transform: none;
  }

  .about-hero-heading {
    top: 7%;
    left: 50%;
    transform: translateX(-50%);
  }

  @keyframes aboutHeadIn {
    from {
      opacity: 0;
      transform: translateX(calc(-50% + 20px));
    }
    to {
      opacity: 1;
      transform: translateX(-50%);
    }
  }

  .about-card p {
    font-size: 16px;
    line-height: 2;
  }

  .about-story {
    gap: 18px;
    margin-bottom: 32px;
  }
}
