/* ============================================
   פוקוס פיננסי — Styles (WOW Edition)
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-quick: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 600ms;
  --duration-dramatic: 1000ms;
  --color-primary-rgb: 37, 99, 235;
  --color-cta-rgb: 232, 149, 58;
  --color-accent-rgb: 30, 58, 95;
  --color-gold: #E8953A;
  --quiz-hue: 215;
  --surface-bg: #0B1929;
  --card-bg: rgba(19, 43, 69, 0.85);
  --card-border: rgba(37, 99, 235, 0.12);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* ============================================
   HERO SECTION
   ============================================ */

/* Animated gradient background */
.hero-bg {
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 20% 50%, rgba(var(--color-primary-rgb), 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(var(--color-cta-rgb), 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
  animation: gradientShift 12s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes gradientShift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3%, 2%) scale(1.05); }
  100% { transform: translate(2%, -2%) scale(1); }
}

/* Floating shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.float-1 { width: 120px; height: 120px; background: rgba(var(--color-primary-rgb), 0.1); top: 10%; right: 10%; animation: float1 20s ease-in-out infinite; }
.float-2 { width: 80px; height: 80px; background: rgba(var(--color-cta-rgb), 0.08); top: 60%; left: 5%; animation: float2 25s ease-in-out infinite; border-radius: 30%; }
.float-3 { width: 60px; height: 60px; border: 2px solid rgba(var(--color-primary-rgb), 0.12); top: 30%; left: 15%; animation: float3 18s ease-in-out infinite; }
.float-4 { width: 100px; height: 100px; background: rgba(var(--color-primary-rgb), 0.06); bottom: 15%; right: 20%; animation: float1 22s ease-in-out infinite reverse; border-radius: 40%; }
.float-5 { width: 40px; height: 40px; background: rgba(var(--color-cta-rgb), 0.1); top: 20%; left: 60%; animation: float2 15s ease-in-out infinite; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(20px, -30px) rotate(5deg); }
  66% { transform: translate(-15px, 15px) rotate(-3deg); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-25px, -20px) rotate(8deg); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15px, 25px) scale(1.1); }
}

/* Staggered hero entry */
.hero-enter {
  opacity: 0;
  transform: translateY(24px);
  animation: heroReveal var(--duration-slow) var(--ease-out-expo) forwards;
}

.hero-delay-1 { animation-delay: 0ms; }
.hero-delay-2 { animation-delay: 150ms; }
.hero-delay-3 { animation-delay: 300ms; }
.hero-delay-4 { animation-delay: 500ms; }
.hero-delay-5 { animation-delay: 700ms; }
.hero-delay-6 { animation-delay: 900ms; }

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CTA pulse glow */
.cta-pulse {
  animation: ctaPulse 2.5s ease-in-out infinite;
  animation-delay: 1.5s;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(var(--color-cta-rgb), 0.25); }
  50% { box-shadow: 0 4px 30px rgba(var(--color-cta-rgb), 0.45), 0 0 0 8px rgba(var(--color-cta-rgb), 0.1); }
}

/* ============================================
   QUIZ SECTION
   ============================================ */

/* Dynamic quiz background */
#quiz {
  transition: background-color 0.8s ease;
}

