/* Oxford Centers — premium landing overlay (3D hero + branches + teachers) */

/* —— Hero split + 3D showcase —— */
.hero.has-showcase > .container {
  width: min(1200px, 94%);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: end;
  width: 100%;
}

@media (min-width: 960px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1rem, 3vw, 2.5rem);
    align-items: center;
    min-height: calc(100svh - var(--nav-h) - 2rem);
  }
  .hero-inner {
    max-width: none;
  }
}

.hero-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
  perspective: 1100px;
}

.hero-orbs {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orbs span:nth-child(1) {
  width: 180px;
  height: 180px;
  top: 10%;
  inset-inline-start: 5%;
  background: var(--emerald-glow);
  animation-delay: 0s;
}

.hero-orbs span:nth-child(2) {
  width: 140px;
  height: 140px;
  bottom: 15%;
  inset-inline-end: 8%;
  background: var(--accent-glow, rgba(201, 162, 39, 0.35));
  animation-delay: -3s;
}

.hero-orbs span:nth-child(3) {
  width: 100px;
  height: 100px;
  top: 45%;
  inset-inline-end: 30%;
  background: rgba(255, 255, 255, 0.12);
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.08); }
}

.hero-logo-stage {
  position: relative;
  z-index: 2;
  width: min(340px, 78vw);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  animation: logoFloat 7s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: rotateY(-14deg) rotateX(8deg) translateY(0); }
  50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-12px); }
}

.hero-logo-card {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  padding: 2rem;
  cursor: zoom-in;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
}
.hero-logo-card:hover {
  transform: scale(1.03);
  box-shadow:
    0 40px 72px rgba(0, 0, 0, 0.4),
    0 0 32px var(--accent-glow, rgba(201, 162, 39, 0.35));
}

.hero-logo-card img {
  width: min(220px, 70%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

.hero-logo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 32px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--emerald-light), var(--accent-color, var(--emerald-soft)), var(--emerald)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  animation: ringPulse 4s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.hero-badge-float {
  position: absolute;
  z-index: 3;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.hero-badge-float.b1 { top: 8%; inset-inline-end: -4%; animation: badgeBob 5s ease-in-out infinite; }
.hero-badge-float.b2 { bottom: 12%; inset-inline-start: -6%; animation: badgeBob 5s ease-in-out -2s infinite; }

@keyframes badgeBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* —— Center switch pills —— */
.center-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.center-switch a {
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.center-switch a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.center-switch a.is-active {
  background: linear-gradient(145deg, var(--emerald-light), var(--emerald));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px var(--emerald-glow);
}

/* —— About platform —— */
.about-platform {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  background: linear-gradient(180deg, #fff, var(--paper));
}

.about-platform-lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #334155;
  font-weight: 700;
}

.about-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.about-platform-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
  transform-style: preserve-3d;
}

.about-platform-card:hover {
  transform: translateY(-8px) rotateX(3deg);
  box-shadow: var(--shadow-lg);
}

.about-platform-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--emerald);
}

.about-platform-card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.65;
}

.about-platform-card a {
  font-weight: 900;
  color: var(--emerald);
}

/* —— Teachers —— */
.teachers-section {
  background: linear-gradient(180deg, var(--paper-2), #fff);
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  perspective: var(--perspective);
}

.teacher-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: var(--shadow-md);
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
  opacity: 0;
  transform: translateY(18px);
}

.teacher-card.in {
  opacity: 1;
  transform: none;
}

.teacher-card:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(-3deg);
  box-shadow: var(--shadow-lg), 0 0 0 2px rgba(5, 150, 105, 0.1);
}

.teacher-card .photo-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: linear-gradient(145deg, var(--paper-2), #e2e8f0);
}

.teacher-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-card h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--ink-soft);
}

.teacher-card p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

/* —— Nav logo —— */
.nav-brand-mark {
  overflow: hidden;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.nav-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

/* —— Mobile hero showcase —— */
@media (max-width: 700px) {
  .hero-showcase {
    min-height: 200px;
    margin-top: var(--nav-h);
  }
  .hero-logo-stage {
    width: min(260px, 72vw);
  }
  .hero-badge-float { display: none; }
  .center-switch { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-stage,
  .hero-orbs span,
  .hero-logo-ring,
  .hero-badge-float { animation: none !important; }
}

.branch-active {
  border-color: rgba(5, 150, 105, 0.35) !important;
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--emerald-glow-soft) !important;
}

/* —— Center switch label —— */
.center-switch-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.65);
  padding-inline-end: 0.35rem;
}

