/* ==========================================================================
   DAATA MARKETING V3 — SECTION 04: GRADES & ASSESSMENTS (04-grades)
   High-end SaaS aesthetic: Photorealistic Angled Monitor Mockup + 
   3D Glassmorphism Cards + Ambient Blue Glow + Floating Depth
   ========================================================================== */

/* Main Section Row Overrides */
.grades-feature-row {
  position: relative;
  margin-block: clamp(70px, 9vw, 130px);
}

/* Feature Stage Wrapper */
.grades-stage-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.grades-stage-cluster {
  position: relative;
  width: 100%;
  max-width: 740px;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient Backdrops: Radiant Blue Halo & Glowing Arc */
.grades-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(10, 166, 216, 0.22) 0%, rgba(9, 121, 189, 0.08) 50%, transparent 75%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}

.grades-glow-arc {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 660px;
  height: auto;
  opacity: 0.85;
  filter: drop-shadow(0 0 24px rgba(10, 166, 216, 0.55));
  pointer-events: none;
  z-index: 1;
  animation: arcPulse 7s ease-in-out infinite alternate;
}

@keyframes arcPulse {
  0% {
    opacity: 0.72;
    transform: translateX(-50%) scale(0.98);
  }
  100% {
    opacity: 0.95;
    transform: translateX(-50%) scale(1.02);
  }
}

/* ==========================================================================
   Photorealistic Angled Monitor Mockup
   ========================================================================== */
.grades-monitor-wrapper {
  position: relative;
  width: 100%;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.grades-monitor-wrapper:hover {
  transform: translateY(-6px) scale(1.015);
}

.grades-monitor-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 60px rgba(8, 36, 68, 0.24));
  transition: filter 0.4s ease;
}

.grades-monitor-wrapper:hover .grades-monitor-img {
  filter: drop-shadow(0 38px 75px rgba(8, 36, 68, 0.32));
}

/* ==========================================================================
   Floating 3D Glass Cards (Glassmorphism & Depth)
   ========================================================================== */
.grades-glass-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--daata-radius-md, 14px);
  box-shadow: 
    0 16px 36px rgba(8, 36, 68, 0.18),
    0 4px 12px rgba(9, 121, 189, 0.12);
  z-index: 10;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  pointer-events: auto;
}

.grades-glass-card:hover {
  animation-play-state: paused;
  transform: translateY(-8px) scale(1.05) !important;
  box-shadow: 
    0 24px 50px rgba(8, 36, 68, 0.26),
    0 8px 20px rgba(9, 121, 189, 0.22);
}

/* Card 1: Growth Trend Metric (Top-Left / Floating) */
.grades-card-trend {
  top: -20px;
  left: -20px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  max-width: 260px;
  animation: gradesFloatTrend 6.5s ease-in-out infinite;
}

.trend-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.38);
}

.trend-badge-icon svg {
  width: 22px;
  height: 22px;
}

.trend-content {
  display: flex;
  flex-direction: column;
}

.trend-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.trend-num {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--daata-navy-deep, #082444);
  line-height: 1.1;
}

.trend-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: #059669;
  background: #eafaf1;
  padding: 2px 7px;
  border-radius: 999px;
}

.trend-desc {
  font-size: 0.78rem;
  color: var(--daata-text-body, #3c5a73);
  font-weight: 500;
  margin-top: 2px;
}

/* Card 2: Educational Assessment Quote (Bottom-Right Floating) */
.grades-card-eval {
  bottom: -25px;
  right: -15px;
  padding: 16px 20px;
  max-width: 320px;
  animation: gradesFloatEval 7.2s ease-in-out infinite 0.8s;
}

.eval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.eval-tag {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--daata-brand-blue, #0979bd);
  background: var(--daata-sky-light, #e9f6ff);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(10, 166, 216, 0.24);
}

.eval-date {
  font-size: 0.72rem;
  color: var(--daata-text-muted, #648299);
  font-weight: 600;
}

.eval-quote {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--daata-navy-deep, #082444);
  line-height: 1.45;
  margin: 0 0 10px 0;
  font-style: normal;
}

.eval-student {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(11, 45, 85, 0.08);
  padding-top: 8px;
}

.student-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--daata-brand-cyan, #0aa6d8) 0%, var(--daata-brand-blue, #0979bd) 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.student-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--daata-navy, #0b2d55);
}

/* Floating Animations */
@keyframes gradesFloatTrend {
  0%, 100% {
    transform: translateY(0px) rotate(-1.5deg);
  }
  50% {
    transform: translateY(-8px) rotate(-0.5deg);
  }
}

@keyframes gradesFloatEval {
  0%, 100% {
    transform: translateY(0px) rotate(1.2deg);
  }
  50% {
    transform: translateY(-9px) rotate(2deg);
  }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .grades-stage-cluster {
    max-width: 580px;
    min-height: 420px;
  }
  .grades-card-trend {
    top: -15px;
    left: -10px;
    padding: 10px 14px;
    max-width: 220px;
  }
  .grades-card-eval {
    bottom: -18px;
    right: -10px;
    max-width: 280px;
    padding: 12px 16px;
  }
}

@media (max-width: 768px) {
  .grades-feature-row {
    margin-block: 50px;
  }
  /* בנייד: המסך ברוחב מלא, והכרטיסים מתחתיו — במקום שהכרטיסים יכווצו את המסך לתמונה זעירה */
  .grades-stage-cluster {
    min-height: auto;
    margin-top: 20px;
    flex-direction: column;
    align-items: stretch;
  }
  .grades-monitor-wrapper {
    width: 100%;
    order: -1;
  }
  .grades-card-trend,
  .grades-card-eval {
    width: 100%;
    box-sizing: border-box;
  }
  .grades-card-trend {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 16px;
    max-width: 100%;
    animation: none;
  }
  .grades-card-eval {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 16px;
    max-width: 100%;
    animation: none;
  }
}
