/* Global Variables & Reset */
:root {
  --primary-color: #ee6a24;
  --primary-hover: #d65818;
  --primary-rgb: 238, 106, 36;
  --accent-color: #FFD6BF;
  --bg-light: #FFF8F3;
  --text-dark: #1F2937;
  --text-muted: #4B5563;
  --white: #FFFFFF;
  
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-shadow: 0 25px 60px -15px rgba(238, 106, 36, 0.1), 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  
  --input-bg: rgba(255, 255, 255, 0.65);
  --input-border: rgba(31, 41, 55, 0.12);
  --input-focus-border: #ee6a24;
  
  --error-color: #ef4444;
  --success-color: #10b981;
  
  --font-arabic: 'Cairo', sans-serif;
  --font-english: 'Poppins', sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Decoration */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
  animation: blobFloat 40s infinite alternate ease-in-out;
}

.blob-orange {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(238,106,36,0.3) 0%, rgba(238,106,36,0) 70%);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.blob-peach {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,214,191,0.5) 0%, rgba(255,214,191,0) 70%);
  bottom: -15%;
  left: -15%;
  animation-delay: -5s;
}

/* Background floating icons */
.floating-icon {
  position: absolute;
  color: var(--primary-color);
  opacity: 0.05;
  font-size: 2rem;
  pointer-events: none;
  animation: itemFloat 12s infinite ease-in-out;
}

.custom-font-icon {
  font-family: var(--font-english);
  font-weight: 700;
}

.icon-1 { top: 12%; left: 8%; animation-delay: 0s; font-size: 2.5rem; }
.icon-2 { top: 75%; left: 12%; animation-delay: -2s; font-size: 2.2rem; }
.icon-3 { top: 22%; right: 10%; animation-delay: -4s; }
.icon-4 { top: 82%; right: 8%; animation-delay: -6s; font-size: 2.8rem; }
.icon-5 { top: 48%; left: 5%; animation-delay: -8s; }
.icon-6 { top: 50%; right: 4%; animation-delay: -10s; font-size: 2.4rem; }
.icon-7 { top: 8%; right: 25%; animation-delay: -3s; font-size: 2.2rem; }
.icon-8 { top: 88%; left: 35%; animation-delay: -7s; font-size: 2rem; }

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-30px, 50px) scale(0.9); }
}

@keyframes itemFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(15deg); }
}

/* Page Layout Container */
.page-container {
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Premium Main Card */
.registration-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  box-shadow: var(--glass-shadow);
  width: 100%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  overflow: hidden;
  
  /* Page load animations */
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  animation: cardEntry 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.registration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color) 0%, #ff803b 50%, var(--accent-color) 100%);
  z-index: 10;
}

@keyframes cardEntry {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card Header (Logo and Titles) */
.card-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
}

.logo-wrapper {
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
  border: none;
}

.logo-wrapper:hover {
  transform: scale(1.06) rotate(-3deg);
}

.academy-logo {
  height: 95px;
  width: auto;
  object-fit: contain;
}

.header-title {
  font-family: var(--font-english);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-dark) 30%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.header-subtitle {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
}

.highlight-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff803b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  display: inline-block;
}

.header-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.6;
  font-weight: 500;
}

/* Card Body Layout */
.card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 480px;
}

/* Left Column: Teacher Image & Animation container */
.teacher-column {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
  
  /* Load Animation */
  opacity: 0;
  transform: translateX(-40px);
  animation: slideFromLeft 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes slideFromLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.illustration-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.teacher-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  z-index: 2;
  position: relative;
  filter: drop-shadow(0 15px 30px rgba(238, 106, 36, 0.15));
  animation: teacherFloat 6s ease-in-out infinite;
}

@keyframes teacherFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Canvas Particles behind teacher */
.particles-canvas {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  z-index: 1;
  pointer-events: none;
}

/* Behind Shapes */
.shape {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.shape-circle {
  top: 10%;
  left: 5%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-color) 0%, rgba(255, 214, 191, 0.15) 75%);
  filter: blur(15px);
  animation: rotateShape 20s linear infinite;
}

.shape-dots {
  bottom: 10%;
  right: 5%;
  width: 100px;
  height: 100px;
  background-image: radial-gradient(var(--primary-color) 20%, transparent 20%);
  background-size: 16px 16px;
  opacity: 0.15;
  border-radius: 8px;
}

.shape-ring {
  top: -5%;
  right: 15%;
  width: 70px;
  height: 70px;
  border: 4px dashed rgba(238, 106, 36, 0.18);
  border-radius: 50%;
  animation: rotateShape 25s linear infinite;
}

@keyframes rotateShape {
  to { transform: rotate(360deg); }
}

