/* Portrait photos — face on right side of source image */
.img-portrait {
  object-fit: cover;
  object-position: right 22%;
}

/* ===== Hero Slider ===== */
.hero-slider {
  position: relative;
  min-height: 72vh;
  max-height: 620px;
  overflow: hidden;
  background: var(--navy);
}
.hero-slider__track {
  display: flex;
  height: 100%;
  min-height: 72vh;
  max-height: 620px;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 72vh;
  max-height: 620px;
  display: flex;
  align-items: center;
}
.hero-slide__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(15,31,58,0.92) 0%, rgba(15,31,58,0.75) 45%, rgba(15,31,58,0.35) 100%);
  z-index: 1;
}
.hero-slide__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3.25rem 0 2.5rem;
}
.hero-slide__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-slide__text h1,
.hero-slide__text h2 {
  color: var(--white);
  margin-bottom: 0.75rem;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}
.hero-slide__text h1 .text-gold,
.hero-slide__text h2 .text-gold { color: var(--gold); }
.hero-slide__text .tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  max-width: 540px;
}
.hero-slide__visual {
  display: flex;
  justify-content: center;
}
.hero-slide .hero-badges {
  margin-bottom: 1rem;
}
.hero-slide .hero-actions {
  gap: 0.85rem;
}
.hero-profile-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  backdrop-filter: blur(12px);
  max-width: 300px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}
.hero-profile-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: right 22%;
  display: block;
}
.hero-profile-card img.img-landscape {
  height: 200px;
  object-position: center center;
}
.hero-profile-card__body {
  padding: 1.15rem 1.25rem;
  text-align: center;
}
.hero-profile-card__body h3 { color: var(--white); margin-bottom: 0.25rem; }
.hero-profile-card__body p { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

.hero-slider__nav {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-slider__dots { display: flex; gap: 0.5rem; }
.hero-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}
.hero-slider__dot.active,
.hero-slider__dot:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.15);
}
.hero-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-slider__arrow:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.hero-slider__arrow--prev { left: 1.25rem; }
.hero-slider__arrow--next { right: 1.25rem; }

@media (min-width: 1200px) {
  .hero-slider,
  .hero-slider__track,
  .hero-slide {
    min-height: 68vh;
    max-height: 580px;
  }
  .hero-slide__content {
    padding: 2.75rem 0 2.25rem;
  }
}

@media (max-width: 900px) {
  .hero-slider,
  .hero-slider__track,
  .hero-slide {
    min-height: auto;
    max-height: none;
  }
  .hero-slide__content {
    padding: 4rem 0 3rem;
  }
  .hero-slide__grid { grid-template-columns: 1fr; text-align: center; }
  .hero-slide__text .tagline { margin-left: auto; margin-right: auto; }
  .hero-badges, .hero-actions { justify-content: center; }
  .hero-slide__visual { order: -1; }
  .hero-profile-card { max-width: 260px; margin: 0 auto; }
  .hero-profile-card img { height: 280px; object-position: right 18%; }
  .hero-slider__arrow { display: none; }
  .split-section__image img { min-height: 380px; object-position: right 18%; }
}

/* ===== Split Section (image + text) ===== */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split-section--reverse .split-section__image { order: 2; }
.split-section--reverse .split-section__content { order: 1; }
.split-section__image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  margin: 0 auto;
}
.split-section__image img {
  width: 100%;
  height: auto;
  min-height: 420px;
  max-height: 520px;
  object-fit: cover;
  object-position: right 22%;
  display: block;
}
.split-section__image--landscape img {
  min-height: 320px;
  max-height: 400px;
  object-position: center center;
}
.split-section__image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  opacity: 0.35;
  pointer-events: none;
}
.split-section__badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  background: var(--gold);
  color: var(--navy);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
}
.split-section__content h2 { margin-bottom: 1rem; }
.split-section__content p {
  color: var(--grey-dark);
  margin-bottom: 1rem;
  font-size: 1.02rem;
}
.split-section__list {
  list-style: none;
  margin: 1.5rem 0;
}
.split-section__list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  color: var(--charcoal);
  font-size: 0.95rem;
}
.split-section__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

@media (max-width: 900px) {
  .split-section,
  .split-section--reverse { grid-template-columns: 1fr; }
  .split-section--reverse .split-section__image,
  .split-section--reverse .split-section__content { order: unset; }
}

/* ===== Spotlight Banner ===== */
.spotlight-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 3rem;
  min-height: 280px;
  display: flex;
  align-items: center;
}
.spotlight-banner__bg {
  position: absolute;
  inset: 0;
}
.spotlight-banner__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spotlight-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,31,58,0.95) 0%, rgba(15,31,58,0.6) 60%, transparent 100%);
}
.spotlight-banner__content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  max-width: 560px;
  color: var(--white);
}
.spotlight-banner__content .section-label { color: var(--gold); }
.spotlight-banner__content h2 { color: var(--white); margin: 0.5rem 0 1rem; }
.spotlight-banner__content p { opacity: 0.9; margin-bottom: 1.5rem; }

