/* ========================================
   Prodentist Perú — Hoja de estilos
   Paleta: azul médico (sky-600 + cyan/sky)
   ======================================== */

/* ===== Variables ===== */
:root {
  /* Colores */
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #0ea5e9;
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;

  --cyan-100: #cffafe;
  --cyan-700: #0e7490;

  --blue-100: #dbeafe;
  --blue-700: #1d4ed8;

  --teal-100: #ccfbf1;
  --teal-700: #0f766e;

  --bg: #f8fafc;
  --bg-alt: #f0f9ff;
  --bg-alt-2: linear-gradient(to bottom, #ffffff, #f0f9ff);
  --surface: #ffffff;

  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --text-light: #94a3b8;
  --text-on-primary: #ffffff;

  --border: #e2e8f0;
  --border-soft: #f1f5f9;

  --green-100: #dcfce7;
  --green-600: #16a34a;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --red: #ef4444;

  /* Tipografía */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radios y sombras */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);

  /* Spacing */
  --container: 1200px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, select, textarea, button { font: inherit; }

/* ===== Icono ===== */
.icon { width: 1em; height: 1em; vertical-align: middle; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 20px; height: 20px; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Texto ===== */
.text-primary { color: var(--primary); }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-primary { background: var(--primary); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3); }
.btn-secondary { background: #ffffff; color: var(--primary); }
.btn-secondary:hover { background: #f8fafc; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-outline-primary { background: transparent; border-color: rgba(2, 132, 199, 0.4); color: var(--primary); }
.btn-outline-primary:hover { background: rgba(2, 132, 199, 0.1); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); padding: 10px 14px; width: 100%; justify-content: space-between; }
.btn-ghost:hover { background: rgba(2, 132, 199, 0.05); }
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: inline-flex; } }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--text-muted);
}
.badge-secondary { background: var(--primary-100); color: #0c4a6e; }
.badge-popular { background: #f1f5f9; color: var(--text-muted); font-size: 11px; padding: 2px 8px; }
.badge-outline { border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 11px; padding: 2px 8px; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  transition: transform 0.2s;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo:hover .logo-icon { transform: scale(1.05); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.logo-tag { font-size: 10px; color: var(--text-muted); letter-spacing: 0.15em; text-transform: uppercase; }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--primary-50); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions .btn { display: none; }
@media (min-width: 768px) { .nav-actions .btn { display: inline-flex; } }

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  height: 40px;
  padding: 11px 8px;
  background: transparent;
  border-radius: 6px;
  transition: background 0.15s;
}
.menu-toggle:hover { background: var(--primary-50); }
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (min-width: 768px) { .menu-toggle { display: none; } }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-top: 1px solid var(--border);
}
@media (max-width: 767px) {
  .mobile-menu.open { display: flex; }
}
.mobile-menu a, .mobile-menu button {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  text-align: left;
  width: 100%;
}
.mobile-menu a:hover { background: var(--primary-50); }
.mobile-menu .btn { width: 100%; margin-top: 8px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--primary-50), var(--surface) 70%);
  padding: 64px 0 80px;
}
@media (min-width: 1024px) { .hero { padding: 96px 0 112px; } }
.hero-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.hero-bg-blob-1 {
  width: 384px;
  height: 384px;
  top: -96px;
  right: -96px;
  background: rgba(186, 230, 253, 0.4);
}
.hero-bg-blob-2 {
  width: 288px;
  height: 288px;
  top: 50%;
  left: -128px;
  background: rgba(207, 250, 254, 0.3);
}
.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-container { grid-template-columns: 1fr 1fr; gap: 48px; }
}
.hero-text { text-align: center; }
@media (min-width: 1024px) { .hero-text { text-align: left; } }

.hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 16px;
}
@media (min-width: 640px) { .hero-title { font-size: 48px; } }
@media (min-width: 1024px) { .hero-title { font-size: 56px; } }

.hero-subtitle {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .hero-subtitle { margin-left: 0; margin-right: 0; }
}
.hero-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; justify-content: center; }
}
@media (min-width: 1024px) {
  .hero-cta { justify-content: flex-start; }
}

.hero-stats {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .hero-stats { margin-left: 0; margin-right: 0; }
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
@media (min-width: 640px) { .stat-value { font-size: 32px; } }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.2; }

/* Hero illustration */
.hero-illustration { position: relative; max-width: 28rem; margin: 0 auto; }
.hero-illustration-inner {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(186, 230, 253, 0.2), rgba(207, 250, 254, 0.1));
  border: 1px solid rgba(186, 230, 253, 0.6);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.hero-tooth-svg { width: 176px; height: 176px; }
