/* SWA School — Fun 3D learning UI */

.school-hero {
  position: relative;
  overflow: hidden;
}

.school-hero-3d {
  position: absolute;
  right: clamp(1rem, 6vw, 5rem);
  bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  z-index: 1;
  pointer-events: none;
}

.school-hero-3d img {
  width: clamp(72px, 10vw, 120px);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}

.school-hero-3d img:nth-child(2) {
  width: clamp(96px, 13vw, 150px);
}

.school-hero-3d:hover img:nth-child(2) {
  transform: translateY(-6px);
}

.school-hero .swa-container {
  position: relative;
  z-index: 2;
}

/* 3D grade cards */
.school-grades {
  perspective: 1400px;
}

.school-grade-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.2s;
  overflow: hidden;
}

.school-grade-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(34, 130, 58, 0.06), transparent 42%);
  pointer-events: none;
}

.school-grade-card:hover {
  transform: translateY(-8px) rotateX(4deg) rotateY(-3deg);
  box-shadow:
    0 24px 50px rgba(15, 40, 25, 0.14),
    0 0 0 1px rgba(34, 130, 58, 0.2);
}

.school-grade-card .grade-3d {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 0 0.35rem;
  filter: drop-shadow(0 12px 18px rgba(34, 130, 58, 0.25));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.school-grade-card:hover .grade-3d {
  transform: translateZ(40px) scale(1.08) rotate(-6deg);
}

.school-grade-card .fun-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(34, 130, 58, 0.1);
  color: #145524;
  width: fit-content;
}

.school-grade-card.is-complete {
  border-color: #22823a;
  background: linear-gradient(165deg, #f3fbf6, #fff);
}

.school-grade-card.is-complete .fun-badge {
  background: #22823a;
  color: #fff;
}

.school-grade-card .mini-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(34, 130, 58, 0.12);
  overflow: hidden;
  margin-top: 0.35rem;
}

.school-grade-card .mini-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1a6b2e, #3ecf6a);
  border-radius: inherit;
}

/* Lesson callouts */
.lesson-callout {
  margin: 1.1rem 0;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(34, 130, 58, 0.18);
  background: linear-gradient(135deg, rgba(34, 130, 58, 0.07), rgba(255, 255, 255, 0.9));
}

.lesson-callout.try {
  background: linear-gradient(135deg, rgba(46, 168, 85, 0.12), #fff);
  border-color: rgba(46, 168, 85, 0.3);
}

.lesson-callout.warn {
  background: linear-gradient(135deg, rgba(200, 120, 40, 0.1), #fff);
  border-color: rgba(200, 120, 40, 0.28);
}

.lesson-callout strong.label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #22823a;
  margin-bottom: 0.35rem;
}

.lesson-callout.warn strong.label {
  color: #a05a12;
}

/* Lesson page 3D */
.school-main {
  position: relative;
  overflow: hidden;
}

.lesson-3d-float {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 88px;
  height: 88px;
  opacity: 0.9;
  filter: drop-shadow(0 14px 22px rgba(34, 130, 58, 0.28));
  animation: none;
  pointer-events: none;
}

.school-main .lesson-body {
  position: relative;
  z-index: 1;
}

.school-cta-band {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(125, 206, 160, 0.35), transparent 50%),
    linear-gradient(125deg, #145524, #22823a 60%, #2ea855);
  color: #fff;
  border-radius: 24px;
  margin: 2rem auto 3rem;
  max-width: min(1280px, 92%);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(34, 130, 58, 0.25);
}

.school-cta-band img.cta-3d {
  position: absolute;
  right: 1.5rem;
  bottom: -0.5rem;
  width: 140px;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.3));
  animation: none;
}

/* Dashboard study 3D */
.study-path-item .spath-3d {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(34, 130, 58, 0.25));
}

.types-grid a img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 8px 14px rgba(34, 130, 58, 0.22));
  transition: transform 0.25s ease;
}

.types-grid a:hover img {
  transform: translateY(-4px) scale(1.08) rotate(-4deg);
}

.study-hero-art {
  display: flex;
  gap: 0.25rem;
  align-items: flex-end;
}

.study-hero-art img {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.25));
  animation: none;
}

.study-hero-art img:nth-child(2) {
  width: 72px;
  height: 72px;
  animation-delay: 0.35s;
}

@media (max-width: 800px) {
  .school-hero-3d {
    opacity: 0.35;
    right: 0.25rem;
  }
  .lesson-3d-float {
    width: 56px;
    height: 56px;
    opacity: 0.55;
  }
  .school-cta-band img.cta-3d {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .school-hero-3d img,
  .lesson-3d-float,
  .school-cta-band img.cta-3d,
  .study-hero-art img {
    animation: none;
  }
  .school-grade-card:hover {
    transform: translateY(-4px);
  }
}
