/* ===== Tokens ===== */
:root {
  --yellow: #FCD116;
  --blue: #003893;
  --red: #CE1126;
  --dark: #17181B;
  --light: #F6F7FB;
  --muted: #667085;
  --card: #ffffff;
  --radius: 16px;
  --shadow-1: 0 2px 10px rgba(16,24,40,.06);
  --shadow-2: 0 10px 30px rgba(16,24,40,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--dark);
  background:
    radial-gradient(1200px 800px at 100% -10%, rgba(0,56,147,.08), transparent 60%),
    radial-gradient(800px 600px at -10% 20%, rgba(206,17,38,.05), transparent 60%),
    var(--light);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tipografía fluida */
h1 { font-size: clamp(2rem, 1.3rem + 2.5vw, 3rem); line-height: 1.12; }
h2 { font-size: clamp(1.35rem, 1rem + 1vw, 2rem); }
p, label, input, button, small { font-size: clamp(.95rem, .9rem + .2vw, 1.05rem); }

/* ===== Barra superior ===== */
.colombia-flag {
  height: 8px;
  background: linear-gradient(90deg, var(--yellow) 50%, var(--blue) 50% 75%, var(--red) 0);
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(16,24,40,.06);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .75rem; }
.logo img { height: 50px; }
.logo-flag { display: flex; gap: .4rem; }
.logo-flag img {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid #eee; object-fit: cover;
}

/* ===== Hero ===== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(135deg, #0d2a67 0%, #003893 35%, #264fa0 100%);
  color: #fff; text-align: center;
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem) 0 3.5rem;
}
.hero::before {
  content: "";
  position: absolute; inset: -20% -10% auto;
  height: 140%;
  background: radial-gradient(closest-side, rgba(252,209,22,.25), transparent 70%);
  transform: translateY(-25%);
  pointer-events: none;
}
.hero h1 span { color: var(--yellow); }
.hero p {
  max-width: 760px; margin: .35rem auto 0; opacity: .92;
}

/* ===== Layout ===== */
.container { max-width: 1200px; margin: -2.2rem auto 2rem; padding: 0 20px; }

/* ===== Card calculadora ===== */
.calculator-card {
  max-width: 560px;
  margin: 0 auto 2rem;
  padding: 1.75rem;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  position: relative;
}
.calculator-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--blue), var(--red));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.calculator-card h2 {
  color: #0e1e46; text-align: center; margin: 0 0 1.25rem;
}

/* ===== Formularios ===== */
.form-group { margin-bottom: 1.1rem; }
label {
  font-weight: 600; color: #1f2937; margin-bottom: .45rem; display: block;
}
.currency-input-container { position: relative; display: flex; align-items: center; }

.currency-flag {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.08);
  background-size: cover;
  background-position: center;
  z-index: 3; pointer-events: none;
}

/* Espacio interior de input */
.currency-input,
.form-control {
  width: 100%;
  padding: 14px 16px 14px 48px !important;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .06s;
  position: relative;
  z-index: 1;
}
.form-control:hover { border-color: #d0d5dd; }
.form-control:focus {
  border-color: #274c9e;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(39,76,158,.15);
}

/* ===== Botón principal ===== */
.btn-primary {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem;
  padding: 14px 16px;
  border: 0; border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(180deg, #2150c4, #11348f);
  color: #fff;
  font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(0,56,147,.25);
  transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,56,147,.28);
}
.btn-primary:active { transform: translateY(0); filter: saturate(.96); }

/* ===== Resultado ===== */
.result-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f5f8ff, #eef3ff);
  border: 1px solid #dbe3ff;
  display: none;
}
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.result-title { color: #274c9e; font-weight: 800; }
.result-amount {
  text-align: center; font-weight: 800; letter-spacing: .3px;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); color: #0f172a;
}
.result-details { color: var(--muted); text-align: center; }
.result-details i { margin-right: .25rem; }

/* ===== Features ===== */
.features-section { margin: 3.5rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title h2 { margin: 0 0 .4rem; }
.section-title p { color: var(--muted); }

.features-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
}
.feature-card {
  background: var(--card);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid #eef0f4;
  box-shadow: var(--shadow-1);
  text-align: center;
  transition: transform .15s ease, box-shadow .2s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(16,24,40,.12);
}
.feature-icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(180deg,#eef3ff,#f7f9ff);
  color: #274c9e; font-size: 1.25rem;
}

/* ===== Testimonios ===== */
.testimonials {
  background: #f5f8ff;
  padding: 3rem 0;
  margin: 3rem 0;
}
.testimonials-container {
  display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center;
}
.testimonial-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  max-width: 380px;
  width: 100%;
  border: 1px solid #f0e3e4;
  box-shadow: var(--shadow-1);
}
.testimonial-text { font-style: italic; color: #0f172a; }
.rating { color: var(--yellow); margin: .5rem 0; }

/* ===== Mapa ===== */
.map-section { background: #f5f8ff; padding: 2.5rem 0; }
.map-container {
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-1);
  margin-bottom: 1rem;
}
.map-link { color: #274c9e; text-decoration: none; font-weight: 600; }
.map-link:hover { text-decoration: underline; }

/* ===== Footer ===== */
footer {
  position: relative;
  background: #0c111a;
  color: #cbd5e1;
  padding: 2.5rem 0 1.25rem;
}
footer::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg,var(--yellow) 33%, var(--blue) 33% 66%, var(--red) 0);
}
.footer-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
}
.footer-column h3 {
  color: #fff; margin: 0 0 1rem; position: relative; display: inline-block;
}
.footer-column h3::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 44px; height: 2px; background: var(--yellow);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: .65rem 0; }
.footer-links a { color: #9aa4b2; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.social-links { display: flex; gap: .9rem; margin-top: 1rem; }
.social-links a { color: #fff; font-size: 1.1rem; opacity: .9; }
.social-links a:hover { opacity: 1; }
.copyright {
  margin-top: 2rem; padding-top: 1rem;
  border-top: 1px solid #1f2937;
  text-align: center; font-size: .9rem; color: #9aa4b2;
}

/* ===== Accesibilidad ===== */
:focus-visible { outline: 3px solid rgba(39,76,158,.45); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== Responsive ===== */
@media (max-width:768px) {
  .container { margin: -1.6rem auto 1.6rem; }
  .calculator-card { padding: 1.25rem; }
}