@media (min-width: 640px) { .hero-tooth-svg { width: 208px; height: 208px; } }
.hero-tags {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 280px;
  margin-top: 16px;
}
.hero-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-sky { background: var(--primary-100); color: #0369a1; }
.tag-cyan { background: var(--cyan-100); color: var(--cyan-700); }
.tag-blue { background: var(--blue-100); color: var(--blue-700); }

.hero-float-card {
  position: absolute;
  display: none;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 220px;
}
@media (min-width: 640px) { .hero-float-card { display: flex; } }
.hero-float-card-1 { bottom: -24px; left: -24px; }
.hero-float-card-2 { top: -16px; right: -16px; }
.float-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.float-icon svg { width: 20px; height: 20px; }
.float-icon-green { background: var(--green-100); color: var(--green-600); }
.float-icon-amber { background: var(--amber-100); color: var(--amber-600); }
.float-title { font-size: 14px; font-weight: 600; line-height: 1.2; }
.float-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
@media (min-width: 640px) { .section { padding: 96px 0; } }
.section-alt { background: rgba(240, 249, 255, 0.5); border-top: 1px solid var(--primary-100); border-bottom: 1px solid var(--primary-100); }
.section-alt-2 { background: var(--bg-alt-2); }
.section-header { text-align: center; max-width: 36rem; margin: 0 auto 48px; }
.section-title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 12px; }
@media (min-width: 640px) { .section-title { font-size: 36px; } }
.section-subtitle { margin-top: 12px; color: var(--text-muted); }

/* ===== Card genérica ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ===== Service cards ===== */
.service-card { position: relative; }
.card-accent {
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.service-card:hover .card-accent { transform: scaleX(1); }
.card-body { padding: 24px; display: flex; flex-direction: column; height: 100%; }
.service-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary);
  transition: all 0.3s;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card:hover .service-icon { background: var(--primary); color: white; }
.service-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.service-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.feature-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; flex: 1; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
}
.check { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ===== Por qué elegirnos ===== */
.feature-item { text-align: center; }
@media (min-width: 640px) { .feature-item { text-align: left; } }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-item h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-item p { font-size: 14px; color: var(--text-muted); }

/* ===== Equipo ===== */
.doctor-card { text-align: center; padding: 24px; }
.doctor-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
  transition: transform 0.3s;
}
.doctor-card:hover .doctor-avatar { transform: scale(1.05); }
.avatar-sky { background: var(--primary-100); color: var(--primary-dark); }
.avatar-cyan { background: var(--cyan-100); color: var(--cyan-700); }
.avatar-blue { background: var(--blue-100); color: var(--blue-700); }
.avatar-teal { background: var(--teal-100); color: var(--teal-700); }
.doctor-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.doctor-specialty { font-size: 14px; color: var(--primary); font-weight: 500; }
.separator { height: 1px; background: var(--border); margin: 12px 0; }
.doctor-exp { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

/* ===== Cobertura ===== */
.coverage-card { padding: 24px; text-align: center; }
.coverage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary);
  margin-bottom: 16px;
}
.coverage-icon svg { width: 28px; height: 28px; }
.coverage-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.coverage-card p { font-size: 14px; color: var(--text-muted); }

/* ===== Contacto ===== */
.contact-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
  background: white;
}
.contact-item:hover { box-shadow: var(--shadow); }
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary);
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { font-size: 14px; font-weight: 600; line-height: 1.4; }
.contact-value-sub { font-size: 14px; font-weight: 600; }
.contact-cta {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--primary);
  margin-top: 6px;
}
.contact-cta:hover { text-decoration: underline; }

.horario-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(240, 249, 255, 0.5);
}
.horario-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.horario-header .icon { color: var(--primary); width: 20px; height: 20px; }
.horario-header h3 { font-size: 16px; font-weight: 600; }
.horario-list { display: flex; flex-direction: column; gap: 8px; }
.horario-list li { display: flex; justify-content: space-between; font-size: 14px; }
.horario-list span { color: var(--text-muted); }
.horario-list strong { font-weight: 500; }

.map-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
  background: #f1f5f9;
}
.map-container iframe { width: 100%; height: 100%; min-height: 400px; border: 0; }

