/* =============================================
   CALCULADORA SOLARWINDS — OPTIM-TECH
   Estilo: Minimalismo Steve Jobs + Conversión
   ============================================= */

/* ---------- VARIABLES ---------- */
:root {
  --primary: #1B3A5C;
  --primary-light: #2a5a8c;
  --accent: #E85D26;
  --accent-hover: #d04d1a;
  --accent-glow: rgba(232, 93, 38, 0.15);
  --green: #16a34a;
  --green-light: #bbf7d0;
  --red: #dc2626;
  --red-light: #fecaca;
  --bg: #FAFBFD;
  --bg-card: #FFFFFF;
  --bg-field: #F4F6F9;
  --text: #1a202c;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #E85D26;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 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);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- PROGRESS BAR ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border);
  z-index: 1000;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #f59e0b);
  transition: width 0.5s ease;
  border-radius: 0 2px 2px 0;
}

/* ---------- HEADER ---------- */
.site-header {
  position: fixed;
  top: 4px;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 251, 253, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  padding: 0 24px;
  transition: var(--transition);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}

.logo { display: flex; align-items: center; gap: 0; }
.logo-text { font-weight: 700; font-size: 1.15rem; color: var(--primary); }
.logo-accent { font-weight: 700; font-size: 1.15rem; color: var(--accent); }
.logo-dot { font-weight: 400; font-size: 1.15rem; color: var(--text-secondary); }

.header-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-field);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.header-badge strong { color: var(--accent); }

/* ---------- WIZARD CONTAINER ---------- */
.wizard-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  min-height: 100vh;
}

/* ---------- STEPS ---------- */
.step {
  display: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.step.entering {
  display: block;
  opacity: 0;
  transform: translateY(24px);
}

/* ---------- HERO (PASO 0) ---------- */
.step-hero .hero-content {
  text-align: center;
  padding: 10vh 0 4vh;
}

.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-highlight {
  color: var(--accent);
  position: relative;
}

.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.3;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  max-width: 480px;
  margin: 0 auto 40px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hero-stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.hero-stat-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn-hero {
  font-size: 1.15rem;
  padding: 18px 40px;
  margin-bottom: 24px;
}

.hero-trust {
  font-size: 0.85rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.trust-dot { margin: 0 8px; opacity: 0.4; }

/* ---------- STEP CONTENT ---------- */
.step-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 2vh 0;
}

.step-indicator {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.step-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ---------- FORM FIELDS ---------- */
.field-group {
  margin-bottom: 28px;
}

.field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.field-label-sm {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.required { color: var(--accent); }

.currency-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-input-money {
  padding-left: 36px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 1.1rem;
}

.salary-input-group {
  position: relative;
}

.currency-symbol {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 1rem;
}

.phone-input-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.phone-prefix {
  padding: 12px 14px;
  background: var(--bg-field);
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.phone-input-group .field-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.4;
}

.field-hint a { color: var(--accent); text-decoration: none; }
.field-hint a:hover { text-decoration: underline; }

.field-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 4px;
}

/* ---------- SLIDERS ---------- */
.slider-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.field-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  transition: var(--transition);
}

.field-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(232, 93, 38, 0.3);
  transition: var(--transition);
}

.field-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(232, 93, 38, 0.4);
}

.field-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(232, 93, 38, 0.3);
}

.slider-display {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.slider-value-input {
  width: 70px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-field);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  outline: none;
  transition: var(--transition);
}

.slider-value-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.slider-unit {
  font-size: 0.82rem;
  color: var(--text-light);
  white-space: nowrap;
}

/* ---------- COUNTRY SELECTOR ---------- */
.country-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.country-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.country-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.country-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 3px rgba(232, 93, 38, 0.1);
}

.country-flag { font-size: 2rem; }
.country-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.country-currency { font-size: 0.75rem; font-weight: 600; color: var(--accent); background: rgba(232,93,38,0.1); padding: 2px 8px; border-radius: 4px; }