/* ===== Course Cards with Image ===== */
.course-card-img {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--grey);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-self: stretch;
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 300px;
}
.course-card-img:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.course-card-img__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  flex-shrink: 0;
}
.course-card-img__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.course-card-img:hover .course-card-img__thumb img { transform: scale(1.06); }
.course-card-img__tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
}
.course-card-img__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}
.course-card-img__top {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.course-card-img__body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
  min-height: 2.6em;
}
.course-card-img__meta {
  min-height: 2.75rem;
  margin-bottom: 0.5rem;
}
.course-card-img__meta .card-meta {
  margin-bottom: 0.25rem;
}
.course-card-img__desc {
  color: var(--grey-dark);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.55em * 4);
}
.course-card-img__footer {
  margin-top: auto;
  padding-top: 0.25rem;
  border-top: 1px solid var(--grey);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.course-card-img__footer .card-price {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
}
.course-card-img__footer .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* ===== Courses Grid (homepage) ===== */
.courses-grid-wrap {
  width: 100%;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  margin: 0 auto 2rem;
  max-width: 100%;
  box-sizing: border-box;
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}
.courses-grid > .course-card-img {
  height: 100%;
}

/* ===== Courses Slider (legacy) ===== */
.courses-slider-wrap { position: relative; }
.courses-slider {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 0 1.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.courses-slider::-webkit-scrollbar { display: none; }
.courses-slider > .course-card-img {
  scroll-snap-align: start;
}
.courses-slider-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.courses-slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--grey);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition);
}
.courses-slider-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ===== Testimonials Slider ===== */
.testimonials-slider-section {
  position: relative;
  background: var(--white);
}
.testimonials-slider-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: url('../images/home/testimonial-bg.svg') center/cover no-repeat;
  opacity: 0.5;
}
.testimonials-slider {
  position: relative;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}
.testimonials-slider__track {
  display: flex;
  transition: transform 0.5s ease;
}
.testimonial-slide {
  flex: 0 0 100%;
  padding: 0 1rem;
}
.testimonial-slide__card {
  background: var(--cream);
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
}
.testimonial-slide__card::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.25;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}
.testimonial-slide__card blockquote {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 2rem 0 1.5rem;
  color: var(--charcoal);
}
.testimonial-slide__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--gold);
}
.testimonials-slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.testimonials-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grey);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}
.testimonials-slider__dot.active {
  background: var(--gold);
  width: 24px;
  border-radius: 4px;
}

/* ===== Blog with image ===== */
.blog-card-img {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--grey);
  transition: all var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog-card-img:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-card-img__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card-img:hover .blog-card-img__thumb img { transform: scale(1.05); }
.blog-card-img__body { padding: 1.5rem; flex: 1; }

/* ===== USP with icons ===== */
.usp-card-enhanced {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
  height: 100%;
}
.usp-card-enhanced:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.usp-card-enhanced__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gold);
  border: 2px solid rgba(201,162,39,0.3);
}
.usp-card-enhanced h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.usp-card-enhanced p { color: var(--grey-dark); font-size: 0.92rem; }

/* ===== Stats enhanced ===== */
.stats-bar--home {
  margin-top: -2.5rem;
  position: relative;
  z-index: 5;
  padding: 0 1.25rem;
}
.stats-bar--home .container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  border: 1px solid var(--grey);
}

/* ===== Student notes screenshot chain ===== */
.student-notes-section {
  background: var(--off-white, #f7f5f1);
  overflow: hidden;
}
.student-notes-chain {
  position: relative;
  margin-top: 0.5rem;
}
.student-notes-chain__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  padding: 0.5rem 0 1.25rem;
}
.student-notes-chain__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}
.student-notes-chain__viewport::-webkit-scrollbar {
  height: 6px;
}
.student-notes-chain__viewport::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 999px;
}
.student-notes-chain__track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  padding: 0 max(1.25rem, calc((100vw - 1100px) / 2 + 1.25rem));
}
.student-notes-chain__item {
  margin: 0;
  flex: 0 0 auto;
  width: min(240px, 72vw);
  scroll-snap-align: start;
}
.student-notes-chain__item--chat {
  width: min(200px, 68vw);
}
.student-notes-chain__item--pdf {
  width: min(260px, 78vw);
}
.student-notes-chain__frame {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(26, 39, 68, 0.12);
  border: 1px solid rgba(26, 39, 68, 0.08);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.student-notes-chain__frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(26, 39, 68, 0.16);
}
.student-notes-chain__frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #e8e4dc;
}
.student-notes-chain__item--chat .student-notes-chain__frame img {
  aspect-ratio: 9 / 16;
}
.student-notes-chain__item--pdf .student-notes-chain__frame img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #f1f5f9;
}
.student-notes-chain__item figcaption {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.15rem;
}
.student-notes-chain__type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}
.student-notes-chain__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}
.student-notes-chain__caption {
  font-size: 0.82rem;
  color: var(--grey-dark);
  line-height: 1.4;
}
.student-notes-chain__nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--grey);
  background: var(--white);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow, 0 4px 14px rgba(0,0,0,0.08));
  display: none;
}
.student-notes-chain__nav--prev { left: 0.75rem; }
.student-notes-chain__nav--next { right: 0.75rem; }
@media (min-width: 900px) {
  .student-notes-chain__nav { display: grid; place-items: center; }
  .student-notes-chain__nav[hidden] { display: none; }
}
.student-notes-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.student-notes-lightbox[hidden] { display: none; }
.student-notes-lightbox img {
  max-width: min(920px, 100%);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.student-notes-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