/* Right Column: Form Container */
.form-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
  
  /* Load Animation */
  opacity: 0;
  transform: translateX(40px);
  animation: slideFromRight 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes slideFromRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.registration-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-right: 4px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 16px;
  background-color: var(--input-bg);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
}

.input-icon {
  position: absolute;
  right: 16px;
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
  transition: var(--transition-fast);
}

.form-input {
  width: 100%;
  padding: 16px 48px 16px 20px; /* Padding-right covers the icon */
  border: 1.5px solid var(--input-border);
  border-radius: 16px;
  background: transparent;
  color: var(--text-dark);
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  appearance: none;
  transition: var(--transition-fast);
}

/* Custom Dropdown select formatting */
.form-select {
  padding-left: 45px;
  cursor: pointer;
  background-color: transparent;
}

.form-select option {
  background-color: #ffffff;
  color: var(--text-dark);
  font-weight: 600;
  padding: 12px;
}

.select-chevron {
  position: absolute;
  left: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* Focus glow-border overlay */
.focus-glow-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 1.5px solid var(--primary-color);
  box-shadow: 0 0 12px rgba(238, 106, 36, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.99);
  transition: var(--transition-smooth);
}

/* Focus and input interaction styles */
.form-input:focus ~ .focus-glow-border {
  opacity: 1;
  transform: scale(1);
}

.form-input:focus {
  border-color: transparent;
}

.form-input:focus ~ .input-icon,
.input-wrapper:focus-within .select-chevron {
  color: var(--primary-color);
  transform: scale(1.08);
}

/* Animated Border Glow for validation state */
.form-group.has-error .input-wrapper {
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.form-group.has-error .form-input {
  border-color: var(--error-color);
}

.form-group.has-error .input-icon {
  color: var(--error-color);
}

.form-group.has-success .form-input {
  border-color: var(--success-color);
}

.form-group.has-success .input-icon {
  color: var(--success-color);
}

/* Error messages styling */
.error-message {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--error-color);
  display: flex;
  align-items: center;
  gap: 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group.has-error .error-message {
  max-height: 40px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 4px;
}

/* CTA Button Styling */
.btn-submit {
  position: relative;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff803b 100%);
  border: none;
  border-radius: 16px;
  color: var(--white);
  font-family: var(--font-arabic);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(238, 106, 36, 0.3);
  transition: var(--transition-smooth);
  
  /* Initial pulse animation on load */
  animation: idlePulse 4s infinite ease-in-out;
}

.btn-submit:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 30px rgba(238, 106, 36, 0.42);
}

.btn-submit:active {
  transform: translateY(-1px) scale(0.99);
}

/* Shiny hover sweep effect */
.btn-shine {
  position: absolute;
  top: 0;
  right: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
  pointer-events: none;
}

.btn-submit:hover .btn-shine {
  animation: shineSweep 1s ease-out;
}

/* Button ripple canvas element */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: buttonRipple 0.6s linear;
  pointer-events: none;
}

@keyframes buttonRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes shineSweep {
  0% { right: -100%; }
  100% { right: 150%; }
}

@keyframes idlePulse {
  0%, 100% {
    box-shadow: 0 10px 24px rgba(238, 106, 36, 0.3);
  }
  50% {
    box-shadow: 0 10px 30px rgba(238, 106, 36, 0.5);
    transform: scale(1.015);
  }
}

/* Footer Section inside Card */
.card-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.08);
  padding-top: 24px;
  text-align: center;
}

.footer-text {
  font-family: var(--font-english);
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.8;
  font-weight: 500;
}

/* Success Screen Styles */
.success-screen {
  display: none; /* Controlled via Javascript */
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px 0;
  position: relative;
}

.success-badge-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid rgba(16, 185, 129, 0.15);
  animation: ringPulse 2s infinite ease-in-out;
}

.success-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success-color) 0%, #10db9a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  z-index: 2;
  transform: scale(0);
  animation: checkPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.checkmark-icon {
  color: var(--white);
  font-size: 2.2rem;
}

.success-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--success-color);
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.success-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 28px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.summary-details {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 20px;
  padding: 20px 24px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(16, 185, 129, 0.12);
  padding-bottom: 8px;
}