/* ---------- TOGGLE BUTTONS ---------- */
.toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle-btn {
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.toggle-btn:hover { border-color: var(--accent); color: var(--text); }

.toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

.toggle-main { font-size: 1rem; font-weight: 700; }
.toggle-sub { font-size: 0.72rem; opacity: 0.7; }

/* ---------- RISK SELECTOR ---------- */
.risk-selector {
  display: flex;
  gap: 8px;
}

.risk-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.risk-btn:hover { border-color: var(--accent); }

.risk-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.risk-num { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.risk-label { font-size: 0.68rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }

.risk-btn.active .risk-num { color: var(--accent); }

/* ---------- INFO CALLOUT ---------- */
.info-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  margin: 24px 0;
}

.callout-icon { font-size: 1.4rem; flex-shrink: 0; }
.callout-text { font-size: 0.88rem; line-height: 1.5; color: #92400e; }

/* ---------- FORM GRID (PASO 6) ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- CHECKBOX ---------- */
.checkbox-group { margin-top: 16px; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.checkbox-label a { color: var(--accent); text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }

/* ---------- NAVIGATION ---------- */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  padding: 14px 28px;
  font-size: 1rem;
  color: white;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(232, 93, 38, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(232, 93, 38, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 14px 28px;
  font-size: 1rem;
  color: var(--primary);
  background: var(--bg-field);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.btn-outline {
  padding: 14px 28px;
  font-size: 1rem;
  color: var(--green);
  background: transparent;
  border: 2px solid var(--green);
}

.btn-outline:hover { background: rgba(22, 163, 74, 0.05); }

.btn-back {
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: transparent;
}

.btn-back:hover { color: var(--text); }

.btn-results {
  font-size: 1.05rem;
  padding: 16px 32px;
}

/* ---------- RESULTS (PASO 7) ---------- */
.results-content { max-width: 700px; }

.results-hero {
  text-align: center;
  padding: 32px 0 40px;
}

.results-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  background: var(--green-light);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.results-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.results-big-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.results-currency {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.results-amount {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.results-period {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 8px;
}

.results-subtext {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ---------- RESULT CARDS ---------- */
.results-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon { font-size: 1.6rem; margin-bottom: 8px; }

.card-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.card-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ---------- COMPARISON BARS ---------- */
.comparison-section {
  margin-bottom: 48px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.comparison-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 28px;
}

.comp-row {
  margin-bottom: 24px;
}

.comp-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.comp-bars-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comp-bar {
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  min-width: 60px;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}

.comp-bar span { white-space: nowrap; }

.comp-bar-without { background: linear-gradient(90deg, #ef4444, #f97316); }
.comp-bar-with { background: linear-gradient(90deg, #22c55e, #10b981); }

.comp-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-without { background: linear-gradient(135deg, #ef4444, #f97316); }
.legend-with { background: linear-gradient(135deg, #22c55e, #10b981); }

/* ---------- RESULTS CTA ---------- */
.results-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
}

.results-cta .btn { width: 100%; max-width: 360px; justify-content: center; }

.btn-download {
  font-size: 1.1rem;
  padding: 18px 32px;
}

.results-footer-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 20px;
  background: var(--bg-field);
  border-radius: var(--radius);
  line-height: 1.6;
}

/* ---------- PENALTY INPUT ---------- */
.penalty-input {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-field);
  border-radius: var(--radius-sm);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .wizard-container { padding: 72px 16px 40px; }
  
  .country-selector { grid-template-columns: 1fr; gap: 8px; }
  .country-btn { flex-direction: row; padding: 14px 16px; gap: 12px; }
  
  .slider-group { flex-direction: column; align-items: stretch; gap: 10px; }
  .slider-display { justify-content: flex-end; }
  
  .risk-selector { flex-wrap: wrap; }
  .risk-btn { min-width: calc(33% - 6px); }
  
  .results-cards { grid-template-columns: 1fr; }
  
  .comparison-section { padding: 20px 16px; }
  
  .toggle-group { flex-wrap: wrap; }
  .toggle-btn { flex: 1; min-width: calc(50% - 4px); text-align: center; }
  
  .hero-stat { flex-direction: column; text-align: center; }
  .hero-stat-number { font-size: 2rem; }
  
  .step-nav { flex-direction: column-reverse; gap: 12px; }
  .step-nav .btn { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1.5rem; }
  .results-amount { font-size: 2rem; }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in { animation: fadeInUp 0.5s ease forwards; }

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }

/* ---------- LOADING STATE ---------- */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

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

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ---------- SELECTION ---------- */
::selection { background: var(--accent-glow); color: var(--accent); }