/* ===== CTA Libro de reclamaciones ===== */
.reclamos-cta {
  margin-top: 48px;
  background: linear-gradient(to right, var(--primary), #0ea5e9);
  color: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
@media (min-width: 640px) {
  .reclamos-cta { flex-direction: row; justify-content: space-between; text-align: left; }
}
.reclamos-cta-text { display: flex; align-items: center; gap: 16px; justify-content: center; }
@media (min-width: 640px) { .reclamos-cta-text { justify-content: flex-start; } }
.reclamos-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.reclamos-cta-icon svg { width: 24px; height: 24px; }
.reclamos-cta h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.reclamos-cta p { font-size: 14px; color: rgba(255, 255, 255, 0.85); max-width: 36rem; }

/* ===== Footer ===== */
.footer {
  background: #082f49;
  color: rgba(186, 230, 253, 0.8);
  margin-top: auto;
}
.footer-container {
  display: grid;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-container { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-container { grid-template-columns: repeat(4, 1fr); } }
.logo-footer { margin-bottom: 16px; }
.logo-footer .logo-icon { background: var(--primary); }
.logo-footer .logo-name { color: white; }
.footer-tagline { font-size: 14px; line-height: 1.6; }
.footer-legal { font-size: 12px; color: rgba(186, 230, 253, 0.6); margin-top: 12px; }
.footer-col h4 {
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col li { font-size: 14px; display: flex; align-items: flex-start; gap: 8px; }
.footer-col a { transition: color 0.15s; }
.footer-col a:hover { color: white; }
.footer-link-btn { padding: 0; color: inherit; font-size: 14px; text-align: left; }
.footer-link-btn:hover { color: white; text-decoration: underline; }
.footer-icon { color: var(--primary-light); flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid #0c4a6e;
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(186, 230, 253, 0.6);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }

/* ===== WhatsApp float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #22c55e;
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
@media (min-width: 640px) { .modal { max-width: 900px; } }

.modal-header {
  background: var(--primary);
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-header-content { display: flex; align-items: flex-start; gap: 12px; }
.modal-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}
.modal-header-icon svg { width: 28px; height: 28px; }
.modal-header h2 { font-size: 20px; font-weight: 700; line-height: 1.2; }
.modal-subtitle { font-size: 13px; color: rgba(255, 255, 255, 0.85); margin-top: 4px; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  color: white;
  flex-shrink: 0;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.15); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  max-height: calc(90vh - 200px);
}

/* Success screen */
.success-screen {
  text-align: center;
  padding: 32px 0;
}
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.success-icon svg { width: 36px; height: 36px; }
.success-screen h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.success-text { color: var(--text-muted); margin-bottom: 16px; font-size: 14px; }
.success-code {
  display: inline-block;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary);
  font-family: monospace;
  font-weight: 700;
  font-size: 18px;
  padding: 12px 24px;
  border-radius: 8px;
  margin-bottom: 16px;
  word-break: break-all;
}
.success-note {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 28rem;
  margin: 0 auto 24px;
}

/* Form sections */
.form-section { margin-bottom: 32px; }
.section-title-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.section-title-form h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Radio grid */
.radio-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 640px) { .radio-grid { grid-template-columns: 1fr 1fr; } }
.radio-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.radio-card:hover { background: rgba(2, 132, 199, 0.04); }
.radio-card input[type="radio"] { display: none; }
.radio-card input[type="radio"]:checked ~ .radio-content .radio-bullet {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px white;
}
.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.05);
}
.radio-content { display: flex; align-items: flex-start; gap: 12px; }
.radio-bullet {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: white;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s;
}
.radio-title { display: block; font-weight: 600; font-size: 14px; }
.radio-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Radio inline */
.radio-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.radio-inline-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.radio-inline-option:hover { background: rgba(2, 132, 199, 0.04); }
.radio-inline-option input[type="radio"]:checked ~ span,
.radio-inline-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.05);
}
.radio-inline-option input[type="radio"] {
  accent-color: var(--primary);
}

/* Form grid */
.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.req { color: var(--red); }
.hint { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.field input, .field select, .field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 14px;
  color: var(--text);
  transition: all 0.15s;
  width: 100%;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.field input:invalid:not(:placeholder-shown), .field textarea:invalid:not(:placeholder-shown) {
  border-color: var(--red);
}
.field textarea { resize: vertical; min-height: 80px; }
.field select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.legal-note {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  padding: 16px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 14px;
  margin-top: 16px;
}
.form-error .icon { color: #dc2626; width: 18px; height: 18px; flex-shrink: 0; }

/* Modal footer */
.modal-footer {
  border-top: 1px solid var(--border);
  background: white;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 640px) {
  .modal-footer { flex-direction: row; align-items: center; justify-content: space-between; }
}
.modal-footer-hint { font-size: 12px; color: var(--text-muted); text-align: center; }
@media (min-width: 640px) { .modal-footer-hint { text-align: left; } }
.modal-footer-actions { display: flex; gap: 8px; justify-content: center; }
@media (min-width: 640px) { .modal-footer-actions { justify-content: flex-end; } }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(2, 132, 199, 0.3); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(2, 132, 199, 0.5); }

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.section { animation: fadeIn 0.6s ease-out; }

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