.summary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-label {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.summary-value {
  font-weight: 800;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.btn-reset {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 14px;
  color: var(--primary-color);
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.btn-reset:hover {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(238, 106, 36, 0.18);
  transform: translateY(-2px);
}

.confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

@keyframes ringPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 0.4; }
  100% { transform: scale(1.2); opacity: 0; }
}

@keyframes checkPop {
  to { transform: scale(1); }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Speech Bubble for Teacher Quote */
.teacher-speech-bubble {
  position: absolute;
  top: 0%;
  right: -12%;
  left: auto;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--primary-color);
  border-radius: 20px 20px 20px 0; /* Tail at bottom-left */
  padding: 14px 20px;
  box-shadow: 0 15px 35px rgba(238, 106, 36, 0.12), 0 5px 12px rgba(0, 0, 0, 0.03);
  z-index: 4;
  max-width: 250px;
  text-align: right;
  direction: rtl;
  animation: speechBubbleFloat 6s ease-in-out infinite alternate;
  pointer-events: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.teacher-speech-bubble:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 40px rgba(238, 106, 36, 0.18);
}

/* Tail pointer pointing to teacher (slanted down-left) */
.teacher-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 24px;
  right: auto;
  border-width: 11px 0 0 11px;
  border-style: solid;
  border-color: var(--primary-color) transparent transparent transparent;
}

.teacher-speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 25px;
  right: auto;
  border-width: 9px 0 0 9px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
  z-index: 5;
}

.speech-text-ar {
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.45;
  display: block;
}

.speech-text-en {
  font-family: var(--font-english);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
  margin-bottom: 2px;
}

