/**
 * Modern Hero Component - Professional & Minimalistic
 *
 * Features:
 * - Subtle gradient animations
 * - Professional fade-in effects
 * - Floating particles background
 * - Consistent with legal page design
 */

/* ============================================
   Hero Container - Modern & Clean
   ============================================ */
.referral-hero-modern {
  position: relative;
  padding: var(--space-4xl) var(--space-lg) var(--space-3xl);
  margin: 0;
  width: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-primary);
}

/* When hero is direct child of legal-page (full width) */
.legal-page > .referral-hero-modern {
  margin-left: 0;
  margin-right: 0;
}

/* Ensure hero doesn't break out when inside container */
.legal-page__container .referral-hero-modern {
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
}

/* Animated gradient background */
.referral-hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    var(--brand-primary) 0%,
    var(--brand-secondary) 50%,
    var(--brand-primary) 100%
  );
  opacity: 0.03;
  animation: gradient-shift 15s ease infinite;
  z-index: 0;
}

@keyframes gradient-shift {
  0%, 100% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(5%) scale(1.05);
  }
}

/* Floating particles effect */
.referral-hero-modern::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(242, 100, 25, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(247, 147, 30, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(242, 100, 25, 0.03) 0%, transparent 50%);
  animation: float-particles 20s ease-in-out infinite;
  z-index: 0;
}

@keyframes float-particles {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(10px, -20px) rotate(5deg);
  }
  66% {
    transform: translate(-20px, 10px) rotate(-5deg);
  }
}

/* Content container */
.referral-hero-modern__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Badge - Professional pill */
.referral-hero-modern__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fade-in-up 0.6s ease-out 0.2s forwards;
}

.referral-hero-modern__badge i {
  font-size: 14px;
  color: var(--brand-primary);
}

/* Title - Large and bold */
.referral-hero-modern__title {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0 0 var(--space-lg) 0;
  opacity: 0;
  animation: fade-in-up 0.6s ease-out 0.4s forwards;
}

.referral-hero-modern__title-highlight {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

/* Animated underline */
.referral-hero-modern__title-highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  animation: underline-grow 0.8s ease-out 1s forwards;
}

@keyframes underline-grow {
  to {
    width: 100%;
  }
}

/* Subtitle - Clean and readable */
.referral-hero-modern__subtitle {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-2xl) 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fade-in-up 0.6s ease-out 0.6s forwards;
}

/* Highlight stats inline */
.referral-hero-modern__stat {
  color: var(--brand-primary);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

/* CTA buttons container */
.referral-hero-modern__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-in-up 0.6s ease-out 0.8s forwards;
}

/* Primary CTA - Bold and prominent */
.referral-hero-modern__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.referral-hero-modern__cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.referral-hero-modern__cta:hover::before {
  width: 300px;
  height: 300px;
}

.referral-hero-modern__cta--primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(242, 100, 25, 0.25);
}

.referral-hero-modern__cta--primary:hover {
  box-shadow: 0 6px 20px rgba(242, 100, 25, 0.35);
  transform: translateY(-2px);
}

.referral-hero-modern__cta--secondary {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 2px solid var(--border-primary);
}

.referral-hero-modern__cta--secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
}

.referral-hero-modern__cta-icon {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
  transition: transform var(--transition-fast);
}

.referral-hero-modern__cta:hover .referral-hero-modern__cta-icon {
  transform: translateX(3px);
}

.referral-hero-modern__cta span {
  position: relative;
  z-index: 1;
}

/* Trust indicators - Subtle social proof */
.referral-hero-modern__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-primary);
  opacity: 0;
  animation: fade-in 0.6s ease-out 1s forwards;
}

.referral-hero-modern__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
}

.referral-hero-modern__trust-item i {
  font-size: 16px;
  color: var(--brand-primary);
}

.referral-hero-modern__trust-value {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Pulse animation for CTA */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(242, 100, 25, 0.25);
  }
  50% {
    box-shadow: 0 4px 20px rgba(242, 100, 25, 0.4);
  }
}

.referral-hero-modern__cta--primary {
  animation: pulse-glow 3s ease-in-out infinite;
}

.referral-hero-modern__cta--primary:hover {
  animation: none;
}

/* ============================================
   Light Mode Adjustments
   ============================================ */
[data-theme="light"] .referral-hero-modern {
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .referral-hero-modern::before {
  opacity: 0.06;
}

[data-theme="light"] .referral-hero-modern::after {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(242, 100, 25, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(247, 147, 30, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(242, 100, 25, 0.05) 0%, transparent 50%);
}

[data-theme="light"] .referral-hero-modern__badge {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .referral-hero-modern__title {
  color: #1a1a1a;
}

[data-theme="light"] .referral-hero-modern__subtitle {
  color: #4a4a4a;
}

[data-theme="light"] .referral-hero-modern__cta--secondary {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
}

[data-theme="light"] .referral-hero-modern__cta--secondary:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--brand-primary);
}

[data-theme="light"] .referral-hero-modern__trust {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .referral-hero-modern__trust-item {
  color: #666666;
}

[data-theme="light"] .referral-hero-modern__trust-value {
  color: #1a1a1a;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .referral-hero-modern {
    padding: var(--space-3xl) var(--space-md) var(--space-2xl);
  }

  .referral-hero-modern__title {
    font-size: var(--font-size-3xl);
  }

  .referral-hero-modern__subtitle {
    font-size: var(--font-size-base);
  }

  .referral-hero-modern__actions {
    flex-direction: column;
    width: 100%;
  }

  .referral-hero-modern__cta {
    width: 100%;
    justify-content: center;
  }

  .referral-hero-modern__trust {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .referral-hero-modern {
    padding: var(--space-2xl) var(--space-md);
  }

  .referral-hero-modern__title {
    font-size: var(--font-size-2xl);
  }

  .referral-hero-modern__badge {
    font-size: 10px;
    padding: 4px var(--space-sm);
  }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .referral-hero-modern::before,
  .referral-hero-modern::after {
    animation: none;
  }

  .referral-hero-modern__badge,
  .referral-hero-modern__title,
  .referral-hero-modern__subtitle,
  .referral-hero-modern__actions,
  .referral-hero-modern__trust {
    animation: fade-in 0.3s ease-out forwards;
  }

  .referral-hero-modern__title-highlight::after {
    animation: none;
    width: 100%;
  }

  .referral-hero-modern__cta--primary {
    animation: none;
  }
}
