/* ═══════════════════════════════════════
   FUENTES PROMETO TRIAL
   Mapeadas exactamente por su OS/2 weight class real:
   Thin    = 250  → textos base, footer, thin
   Regular = 400  → inputs, labels, políticas
   Medium  = 500  → título principal, label contrato
   Bold    = 700  → botones, links, ftitle
═══════════════════════════════════════ */
@font-face {
  font-family: 'Prometo';
  src: url('../assets/fonts/Prometo_Trial_Th-YSCGNAC7.woff2') format('woff2');
  font-display: swap;
  font-weight: 250;
  font-style: normal;
}
@font-face {
  font-family: 'Prometo';
  src: url('../assets/fonts/Prometo_Trial_Rg-TSOEOOUL.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Prometo';
  src: url('../assets/fonts/Prometo_Trial_Md-CVK5JHAI.woff2') format('woff2');
  font-display: swap;
  font-weight: 500;
  font-style: normal;
}
/* Medium también disponible en weight 700 — así lo reporta el Computed del original */
@font-face {
  font-family: 'Prometo';
  src: url('../assets/fonts/Prometo_Trial_Md-CVK5JHAI.woff2') format('woff2');
  font-display: swap;
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Prometo';
  src: url('../assets/fonts/Prometo_Trial_Bd-CGGOIMRA.woff2') format('woff2');
  font-display: swap;
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Prometo-Bold';
  src: url('../assets/fonts/Prometo_Trial_Bd-CGGOIMRA.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Prometo-Thin';
  src: url('../assets/fonts/Prometo_Trial_Th-YSCGNAC7.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

/* ═══════════════════════════════════════
   PRIMEICONS — fuente de iconos original
═══════════════════════════════════════ */
@font-face {
  font-family: 'primeicons';
  src: url('../assets/fonts/primeicons.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

.pi {
  font-family: 'primeicons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Código unicode del icono pi-arrow-up-right de PrimeIcons */
.pi-arrow-up-right::before { content: "\e9d4"; }  /* unicode correcto de PrimeIcons */

/* Tamaño del icono en botones */
.btn .pi { font-size: 1rem; }

/* ═══════════════════════════════════════
   VARIABLES
═══════════════════════════════════════ */
:root {
  --font:         'Prometo', sans-serif;
  --verde:        #518711;
  --verde-oscuro: #384E08;
  --naranja:      #F98200;
  --texto:        #666666;
  --texto-dark:   #333333;
  --blanco:       #ffffff;
  --sombra:       0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
}

/* ═══════════════════════════════════════
   RESET Y BASE
   body usa Thin (250) igual que el original
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  font-weight: 250;           /* Thin — base global */
  color: var(--texto);
  background: var(--blanco);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════
   GOV.CO BAR
═══════════════════════════════════════ */
.govco-bar {
  background: #005dca;
  padding: 0 clamp(1rem, 4vw, 4rem);
}
.govco-bar a {
  display: flex; align-items: center;
  height: 48px; width: max-content; overflow: hidden;
}
.govco-bar img { width: 140px; object-fit: cover; }

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.header {
  /* 172px total = 48px govco-bar + 124px verde visible */
  background: var(--verde);
  position: relative;
  /* margin-bottom deja espacio para que el pill sobresalga hacia abajo */
  margin-bottom: 4rem;
}

/* La govco-bar va DENTRO del header verde */
.header .govco-bar {
  background: #005dca;
  padding: 0 clamp(1rem, 4vw, 4rem);
  position: relative;
  z-index: 1;
}

/* Wrapper relativo para el pill */
.relative-wrap {
  height: 124px;   /* zona verde debajo de govco-bar */
  position: relative;
}

.header-pill {
  position: absolute;
  left: 50%;
  /* 50% baja el pill a mitad de .relative-wrap,
     luego translateY(50%) lo mueve su propia mitad hacia abajo
     para que quede exactamente entre verde y blanco */
  bottom: 0;
  transform: translate(-50%, 50%);
  width: 91.6667%;
  background: var(--blanco);
  border-radius: 50px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--sombra);
  display: flex; flex-direction: row;
  justify-content: space-between; align-items: center;
  gap: 8px;
  /* Asegurar que el pill siempre esté sobre el contenido */
  z-index: 10;
}

/* El <a> del logo NO debe agregar espacio extra vertical */
.pill-logo { line-height: 0; }
.logo-link {
  display: block;
  line-height: 0;   /* elimina el espacio inline por debajo de la img */
}
.pill-logo img { width: 170px; height: auto; display: block; }
.pill-btns { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   BOTONES
   Todos usan PrometoTrial-Bold (700), font-size 14px
   "Paga tu factura"    → font-weight: 500 (computed)
   "Volver"             → font-weight: 400 (computed)
   "Estado transacción" → font-weight: 400 (computed)
   "¿Dónde lo encuentro?" → font-weight: 500 (computed)
═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 2rem;
  font-family: 'Prometo-Bold', serif;  /* = prometo-trial-bold del original */
  font-size: 14px;
  font-weight: 400;                    /* peso nativo del archivo Bold */
  cursor: pointer; text-decoration: none;
  transition: all 0.2s; white-space: nowrap;
  padding: 15px 30px;
  border: 2px solid transparent;   /* borde más grueso en todos los botones */
  line-height: 1; background: transparent;
}

/* Volver — Bold file, weight 400 computed */
.btn-outlined {
  border-color: var(--verde);   /* borde verde rgb(81,135,17) */
  color: var(--verde);          /* texto verde rgb(81,135,17) */
  font-weight: 400;             /* Computed: 400 — Bold file nativo */
}
.btn-outlined:hover { background: #f3f4f6; }

/* Estado transacción — Bold file, weight 400 computed */
.btn-naranja {
  background: var(--naranja);
  border-color: var(--naranja);
  color: var(--texto-dark);
  font-weight: 700;
}
.btn-naranja:hover { background: #e07200; }

/* Paga tu factura — Bold file, weight 500 computed */
.btn-verde {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--blanco);
  font-weight: 500;  /* prometo-trial-bold, weight 500 */
}
.btn-verde:hover:not(:disabled) { background: var(--verde-oscuro); }
.btn-verde:disabled { opacity: 0.38; cursor: not-allowed; }

/* ¿Dónde lo encuentro? — Computed exacto:
   Desktop: prometo-trial-bold, 14px, weight 500, color verde, height 50px
   Móvil:   prometo-trial-bold, 14px, weight 500, color verde, height 44px */
.btn-verde-outline {
  font-family: 'Prometo-Bold', serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--verde);
  border-color: var(--verde);
  height: 50px;
  padding: 0 16px;
}
.btn-verde-outline:hover { background: #f0f7e4; }

.btn-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════
   MAIN
═══════════════════════════════════════ */
.main {
  flex: 1;
  width: 91.6667%;
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}
.content-grid { display: flex; gap: 2rem; align-items: flex-start; }
.form-col  { flex: 1; min-width: 0; }
.image-col { width: 300px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   TÍTULO PRINCIPAL
   Computed: PrometoTrial-Medium, 43px, weight 700, color #333
   → usamos font-weight:500 para activar el archivo Medium
     (el browser lo renderiza como weight 700 según el Computed)
═══════════════════════════════════════ */
.form-title {
  font-family: var(--font);
  font-size: 43px;
  font-weight: 700;        /* Bold */
  color: var(--texto-dark);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

/* ═══════════════════════════════════════
   LABEL "Ingresa tu número de contrato"
   Computed: prometo-trial-mediun, 15px, weight 500
═══════════════════════════════════════ */
.label-row {
  display: flex; flex-direction: row;
  align-items: center; flex-wrap: wrap;
  gap: 8px; padding: 0.5rem 0;
}
.label-row label {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;        /* Medium */
  color: var(--texto-dark);
}

/* ═══════════════════════════════════════
   INPUT / PLACEHOLDER
   Computed: Prometo (Regular), 16px, weight 400
═══════════════════════════════════════ */
.input-field {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border: 1px solid #000000;    /* negro 1px */
  border-radius: 30px;
  font-family: var(--font);
  font-size: 16px;         /* exacto del Computed */
  font-weight: 400;        /* Regular */
  color: var(--texto-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin: 0.5rem 0;
  display: block;
}
.input-field:focus {
  border-color: var(--verde);
  outline: 2px solid var(--verde);
  outline-offset: -2px;
}
.input-field::placeholder {
  color: #94a3b8;
  font-weight: 400;        /* Regular */
}
.input-field.error { border-color: #e53935; outline-color: #e53935; }

.select-field {
  width: 100%; padding: 0.75rem 1.5rem;
  border: 1px solid #94a3b8; border-radius: 30px;
  font-family: var(--font); font-size: 16px; font-weight: 400;
  color: var(--texto-dark); outline: none; appearance: none;
  background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23518711' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 1.2rem center;
  margin: 0.5rem 0; cursor: pointer; transition: border-color 0.2s;
}
.select-field:focus { border-color: var(--verde); outline: 2px solid var(--verde); outline-offset: -2px; }

.error-msg {
  color: #e53935; font-size: 12px; font-weight: 400;
  margin: -4px 0 8px 1.5rem; display: none;
}
.error-msg.visible { display: block; }

/* ═══════════════════════════════════════
   reCAPTCHA
═══════════════════════════════════════ */
.recaptcha-wrap { margin: 0.5rem 0 1rem; }
.recaptcha-box {
  display: inline-flex; align-items: center; gap: 14px;
  border: 1px solid #d3d3d3; border-radius: 3px;
  background: #f9f9f9; padding: 0 14px;
  width: 304px; height: 78px;
  cursor: pointer; user-select: none;
}
.rc-check {
  width: 28px; height: 28px;
  border: 2px solid #c1c1c1; border-radius: 2px;
  background: var(--blanco); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
}
.rc-check.done { border-color: var(--verde); }
.rc-check .rc-tick { display: none; width: 18px; height: 18px; }
.rc-check.done .rc-tick { display: block; }
.rc-label { font-size: 14px; color: #333; flex: 1; font-family: sans-serif; }
.rc-brand { text-align: center; flex-shrink: 0; }
.rc-brand svg { width: 32px; height: 32px; display: block; margin: 0 auto 2px; }
.rc-brand span { font-size: 7.5px; color: #777; display: block; line-height: 1.4; font-family: sans-serif; }

/* ═══════════════════════════════════════
   CHECKBOX + TEXTO POLÍTICAS
   Computed: prometo-trial-regular, 15px, weight 400, color #666
═══════════════════════════════════════ */
.politicas-row {
  display: flex; align-items: center;
  gap: 0.5rem; margin: 0.5rem 0 1rem;
}
.chk-box {
  width: 32px; height: 32px;
  border: 2px solid #94a3b8; border-radius: 8px;
  background: var(--blanco); flex-shrink: 0;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; position: relative;
}
.chk-box.on { background: var(--verde); border-color: var(--verde); }
.chk-box.on::after {
  content: ''; position: absolute; left: 9px; top: 4px;
  width: 7px; height: 13px;
  border-right: 2px solid var(--blanco);
  border-bottom: 2px solid var(--blanco);
  transform: rotate(45deg);
}
.politicas-label {
  font-family: var(--font);
  font-size: 15px;           /* exacto del Computed */
  font-weight: 400;          /* Regular */
  color: var(--texto);       /* #666 */
  cursor: pointer; line-height: 1.5;
}
.politicas-label a {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;          /* Bold para el enlace */
  color: var(--texto);       /* #666 — igual que el texto */
  text-decoration: none;
}
.politicas-label a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: var(--blanco); border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 1.5rem; margin-bottom: 1rem;
}
.card-title {
  font-family: var(--font); font-size: 18px;
  font-weight: 500; color: var(--texto-dark); margin-bottom: 1rem;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 30px;
  font-family: var(--font); font-size: 13px; font-weight: 700;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-pending { background: #fff8e1; color: #f57f17; }
.badge-error   { background: #ffebee; color: #c62828; }

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table tr { border-bottom: 1px solid #f0f0f0; }
.detail-table tr:last-child { border-bottom: none; }
.detail-table td { padding: 0.6rem 0; font-size: 14px; font-family: var(--font); }
.detail-table td:first-child { color: #888; font-weight: 250; width: 45%; }
.detail-table td:last-child  { color: var(--texto-dark); font-weight: 500; text-align: right; }

.monto-destacado {
  font-family: var(--font); font-size: 36px;
  font-weight: 700; color: var(--verde); margin: 0.5rem 0;
}

.alerta {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 1rem 1.2rem; border-radius: 8px; margin: 1rem 0;
  font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 1.5;
}
.alerta-info    { background: #e3f2fd; color: #0d47a1; border-left: 4px solid #1976d2; }
.alerta-success { background: #e8f5e9; color: #1b5e20; border-left: 4px solid #388e3c; }
.alerta-warning { background: #fff8e1; color: #7a4300; border-left: 4px solid #f9a825; }
.alerta-error   { background: #ffebee; color: #b71c1c; border-left: 4px solid #d32f2f; }
.alerta-icon    { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.steps { display: flex; gap: 0; margin-bottom: 2rem; }
.step { flex: 1; text-align: center; position: relative; padding-top: 0.5rem; }
.step::before {
  content: ''; position: absolute; top: 20px; left: -50%; right: 50%;
  height: 2px; background: #e0e0e0;
}
.step:first-child::before { display: none; }
.step.active::before, .step.done::before { background: var(--verde); }
.step-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: #e0e0e0; color: #999;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  position: relative; z-index: 1; transition: all 0.3s;
}
.step.active .step-circle { background: var(--verde); color: var(--blanco); }
.step.done .step-circle   { background: var(--verde-oscuro); color: var(--blanco); }
.step-label { font-family: var(--font); font-size: 12px; font-weight: 500; color: #999; }
.step.active .step-label, .step.done .step-label { color: var(--verde); }

/* ═══════════════════════════════════════
   FACTURA DIGITAL
═══════════════════════════════════════ */
.factura-card {
  width: 300px; border-radius: 8px; overflow: hidden;
  border: 1px solid #e5e7eb; background: var(--blanco);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.factura-img {
  height: 220px;
  background: linear-gradient(135deg, #f5f9f0 0%, #edf4e0 40%, #e8f2d8 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hoja { position: absolute; border-radius: 50% 0 50% 0; }
.hoja-1 { width:80px;height:40px;top:-10px;right:20px;transform:rotate(-30deg);background:#4a8a15;opacity:0.5; }
.hoja-2 { width:60px;height:30px;top:10px;right:-5px;transform:rotate(20deg);background:#6db82a;opacity:0.3; }
.hoja-3 { width:50px;height:25px;bottom:50px;left:-8px;transform:rotate(-20deg);background:#5a9e20;opacity:0.4; }
.hoja-4 { width:35px;height:18px;top:30px;left:15px;transform:rotate(40deg);background:#7aca35;opacity:0.25; }
.factura-texto { text-align: center; z-index: 1; position: relative; padding: 0 16px; }
.factura-pre   { font-family: var(--font); font-size: 13px; font-weight: 400; color: #555; margin-bottom: 4px; }
.factura-title { font-family: var(--font); font-size: 36px; font-weight: 700; color: var(--verde); line-height: 1; text-transform: uppercase; }
.factura-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 20px;
  background: var(--verde); color: var(--blanco);
  font-family: var(--font); font-weight: 700; font-size: 15px;
  text-decoration: none; transition: background 0.2s; border: none; cursor: pointer;
}
.factura-cta:hover { background: var(--verde-oscuro); }
.factura-sub { text-align: center; font-size: 12px; color: #888; padding: 8px 12px 10px; font-style: italic; font-family: var(--font); font-weight: 250; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  background: var(--verde); color: var(--blanco);
  font-family: var(--font); font-size: 14px; font-weight: 250;
  padding: 1rem 1.5rem 0;
}
.footer-inner {
  display: flex; justify-content: center;
  align-items: flex-start; flex-wrap: wrap;
  gap: 1.25rem; padding-bottom: 0.5rem;
}
.footer-logo img { height: 150px; width: auto; display: block; }
.footer-info { flex: 1; min-width: 180px; }
.footer-info .ftitle, .footer-links .ftitle {
  font-family: var(--font); font-weight: 700; margin-bottom: 0.75rem;
}
.footer-info p { line-height: 1.85; font-size: 13px; font-weight: 250; }
.footer-links { min-width: 160px; }
.footer-links a {
  display: block; color: var(--blanco); text-decoration: none;
  margin-bottom: 8px; font-size: 13px;
  font-family: var(--font); font-weight: 250;
}
.footer-links a:hover { text-decoration: underline; }
.footer-logos { display: flex; align-items: center; gap: 4px; }
.footer-logos img { object-fit: contain; display: block; }
footer hr { border: none; border-top: 1px solid rgba(255,255,255,0.3); margin: 0.5rem 0; }
.footer-redes {
  display: flex; justify-content: center; align-items: center;
  padding: 1rem 0; gap: 0.75rem; flex-wrap: wrap;
}
.social-btn {
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--blanco);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; flex-shrink: 0; transition: opacity 0.2s;
}
.social-btn:hover { opacity: 0.85; }
.social-btn svg { width: 18px; height: 18px; }
.social-fb { background: radial-gradient(circle, var(--verde) 58%, var(--blanco) 40%); }

.mobile-only { display: none; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 991px) { .image-col { display: none; } }

@media (max-width: 768px) {
  .header { margin-bottom: 5rem; }
  .header-pill { border-radius: 100px; transform: translate(-50%, 20%); }
  .btn { padding: 10px 20px; }
  .image-col { display: none; }
}

@media (max-width: 576px) {
  .header { height: auto; margin-bottom: 1rem; padding: 0; }
  .header-pill {
    position: static; transform: none;
    width: calc(100% - 2rem); margin: 0.75rem auto;
    border-radius: 25px; padding: 1rem; justify-content: center;
  }
  .pill-logo img { width: 140px; }
  .pill-btns { display: none; }
  .main { width: 100%; padding: 1rem 1rem 2rem; }
  .content-grid { flex-direction: column; gap: 0; }
  /* form-title mantiene 43px en todas las pantallas — igual que el original */
  .label-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .label-row .btn { width: 100%; justify-content: center; padding: 10px 16px; }
  /* móvil: prometo-trial-bold, 14px, weight 500, color verde — Computed original */
  .btn-verde-outline {
    font-family: 'Prometo-Bold', serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--verde);
    height: 44px;
    padding: 0 12px;
  }
  .recaptcha-box { width: 100%; max-width: 100%; }
  .politicas-row { align-items: flex-start; gap: 10px; }
  .chk-box { flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px; }
  #btn-submit { width: 100%; justify-content: center; padding: 14px 20px; font-size: 15px; }
  .mobile-only { display: flex; gap: 8px; margin-top: 10px; width: 100%; }
  .mobile-only .btn-outlined { flex: 1; justify-content: center; padding: 10px 12px; }
  .mobile-only .btn-naranja  { flex: 2; justify-content: center; padding: 10px 12px; }
  footer { padding: 1rem 1rem 0; }
  .footer-inner { flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
  .footer-logo img { height: 100px; }
  .footer-info p, .footer-links a { text-align: left; }
  .footer-logos { justify-content: center; }
  .footer-logos img:first-child { width: 60px; height: auto; }
  .footer-logos img:last-child  { height: 100px; width: auto; }
  .steps { gap: 0; }
  .step-label { font-size: 10px; }
}

/* ═══════════════════════════════════════
   OVERRIDE RESPONSIVE HEADER
   Sobreescribe los valores del header para móvil/tablet
═══════════════════════════════════════ */

@media (max-width: 768px) {
  .header { margin-bottom: 5rem; }
  .relative-wrap { height: 110px; }
  .header-pill {
    border-radius: 100px;
    bottom: 0;
    transform: translate(-50%, 20%);
  }
  .btn { padding: 10px 20px; }
}

@media (max-width: 576px) {
  .header { margin-bottom: 1rem; }
  .relative-wrap { height: auto; padding: 10px 16px 16px; }
  .header-pill {
    position: static;
    transform: none;
    width: 100%;
    border-radius: 20px;
    padding: 12px 16px;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  }
  .logo-link img, .pill-logo img { width: 140px; }
  .pill-btns { display: none; }
}