@keyframes speechBubbleFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* Flying Elements (English Letters & Books) Orbiting Teacher */
.flying-elements-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.flying-element {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  padding: 8px 14px;
  box-shadow: 0 10px 25px rgba(238, 106, 36, 0.07), 0 2px 4px rgba(0, 0, 0, 0.02);
  z-index: 3;
  pointer-events: auto; /* Enable hover interaction */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  font-family: var(--font-english);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  opacity: 0;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

.flying-element:hover {
  transform: translateY(-5px) scale(1.08) !important;
  box-shadow: 0 15px 35px rgba(238, 106, 36, 0.16);
  border-color: var(--primary-color);
  cursor: default;
}

/* Icons inside badges */
.flying-element i {
  color: var(--primary-color);
  font-size: 1rem;
}

/* Subtitle accent inside badges */
.flying-element .badge-accent {
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff803b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Circular styles for letters A, B, C */
.fly-badge-a, .fly-badge-b, .fly-badge-c {
  padding: 10px 14px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.15rem;
}

/* Individual badge animation settings */
.fly-badge-hello {
  top: 12%;
  left: 2%;
  animation: floatOrbitA 7.5s infinite ease-in-out;
  animation-delay: 0s;
}

.fly-badge-english {
  bottom: 12%;
  right: 12%;
  animation: floatOrbitB 8.5s infinite ease-in-out;
  animation-delay: 1.5s;
}

.fly-badge-grammar {
  top: 25%;
  right: 2%;
  animation: floatOrbitC 7s infinite ease-in-out;
  animation-delay: 0.8s;
}

.fly-badge-vocab {
  bottom: 22%;
  left: -2%;
  animation: floatOrbitWord1 9s infinite ease-in-out;
  animation-delay: 2.2s;
}

.fly-badge-cap {
  top: 4%;
  left: 32%;
  animation: floatOrbitCap 8s infinite ease-in-out;
  animation-delay: 2.5s;
}

.fly-badge-a {
  top: 38%;
  left: -12%;
  animation: floatOrbitBook 8.2s infinite ease-in-out;
  animation-delay: 0.5s;
}

.fly-badge-b {
  top: 48%;
  right: -10%;
  animation: floatOrbitLight 9s infinite ease-in-out;
  animation-delay: 1.2s;
}

.fly-badge-c {
  bottom: 5%;
  left: 18%;
  animation: floatOrbitPencil 7.8s infinite ease-in-out;
  animation-delay: 1.8s;
}

.fly-badge-sparkle {
  top: 42%;
  right: 28%;
  padding: 8px;
  border-radius: 50%;
  color: #ffa570;
  animation: floatOrbitSparkle 5s infinite ease-in-out;
}

/* Animations for orbits */
@keyframes floatOrbitA {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.85; }
  50% { transform: translate(-15px, -20px) rotate(15deg) scale(1.05); opacity: 0.95; }
  90% { opacity: 0.85; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitB {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.75; }
  50% { transform: translate(20px, -15px) rotate(-20deg) scale(1.1); opacity: 0.9; }
  85% { opacity: 0.75; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitC {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  50% { transform: translate(15px, 25px) rotate(25deg) scale(0.95); opacity: 0.95; }
  90% { opacity: 0.8; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitWord1 {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.7; }
  50% { transform: translate(-25px, -10px) rotate(-10deg) scale(1.05); opacity: 0.85; }
  88% { opacity: 0.7; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitWord2 {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.8; }
  50% { transform: translate(10px, 15px) rotate(8deg) scale(0.95); opacity: 0.9; }
  92% { opacity: 0.8; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitBook {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  50% { transform: translate(25px, -20px) rotate(35deg) scale(1.08); opacity: 0.95; }
  90% { opacity: 0.8; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitPencil {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.75; }
  50% { transform: translate(-15px, 15px) rotate(-25deg) scale(0.9); opacity: 0.85; }
  85% { opacity: 0.75; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitLight {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.8; }
  50% { transform: translate(-20px, -25px) rotate(15deg) scale(1.1); opacity: 0.95; }
  88% { opacity: 0.8; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitCap {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.75; }
  50% { transform: translate(18px, -15px) rotate(-15deg) scale(1.05); opacity: 0.9; }
  90% { opacity: 0.75; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
}

@keyframes floatOrbitSparkle {
  0%, 100% { transform: translate(0, 0) scale(0.9); opacity: 0.4; }
  50% { transform: translate(8px, -8px) scale(1.15); opacity: 0.85; }
}

/* ========================================== */
/*           RESPONSIVE BREAKPOINTS           */
/* ========================================== */

/* Tablets and small laptops (max-width: 992px) */
@media (max-width: 992px) {
  .registration-card {
    padding: 36px 30px;
    gap: 24px;
  }
  
  .card-body {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
  }
  
  .teacher-column {
    order: 1; /* Teacher illustration at the top, form below on responsive stack */
    transform: translateY(-30px);
    animation: slideFromTopMobile 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  .form-column {
    order: 2;
    transform: translateY(30px);
    animation: slideFromBottomMobile 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  @keyframes slideFromTopMobile {
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes slideFromBottomMobile {
    to { opacity: 1; transform: translateY(0); }
  }
  
  .illustration-container {
    max-width: 340px;
  }
  
  .flying-elements-container {
    display: none; /* Hide cluttered orbiting symbols on mobile/tablet */
  }

  .teacher-speech-bubble {
    left: 50%;
    top: -85px;
    transform: translateX(-50%) !important;
    border-radius: 20px 20px 0 20px;
    max-width: 280px;
    width: 90%;
    animation: bubbleFloatMobile 4s ease-in-out infinite alternate;
  }
  
  .teacher-speech-bubble::after {
    bottom: -11px;
    right: 50%;
    transform: translateX(50%);
    border-width: 11px 11px 0 11px;
    border-color: var(--primary-color) transparent transparent transparent;
  }

  .teacher-speech-bubble::before {
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    border-width: 9px 9px 0 9px;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
  }

  @keyframes bubbleFloatMobile {
    0% { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-6px); }
  }
  
  .teacher-img {
    max-height: 340px;
  }
  
  .shape-circle {
    width: 240px;
    height: 240px;
  }
  
  .header-title {
    font-size: 1.8rem;
  }
  
  .header-subtitle {
    font-size: 1.2rem;
  }
  
  .header-description {
    font-size: 0.95rem;
  }
}

/* Mobile Phones (max-width: 576px) */
@media (max-width: 576px) {
  body {
    align-items: flex-start;
  }

  .page-container {
    padding: 20px 12px;
  }
  
  .registration-card {
    padding: 28px 20px;
    border-radius: 24px;
    gap: 20px;
  }
  
  .logo-wrapper {
    padding: 10px;
    border-radius: 16px;
  }
  
  .academy-logo {
    height: 44px;
  }
  
  .header-title {
    font-size: 1.5rem;
  }
  
  .header-subtitle {
    font-size: 1.1rem;
    line-height: 1.4;
  }
  
  .header-description {
    font-size: 0.88rem;
  }
  
  .illustration-container {
    max-width: 260px;
  }
  
  .flying-elements-container {
    display: none;
  }

  .teacher-speech-bubble {
    font-size: 85%;
    padding: 10px 14px;
    max-width: 240px;
    top: -75px;
  }
  
  .teacher-img {
    max-height: 260px;
  }
  
  .shape-circle {
    width: 180px;
    height: 180px;
  }

  .form-input {
    padding: 14px 44px 14px 16px;
    font-size: 0.95rem;
  }
  
  .input-icon {
    right: 14px;
  }
  
  .btn-submit {
    padding: 14px 20px;
    font-size: 1.1rem;
  }
  
  .success-title {
    font-size: 1.5rem;
  }
  
  .success-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  
  .summary-details {
    padding: 16px;
    margin-bottom: 24px;
  }
}

/* Link Enhancements */
.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}

.footer-link, .welcome-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s ease;
  cursor: pointer;
}

.footer-link:hover, .welcome-link:hover {
  color: #ff803b;
  text-decoration: underline;
}

/* Emerald Green Download Button */
.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: var(--font-arabic);
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: 18px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.2);
  transition: var(--transition-smooth);
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
}

.btn-download i {
  font-size: 1.25rem;
  animation: downloadBounce 2s infinite ease-in-out;
}

@keyframes downloadBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