/* Enhanced progress bar */
.progress-shimmer {
  background: linear-gradient(90deg, #2563EB 0%, #3B82F6 40%, #60A5FA 50%, #3B82F6 60%, #2563EB 100%);
  background-size: 300% 100%;
  animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Milestone dots */
.milestone-dots {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: 6px;
}

.milestone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1E3A5F;
  transition: all 0.4s var(--ease-spring);
}

.milestone-dot.completed {
  background: #2563EB;
  transform: scale(1);
}

.milestone-dot.current {
  background: #E8953A;
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(var(--color-cta-rgb), 0.25);
}

.milestone-dot.milestone-special {
  width: 10px;
  height: 10px;
}

.milestone-dot.milestone-special.completed {
  background: var(--color-gold);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Card transitions */
.card-exit {
  animation: cardExit 280ms var(--ease-smooth) forwards;
}

.card-enter {
  animation: cardEnter 380ms var(--ease-spring) forwards;
}

.card-enter-back {
  animation: cardEnterBack 380ms var(--ease-spring) forwards;
}

.card-exit-back {
  animation: cardExitBack 280ms var(--ease-smooth) forwards;
}

@keyframes cardExit {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(60px) scale(0.96); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateX(-50px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes cardEnterBack {
  from { opacity: 0; transform: translateX(50px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes cardExitBack {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(-60px) scale(0.96); }
}

/* Question icon animations */
.q-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 12px;
  opacity: 0;
  animation-fill-mode: forwards;
  animation-duration: 600ms;
  animation-timing-function: var(--ease-spring);
}

.q-icon-spin { animation-name: iconSpin; }
.q-icon-bounce { animation-name: iconBounce; }
.q-icon-slide { animation-name: iconSlide; }
.q-icon-wobble { animation-name: iconWobble; }
.q-icon-scale { animation-name: iconScale; }
.q-icon-draw { animation-name: iconDraw; }
.q-icon-pulse { animation-name: iconPulse; }
.q-icon-drop { animation-name: iconDrop; }
.q-icon-tilt { animation-name: iconTilt; }
.q-icon-shimmer { animation-name: iconShimmer; }

@keyframes iconSpin {
  from { opacity: 0; transform: rotate(-180deg) scale(0.5); }
  to { opacity: 1; transform: rotate(0deg) scale(1); }
}

@keyframes iconBounce {
  0% { opacity: 0; transform: translateY(-30px); }
  60% { opacity: 1; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes iconSlide {
  from { opacity: 0; transform: translateX(-30px) rotate(-10deg); }
  to { opacity: 1; transform: translateX(0) rotate(0deg); }
}

@keyframes iconWobble {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.1) rotate(5deg); }
  70% { transform: scale(0.95) rotate(-3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes iconScale {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes iconDraw {
  from { opacity: 0; transform: scale(0.8); filter: blur(4px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes iconPulse {
  0% { opacity: 0; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes iconDrop {
  0% { opacity: 0; transform: translateY(-40px) scale(0.8); }
  70% { opacity: 1; transform: translateY(6px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes iconTilt {
  0% { opacity: 0; transform: rotate(-20deg) scale(0.7); }
  60% { opacity: 1; transform: rotate(5deg) scale(1.05); }
  100% { opacity: 1; transform: rotate(0deg) scale(1); }
}

@keyframes iconShimmer {
  0% { opacity: 0; transform: scale(0.8); filter: brightness(0.5); }
  50% { opacity: 1; transform: scale(1.05); filter: brightness(1.3); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

/* Option hover/select states */
.option-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

.option-btn:hover {
  border-color: #2563EB;
  background-color: rgba(37, 99, 235, 0.1);
  transform: translateX(-4px);
}

.option-btn.selected {
  border-color: #2563EB;
  background-color: rgba(37, 99, 235, 0.15);
  color: #F1F5F9;
  font-weight: 500;
  animation: optionSelect 0.35s var(--ease-spring);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

@keyframes optionSelect {
  0% { transform: scale(1); }
  40% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

.option-btn.selected .option-check {
  opacity: 1;
  transform: scale(1);
}

.option-check {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s var(--ease-spring);
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.15);
  transform: scale(0);
  animation: rippleExpand 0.5s ease-out forwards;
  pointer-events: none;
}

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

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.section-exit {
  animation: sectionExit 300ms var(--ease-smooth) forwards;
}

.section-enter {
  animation: sectionEnter 400ms var(--ease-out-expo) forwards;
}

@keyframes sectionExit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

@keyframes sectionEnter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   LEAD FORM — Glass Morphism
   ============================================ */

.glass-card {
  background: rgba(19, 43, 69, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(37, 99, 235, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-card-dark {
  background: rgba(19, 43, 69, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(37, 99, 235, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Dark card base style */
.dark-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-blob {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.glass-blob-1 {
  background: rgba(var(--color-primary-rgb), 0.3);
  top: -100px;
  right: -80px;
  animation: blobFloat 8s ease-in-out infinite alternate;
}

.glass-blob-2 {
  background: rgba(var(--color-cta-rgb), 0.2);
  bottom: -120px;
  left: -60px;
  animation: blobFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(20px, -15px) scale(1.1); }
}

/* Success icon animation */
.success-circle {
  animation: successCircle 0.5s var(--ease-spring) forwards;
  transform: scale(0);
}

@keyframes successCircle {
  from { transform: scale(0) rotate(-10deg); }
  to { transform: scale(1) rotate(0deg); }
}

.success-check {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.4s ease 0.3s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* Input focus effects */
.input-focus-glow:focus {
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15), 0 2px 8px rgba(var(--color-primary-rgb), 0.1);
}

/* Submit button morphing */
.btn-loading {
  width: 56px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  pointer-events: none;
}

.btn-loading .btn-text { opacity: 0; }
.btn-loading .btn-spinner { opacity: 1; }

.btn-spinner {
  opacity: 0;
  transition: opacity 0.2s;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   LOADING SECTION
   ============================================ */

/* Animated bar chart */
.loading-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 60px;
  margin-bottom: 16px;
}

.loading-bar {
  width: 12px;
  border-radius: 4px 4px 0 0;
  animation: barPulse var(--bar-duration, 1s) ease-in-out infinite;
}

@keyframes barPulse {
  0%, 100% { height: 20%; }
  50% { height: var(--bar-height, 80%); }
}

/* Fun facts rotation */
.fun-fact {
  animation: factIn 0.5s var(--ease-out-expo) forwards;
}

.fun-fact-exit {
  animation: factOut 0.3s ease forwards;
}

@keyframes factIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes factOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* Loading step connector */
.loading-connector {
  width: 2px;
  background: #1E3A5F;
  margin-right: 9px;
  transition: background 0.4s ease;
  height: 16px;
}

.loading-connector.active {
  background: #E8953A;
}

/* ============================================
   RESULTS SECTION
   ============================================ */

/* Curtain reveal */
.curtain-overlay {
  position: fixed;
  inset: 0;
  background: #0B1929;
  z-index: 100;
  display: flex;
  pointer-events: none;
}

.curtain-left, .curtain-right {
  width: 50%;
  height: 100%;
  background: #0B1929;
}

.curtain-left {
  animation: curtainLeft 0.7s var(--ease-out-expo) 0.3s forwards;
}

.curtain-right {
  animation: curtainRight 0.7s var(--ease-out-expo) 0.3s forwards;
}

@keyframes curtainLeft {
  to { transform: translateX(-100%); }
}

@keyframes curtainRight {
  to { transform: translateX(100%); }
}

/* Profile badge animation */
.badge-reveal {
  animation: badgeReveal 0.5s var(--ease-spring) forwards;
  transform: scale(0);
}

@keyframes badgeReveal {
  from { transform: scale(0) rotate(-5deg); }
  to { transform: scale(1) rotate(0deg); }
}

.badge-shimmer {
  position: relative;
  overflow: hidden;
}

.badge-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: badgeShimmer 2s ease-in-out 0.8s;
}

@keyframes badgeShimmer {
  to { left: 100%; }
}

/* Step cards sequential reveal */
.step-card-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.step-card-reveal {
  animation: stepReveal 0.5s var(--ease-out-expo) forwards;
}

@keyframes stepReveal {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timeline connector */
.results-timeline {
  position: relative;
}

.results-timeline::before {
  content: '';
  position: absolute;
  right: 22px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #2563EB, #22C55E, #E8953A, #8B5CF6, #EC4899);
  border-radius: 2px;
  transform-origin: top;
  animation: timelineDraw 1.5s var(--ease-out-expo) forwards;
  transform: scaleY(0);
}

@keyframes timelineDraw {
  to { transform: scaleY(1); }
}

/* ============================================
   PLAN STEP COLORS
   ============================================ */

.step-border-1 { border-right-color: #2563EB; }
.step-border-2 { border-right-color: #22C55E; }
.step-border-3 { border-right-color: #E8953A; }
.step-border-4 { border-right-color: #8B5CF6; }
.step-border-5 { border-right-color: #EC4899; }

.step-badge-1 { background-color: #2563EB; }
.step-badge-2 { background-color: #22C55E; }
.step-badge-3 { background-color: #E8953A; }
.step-badge-4 { background-color: #8B5CF6; }
.step-badge-5 { background-color: #EC4899; }

/* ============================================
   STEP PROGRESS STATES (Gamification)
   ============================================ */

/* Completed step — green overlay */
.step-completed {
  position: relative;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.15) 100%) !important;
  border-color: #22C55E !important;
}

.step-completed .step-completed-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  background: #22C55E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: completedPop 0.5s var(--ease-spring) forwards;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.step-completed .step-completed-overlay svg {
  width: 16px;
  height: 16px;
  stroke: white;
  stroke-width: 3;
}

@keyframes completedPop {
  0% { transform: scale(0) rotate(-45deg); }
  60% { transform: scale(1.2) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.step-completed .step-badge-completed {
  background-color: #22C55E !important;
}

.step-completed .step-milestone-done {
  color: #22C55E !important;
  text-decoration: line-through;
  opacity: 0.7;
}

/* Current step — "You are here" indicator */
.step-current {
  position: relative;
  border: 2px solid #2563EB !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 20px rgba(37, 99, 235, 0.2) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.15) 100%) !important;
}

.step-current-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  width: fit-content;
  animation: currentPulse 2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.step-current-indicator svg {
  width: 14px;
  height: 14px;
  animation: pinBounce 1.5s ease-in-out infinite;
}

@keyframes currentPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 2px 16px rgba(37, 99, 235, 0.5), 0 0 0 6px rgba(37, 99, 235, 0.1); }
}

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

/* Future step — slightly dimmed */
.step-future {
  opacity: 0.65;
  filter: grayscale(20%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.step-future:hover {
  opacity: 0.9;
  filter: grayscale(0%);
}

.step-future .step-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1E3A5F;
  color: #64748B;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 8px;
}

/* Progress summary bar at top of results */
.step-progress-bar {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 24px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px 20px 12px;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
}

.step-progress-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Connector line between dots — RTL: first-child is rightmost */
.step-progress-node:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: #1E3A5F;
  z-index: -1;
}

.step-progress-node.node-done:not(:first-child)::before {
  background: #22C55E;
}

.step-progress-node.node-current:not(:first-child)::before {
  background: linear-gradient(to right, #0EA5E9, #22C55E);
}

.step-progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  transition: all 0.3s ease;
  position: relative;
}

.step-progress-dot.dot-completed {
  background: #22C55E;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.step-progress-dot.dot-current {
  background: #2563EB;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
  animation: dotPulse 2s ease-in-out infinite;
}

.step-progress-dot.dot-future {
  background: #1E3A5F;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.15); }
}

.step-progress-label {
  font-size: 10px;
  color: #64748B;
  margin-top: 6px;
  text-align: center;
  max-width: 60px;
  line-height: 1.2;
}

.step-progress-label.label-done {
  color: #22C55E;
  font-weight: 600;
}

.step-progress-label.label-current {
  color: #60A5FA;
  font-weight: 700;
}

/* IRM tip box */
.irm-tip {
  background-color: rgba(232, 149, 58, 0.1);
  border: 1px solid rgba(232, 149, 58, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.irm-tip a {
  color: #E8953A;
  font-weight: 600;
  text-decoration: none;
}

.irm-tip a:hover {
  text-decoration: underline;
}

/* ============================================
   CONFETTI CELEBRATION BADGE
   ============================================ */

.celebrate-badge {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 200;
  background: linear-gradient(135deg, #132B45, #1E3A5F);
  padding: 16px 32px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(37, 99, 235, 0.2);
  font-weight: 700;
  font-size: 1.1rem;
  color: #F1F5F9;
  animation: celebrateBadge 1.5s var(--ease-spring) forwards;
  pointer-events: none;
}

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

/* ============================================
   CUSTOM CURSOR (Desktop only)
   ============================================ */

@media (pointer: fine) {
  .custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(var(--color-primary-rgb), 0.3);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, border-color 0.2s;
    transform: translate(-50%, -50%);
  }

  .custom-cursor.hovering {
    width: 40px;
    height: 40px;
    border-color: rgba(var(--color-cta-rgb), 0.4);
  }
}

/* ============================================
   STICKY CTA BAR (mobile results)
   ============================================ */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(11, 25, 41, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(37, 99, 235, 0.1);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-spring);
}

.sticky-cta.sticky-visible {
  transform: translateY(0);
}

@media (min-width: 769px) {
  .sticky-cta { display: none !important; }
}

/* ============================================
   EXIT INTENT MODAL
   ============================================ */

.exit-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.exit-modal:not(.hidden) {
  opacity: 1;
}

.exit-modal.hidden {
  pointer-events: none;
}

.exit-modal-card {
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s var(--ease-spring);
}

.exit-modal:not(.hidden) .exit-modal-card {
  transform: scale(1) translateY(0);
}

/* ============================================
   LIVE SOCIAL PROOF TOAST
   ============================================ */

.social-proof-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(19, 43, 69, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 14px;
  padding: 10px 16px;
  max-width: 320px;
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s var(--ease-spring);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.social-proof-toast.toast-visible {
  opacity: 0.85;
  transform: translateX(0);
  pointer-events: auto;
}

.social-proof-toast.toast-exit {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toast-name {
  color: #F1F5F9;
  font-size: 13px;
  font-weight: 600;
}

.toast-action {
  color: #94A3B8;
  font-size: 11px;
  line-height: 1.3;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 640px) {
  /* Toast — smaller on mobile */
  .social-proof-toast {
    bottom: 16px;
    left: 12px;
    right: 12px;
    max-width: none;
    padding: 8px 12px;
    border-radius: 12px;
  }

  /* Hide floating numbers on mobile — too distracting */
  .floating-number {
    display: none;
  }

  /* Reduce floating shapes on mobile */
  .floating-shape {
    opacity: 0.3;
    transform: scale(0.5);
  }

  .float-3, .float-4, .float-5 {
    display: none;
  }

  /* Reduce stock chart prominence */
  .stock-chart-bg {
    height: 40%;
    opacity: 0.6;
  }

  /* Candlestick less visible */
  .candlestick-bg {
    opacity: 0.03;
  }

  /* Tighter card padding on mobile */
  .dark-card {
    padding: 20px;
  }

  /* Smaller teaser emoji */
  .teaser-emoji {
    font-size: 3rem;
  }

  /* Adjust progress bar labels on small screens */
  .step-progress-label {
    font-size: 8px;
    max-width: 48px;
  }

  .step-progress-dot {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  /* Loading bars smaller */
  .loading-bars {
    height: 48px;
  }
}

/* Extra small phones */
@media (max-width: 360px) {
  .floating-shape {
    display: none;
  }

  .stock-chart-bg {
    height: 30%;
  }
}

/* ============================================
   PROFILE TEASER
   ============================================ */

.teaser-emoji {
  animation: teaserEmoji 0.8s var(--ease-spring) forwards;
  transform: scale(0);
}

@keyframes teaserEmoji {
  0% { transform: scale(0) rotate(-20deg); }
  60% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

#profile-teaser .bg-\\[\\#0B1929\\]\\/50 {
  animation: teaserInsight 0.5s var(--ease-out-expo) forwards;
  opacity: 0;
  transform: translateX(20px);
}

#profile-teaser .bg-\\[\\#0B1929\\]\\/50:nth-child(1) { animation-delay: 0.3s; }
#profile-teaser .bg-\\[\\#0B1929\\]\\/50:nth-child(2) { animation-delay: 0.5s; }
#profile-teaser .bg-\\[\\#0B1929\\]\\/50:nth-child(3) { animation-delay: 0.7s; }

@keyframes teaserInsight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Social proof badge */
.social-proof-pulse {
  animation: socialPulse 3s ease-in-out infinite;
}

@keyframes socialPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-bg::before { animation: none; }
  .floating-shape { animation: none; }
  .progress-shimmer { animation: none; background: #2563EB; }
  .cta-pulse { animation: none; }
  .custom-cursor { display: none; }
}

/* ============================================
   FOCUS STATES (ACCESSIBILITY)
   ============================================ */

button:focus-visible,
a:focus-visible,
input:focus-visible,
.option-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* ============================================
   STOCK CHART & INVESTMENT VISUALS
   ============================================ */

/* Rising stock chart in hero */
.stock-chart-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: chartFadeIn 1.5s ease 0.3s forwards;
}

@keyframes chartFadeIn {
  to { opacity: 1; }
}

.chart-line {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  animation: drawChart 3s ease-out 0.8s forwards;
}

.chart-line-2 {
  animation-delay: 1.5s;
}

@keyframes drawChart {
  to { stroke-dashoffset: 0; }
}

/* Floating financial numbers */
.floating-number {
  position: absolute;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Noto Sans Hebrew', monospace;
  color: rgba(34, 197, 94, 0.2);
  pointer-events: none;
  z-index: 0;
  letter-spacing: 0.5px;
}

.fn-1 { top: 12%; right: 8%; animation: floatNum 18s ease-in-out infinite; color: rgba(34, 197, 94, 0.2); }
.fn-2 { top: 45%; left: 5%; animation: floatNum 22s ease-in-out infinite reverse; color: rgba(37, 99, 235, 0.2); }
.fn-3 { bottom: 30%; right: 15%; animation: floatNum 20s ease-in-out infinite; color: rgba(34, 197, 94, 0.18); }
.fn-4 { top: 25%; left: 70%; animation: floatNum 16s ease-in-out infinite reverse; color: rgba(232, 149, 58, 0.18); }
.fn-5 { top: 65%; right: 5%; animation: floatNum 24s ease-in-out infinite; color: rgba(37, 99, 235, 0.15); font-size: 15px; }
.fn-6 { bottom: 15%; left: 12%; animation: floatNum 19s ease-in-out infinite reverse; color: rgba(34, 197, 94, 0.15); }

@keyframes floatNum {
  0%, 100% { transform: translate(0, 0); opacity: 0.15; }
  25% { transform: translate(8px, -10px); opacity: 0.22; }
  50% { transform: translate(12px, -18px); opacity: 0.28; }
  75% { transform: translate(4px, -8px); opacity: 0.2; }
}

/* Quiz dark background */
.quiz-dark-bg {
  background: linear-gradient(180deg, #0B1929 0%, #0F2235 50%, #0B1929 100%);
  transition: background 0.8s ease;
}

/* Candlestick pattern background */
.candlestick-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
}

.candlestick-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Candlestick bodies */
    linear-gradient(180deg, transparent 20%, #22C55E 20%, #22C55E 60%, transparent 60%) 5% 0 / 8px 80px no-repeat,
    linear-gradient(180deg, transparent 30%, #EF4444 30%, #EF4444 55%, transparent 55%) 12% 10% / 8px 70px no-repeat,
    linear-gradient(180deg, transparent 10%, #22C55E 10%, #22C55E 50%, transparent 50%) 20% 5% / 8px 90px no-repeat,
    linear-gradient(180deg, transparent 25%, #22C55E 25%, #22C55E 65%, transparent 65%) 75% 0 / 8px 75px no-repeat,
    linear-gradient(180deg, transparent 35%, #EF4444 35%, #EF4444 60%, transparent 60%) 82% 15% / 8px 60px no-repeat,
    linear-gradient(180deg, transparent 15%, #22C55E 15%, #22C55E 45%, transparent 45%) 90% 5% / 8px 85px no-repeat,
    /* Wicks */
    linear-gradient(180deg, transparent 10%, #94A3B8 10%, #94A3B8 70%, transparent 70%) 5.3% 0 / 1.5px 80px no-repeat,
    linear-gradient(180deg, transparent 20%, #94A3B8 20%, #94A3B8 65%, transparent 65%) 12.3% 10% / 1.5px 70px no-repeat,
    linear-gradient(180deg, transparent 5%, #94A3B8 5%, #94A3B8 55%, transparent 55%) 20.3% 5% / 1.5px 90px no-repeat,
    linear-gradient(180deg, transparent 15%, #94A3B8 15%, #94A3B8 75%, transparent 75%) 75.3% 0 / 1.5px 75px no-repeat,
    linear-gradient(180deg, transparent 25%, #94A3B8 25%, #94A3B8 70%, transparent 70%) 82.3% 15% / 1.5px 60px no-repeat,
    linear-gradient(180deg, transparent 8%, #94A3B8 8%, #94A3B8 50%, transparent 50%) 90.3% 5% / 1.5px 85px no-repeat;
}

/* Chart grid overlay for all sections */
.chart-grid {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(148, 163, 184, 0.04) 59px, rgba(148, 163, 184, 0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(148, 163, 184, 0.04) 59px, rgba(148, 163, 184, 0.04) 60px);
}

/* ============================================
   PDF CONTENT STYLING
   ============================================ */

#pdf-content {
  font-family: 'Noto Sans Hebrew', sans-serif;
  direction: rtl;
  max-width: 700px;
  padding: 40px;
  color: #0C4A6E;
  line-height: 1.7;
}

#pdf-content h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

#pdf-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 8px;
}

#pdf-content .pdf-step {
  margin-bottom: 20px;
  padding: 16px;
  border-right: 4px solid #0EA5E9;
  background: #F8FAFC;
  border-radius: 8px;
}

#pdf-content .pdf-step ul {
  padding-right: 20px;
  margin: 8px 0 0;
}

#pdf-content .pdf-step li {
  margin-bottom: 4px;
  font-size: 14px;
}

#pdf-content .pdf-irm-tip {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  font-size: 13px;
}

#pdf-content .pdf-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
  text-align: center;
  font-size: 12px;
  color: #94A3B8;
}
