/* ═══════════════════════════════════════════════════════════
   Magnetoterapia CEMP – Landing Page Styles
   Palette: #003087 (med-blue) · #3B82F6 (med-light) · #5B9BD5 (med-accent)
   ═══════════════════════════════════════════════════════════ */

/* ─── Base ─── */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile: padding bottom for floating CTA */
@media (max-width: 767px) {
  body {
    padding-bottom: 88px;
  }
}

/* ─── Hero background ─── */
.hero-bg {
  background: linear-gradient(145deg, #ebf4ff 0%, #ffffff 55%, #f0f7ff 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(91, 155, 213, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(0, 48, 135, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Gradient text (H1 accent) ─── */
.gradient-text {
  background: linear-gradient(120deg, #003087 0%, #3B82F6 60%, #5B9BD5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Trust pills ─── */
.trust-pill {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: #003087;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ─── Device image container ─── */
.device-container {
  position: relative;
  padding: 1.5rem;
}

.device-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(91, 155, 213, 0.25) 0%, rgba(0, 48, 135, 0.10) 50%, transparent 75%);
  border-radius: 2rem;
  filter: blur(24px);
  transform: scale(1.1);
  pointer-events: none;
}

/* ─── Primary CTA button ─── */
.cta-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #003087 0%, #1a4fa8 100%);
  letter-spacing: -0.01em;
}

.cta-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}

.cta-primary:hover::after {
  left: 150%;
}

/* ─── Pulse animation (CTA in "come funziona") ─── */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(0, 48, 135, 0.45); }
  70%  { box-shadow: 0 0 0 18px rgba(0, 48, 135, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(0, 48, 135, 0);     }
}

.pulse-cta {
  animation: pulse-ring 2.4s ease-out infinite;
}

/* ─── Pathology cards ─── */
.pathology-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pathology-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 48, 135, 0.12);
}

.pathology-card-dark {
  background: linear-gradient(135deg, #003087 0%, #1a5fb4 50%, #003087 100%);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.pathology-card-dark:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 48, 135, 0.35);
}

/* ─── Icon boxes ─── */
.icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Step cards ─── */
.step-card {
  position: relative;
  padding: 1rem;
}

.step-badge {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 1;
  color: #003087;
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ─── Device frame (apparecchio section) ─── */
.device-frame {
  position: relative;
}

.device-frame::before {
  content: '';
  position: absolute;
  inset: -1.5rem;
  background: linear-gradient(135deg, #ebf4ff 0%, #dbeafe 100%);
  border-radius: 2rem;
  z-index: 0;
}

.device-frame-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

/* ─── Check icon ─── */
.check-icon {
  width: 2rem;
  height: 2rem;
  background-color: #003087;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
  box-shadow: 0 2px 8px rgba(0, 48, 135, 0.3);
}

/* ─── Final CTA section ─── */
.cta-section {
  background: linear-gradient(135deg, #001a5c 0%, #003087 40%, #1a5fb4 80%, #003087 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91, 155, 213, 0.18) 0%, transparent 65%);
  pointer-events: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255, 0.05) 0%, transparent 65%);
  pointer-events: none;
}

/* ─── Phone number (CTA section) ─── */
.phone-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

/* ─── Feature chips (CTA section) ─── */
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #bfdbfe;
  backdrop-filter: blur(6px);
}

/* ─── Floating CTA (mobile) ─── */
.floating-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.75rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid #e0ecff;
  box-shadow: 0 -4px 24px rgba(0, 48, 135, 0.1);
}

/* ─── Smooth reveal animation ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply to sections on load – targets direct children of main */
main > section {
  animation: fadeInUp 0.55s ease both;
}

main > section:nth-child(1) { animation-delay: 0.05s; }
main > section:nth-child(2) { animation-delay: 0.12s; }
main > section:nth-child(3) { animation-delay: 0.18s; }
main > section:nth-child(4) { animation-delay: 0.22s; }
main > section:nth-child(5) { animation-delay: 0.26s; }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ─── Print ─── */
@media print {
  .floating-cta,
  header {
    display: none !important;
  }
  .cta-section {
    background: #003087 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