/* —— Branch map + actions —— */
.branch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.branch-map {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.86rem;
}
.branch-map:hover { color: var(--emerald); }

/* —— Lightbox nav —— */
.lb-close {
  border: 0;
  cursor: pointer;
  z-index: 2;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.lb-prev { inset-inline-start: max(1rem, env(safe-area-inset-left)); }
.lb-next { inset-inline-end: max(1rem, env(safe-area-inset-right)); }
.lb-count {
  position: absolute;
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 2;
}
.lb-caption {
  position: absolute;
  bottom: max(3.2rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  max-width: min(92vw, 640px);
  text-align: center;
  padding: 0.45rem 0.9rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 2;
}

/* —— 3D Gallery —— */
.gallery-premium {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  overflow: hidden;
}
.gallery-3d {
  position: relative;
  height: 360px;
  margin: 1.2rem auto 0;
  max-width: 920px;
  display: grid;
  place-items: center;
}
.gallery-halo {
  position: absolute;
  inset: 18% 8%;
  border-radius: 50%;
  border: 1px dashed rgba(5, 150, 105, 0.35);
  box-shadow: 0 0 40px rgba(5, 150, 105, 0.1) inset;
  animation: ox-gallery-halo 18s linear infinite;
  pointer-events: none;
}
.gallery-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: ox-gallery-orbit 26s linear infinite;
}
.gallery-orbit b {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  font-weight: inherit;
  transform: rotate(var(--a)) translateY(-168px);
}
.gallery-orbit span {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--emerald);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(5, 150, 105, 0.35);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  animation: ox-gallery-orbit-fix 26s linear infinite;
}
.gallery-stage {
  width: 100%;
  height: 100%;
  perspective: 1100px;
  perspective-origin: 50% 46%;
}
.gallery-ring {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: ox-gallery-spin 32s linear infinite;
}
.gallery-3d:hover .gallery-ring,
.gallery-3d:hover .gallery-halo,
.gallery-3d:hover .gallery-orbit {
  animation-play-state: paused;
}
.gallery-ring figure {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  width: 210px;
  height: 140px;
  transform:
    translate(-50%, -50%)
    rotateY(calc(var(--i) * 360deg / var(--n, 8)))
    translateZ(var(--r, 340px));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  background: #dbe4ee;
  backface-visibility: hidden;
  cursor: zoom-in;
}
.gallery-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-grid-mobile { display: none; }
.gallery-grid-mobile figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
}
.gallery-grid-mobile img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.gallery-grid-mobile figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  background: #fff;
}
.gallery-cta {
  text-align: center;
  margin-top: 1.35rem;
}
@keyframes ox-gallery-spin { to { transform: rotateY(-360deg); } }
@keyframes ox-gallery-halo { to { transform: rotate(360deg); } }
@keyframes ox-gallery-orbit { to { transform: rotate(-360deg); } }
@keyframes ox-gallery-orbit-fix { to { transform: rotate(360deg); } }

/* —— Oxford premium extras —— */
.is-oxford .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(212, 175, 55, 0.45), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(212, 175, 55, 0.35), transparent);
  background-size: 200% 200%;
  animation: oxSparkle 12s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes oxSparkle {
  0%, 100% { background-position: 0% 0%; opacity: 0.45; }
  50% { background-position: 100% 100%; opacity: 0.75; }
}
.is-oxford .hero-logo-ring {
  animation: ringPulse 4s ease-in-out infinite, oxGoldShimmer 6s linear infinite;
}
@keyframes oxGoldShimmer {
  0%, 100% { filter: hue-rotate(0deg) brightness(1); }
  50% { filter: hue-rotate(8deg) brightness(1.12); }
}
.is-oxford .stat-card {
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
}
.is-oxford .stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg), 0 0 24px var(--emerald-glow-soft);
}
.is-oxford .testimonial {
  transition: transform 0.4s var(--ease);
}
.is-oxford .testimonial:hover {
  transform: translateY(-8px) rotateX(2deg);
}
@media (max-width: 700px) {
  .gallery-3d { display: none; }
  .gallery-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
  }
}
@media (max-width: 380px) {
  .gallery-grid-mobile { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-ring, .gallery-halo, .gallery-orbit,
  .is-oxford .hero::after, .is-oxford .hero-logo-ring {
    animation: none !important;
  }
  .gallery-3d { height: auto; }
  .gallery-stage { perspective: none; }
  .gallery-ring {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
    height: auto;
  }
  .gallery-ring figure {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 46%;
    height: 120px;
  }
  .gallery-halo, .gallery-orbit { display: none; }
}
