/* Recuperación de contraseña — layout Canva NIC.ec */

@font-face {
  font-family: "Times New Roman Canva";
  src: url("../fonts/TimesNewRoman-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Hoves";
  src: url("../fonts/TTHoves-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Hoves";
  src: url("../fonts/TTHoves-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Touvlo";
  src: url("../fonts/Touvlo-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html.pw-reset-nic,
html.pw-reset-nic body,
html.pw-reset-nic section#main-body,
html.pw-reset-nic .primary-content,
html.pw-reset-nic .main-content,
html.pw-reset-nic .main-container {
  background: #ffffff !important;
  color: #051d40;
  font-family: "TT Hoves", "Segoe UI", Arial, sans-serif !important;
}

html.pw-reset-nic section#main-body {
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

html.pw-reset-nic section#main-body > .container,
html.pw-reset-nic section#main-body .row,
html.pw-reset-nic section#main-body .col-12,
html.pw-reset-nic .primary-content > .container {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Ocultar card wrapper clásico si algún include lo deja */
html.pw-reset-nic .card.mw-540 {
  all: unset;
  display: block;
  width: 100%;
}

.pw-page {
  --pw-navy: #051d40;
  --pw-navy-deep: #0a1f4a;
  --pw-orange: #ff6a00;
  --pw-orange-hover: #e85f00;
  --pw-muted: #3d4f66;
  --pw-rule: #e6eaf0;
  --pw-max: 1100px;
  --pw-title: "Times New Roman Canva", "Times New Roman", Times, Georgia, serif;
  --pw-body: "TT Hoves", "Segoe UI", Arial, sans-serif;
  --pw-ui: "Touvlo", "TT Hoves", Arial, sans-serif;
  /* Misma grilla en hero y help para alinear form e imagen */
  --pw-grid-cols: minmax(0, 1.05fr) minmax(0, 1fr);
  --pw-grid-gap: clamp(1.5rem, 4vw, 3.5rem);

  width: 100%;
  background: #fff;
  color: var(--pw-navy);
  font-family: var(--pw-body);
  padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  box-sizing: border-box;
}

.pw-page *,
.pw-page *::before,
.pw-page *::after {
  box-sizing: border-box;
}

.pw-page__inner {
  width: 100%;
  max-width: var(--pw-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* —— Hero / form section —— */
.pw-hero {
  display: grid;
  grid-template-columns: var(--pw-grid-cols);
  gap: var(--pw-grid-gap);
  align-items: start;
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
}

.pw-hero__copy {
  min-width: 0; /* evita que el nowrap force desborde al grid */
  max-width: 100%;
  padding-top: 0.35rem;
  overflow: hidden;
  container-type: inline-size;
  container-name: pw-copy;
}

.pw-hero__form-wrap {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding-top: 0.15rem;
  box-sizing: border-box;
  justify-self: stretch;
}

.pw-hero__title,
.pw-hero__cta {
  margin: 0;
  font-family: "Times New Roman", Times, Georgia, var(--pw-title), serif;
  font-weight: 600; /* semi-bold */
  /* Tamaño fluído al ancho de la columna; el título se reajusta abajo con cqi */
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--pw-navy);
}

.pw-hero__title {
  font-style: italic;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  /* 1 línea dentro de su columna: escala al ancho del contenedor */
  font-size: clamp(1.35rem, 9.2cqi, 3rem);
}

.pw-hero__cta {
  margin: 1.35rem 0 0;
  font-style: normal;
  line-height: 1.15;
  /* Mismo orden visual, respeta wrap si hace falta en columna estrecha */
  font-size: clamp(2.05rem, 10.5cqi, 3.65rem);
}

.pw-hero__sub {
  margin: 0.7rem 0 0;
  font-family: var(--pw-body);
  font-size: clamp(1.05rem, 1.65vw, 1.2rem);
  font-weight: 400;
  color: var(--pw-muted);
  line-height: 1.45;
}

@supports not (font-size: 1cqi) {
  .pw-hero__title {
    font-size: clamp(1.35rem, 3.2vw, 2.75rem);
  }
  .pw-hero__cta {
    font-size: clamp(1.95rem, 4vw, 3.4rem);
  }
}

.pw-hero__form-intro {
  margin: 0 0 1rem;
  font-family: var(--pw-body);
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--pw-navy);
}

/* Form row: email + submit — ocupa 100% de la columna (alineado con la imagen) */
.pw-form {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.pw-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 32%);
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
}

.pw-input {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 3rem;
  padding: 0 1.15rem;
  border: none;
  border-radius: 999px;
  background: var(--pw-navy-deep);
  color: #fff;
  font-family: var(--pw-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  /* Valor tal cual lo escribe el usuario; mayúsculas solo en placeholder */
  text-transform: none;
  outline: none;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pw-input::placeholder {
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
  text-transform: uppercase;
}

.pw-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.28);
}

.pw-btn {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 3rem;
  padding: 0 1.25rem;
  border: none;
  border-radius: 999px;
  background: var(--pw-orange);
  color: #fff;
  font-family: var(--pw-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pw-btn:hover,
.pw-btn:focus-visible {
  background: var(--pw-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(255, 106, 0, 0.22);
  outline: none;
}

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

.pw-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pw-captcha {
  margin-top: 1rem;
}

.pw-msg {
  margin: 0.95rem 0 0;
  max-width: none;
  width: 100%;
  font-family: var(--pw-body);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--pw-navy);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.pw-msg.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pw-msg--success {
  color: #0f3d2e;
}

.pw-msg--hint {
  opacity: 1;
  transform: none;
  font-style: normal;
  color: var(--pw-navy);
}

.pw-msg--error {
  color: #9b1c1c;
  font-style: normal;
  opacity: 1;
  transform: none;
}

/* Feedback de éxito más visible (tras POST) */
.pw-feedback {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
  font-family: var(--pw-body);
}

.pw-feedback--ok {
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: #14532d;
}

.pw-feedback--ok strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.pw-feedback__text {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
}

.pw-feedback--done {
  margin-bottom: 1rem;
}

.pw-form-row--after-success {
  margin-top: 0.25rem;
}

.pw-btn--block {
  display: inline-flex;
  width: 100%;
  max-width: 100%;
  text-decoration: none !important;
  align-items: center;
  justify-content: center;
}

.pw-btn--block:hover,
.pw-btn--block:focus-visible {
  text-decoration: none !important;
  color: #fff !important;
}

.pw-captcha .form-control {
  color: #111;
  background: #fff;
  text-transform: none;
}

/* Secondary steps (security / new password) inside form column */
.pw-step {
  width: 100%;
}

.pw-step label,
.pw-step .control-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pw-navy);
}

.pw-step .form-control,
.pw-step input[type="text"],
.pw-step input[type="password"],
.pw-step input[type="email"] {
  width: 100%;
  height: 3rem;
  padding: 0 1.25rem;
  border: none;
  border-radius: 999px;
  background: var(--pw-navy-deep);
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
}

/* Contraseña: respetar mayúsculas/minúsculas tal como el usuario las escribe */
html.pw-reset-nic input[type="password"],
.pw-step input[type="password"] {
  text-transform: none !important;
  letter-spacing: normal;
}

.pw-step .form-control::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.pw-step .btn-primary,
.pw-step input[type="submit"],
.pw-step button[type="submit"] {
  height: 3rem;
  padding: 0 1.75rem;
  border: none;
  border-radius: 999px;
  background: var(--pw-orange);
  color: #fff;
  font-family: var(--pw-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.pw-step .btn-default,
.pw-step input[type="reset"] {
  height: 3rem;
  padding: 0 1.25rem;
  margin-left: 0.45rem;
  border: 1.5px solid var(--pw-navy);
  border-radius: 999px;
  background: transparent;
  color: var(--pw-navy);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.pw-step p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--pw-muted);
}

/* Password field + eye + live requirements (change step) */
.pw-step .pw-pw-field {
  margin-bottom: 0.85rem;
}

.pw-step .pw-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.pw-step .pw-pw-wrap .form-control,
.pw-step .pw-pw-wrap input[type="password"],
.pw-step .pw-pw-wrap input[type="text"] {
  width: 100%;
  margin-bottom: 0;
  padding-right: 3rem;
}

.pw-step .pw-pw-wrap.is-error .form-control,
.pw-step .pw-pw-wrap.is-error input {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.55);
}

.pw-step .pw-pw-wrap.is-ok .form-control,
.pw-step .pw-pw-wrap.is-ok input {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45);
}

.pw-step .pw-eye-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  z-index: 2;
}

.pw-step .pw-eye-btn:hover,
.pw-step .pw-eye-btn:focus-visible {
  color: #fff;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.pw-step .pw-eye-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.pw-step .pw-eye-btn.is-revealed {
  color: #f7b10c;
}

.pw-step .pw-pw-hint {
  margin: 0.35rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pw-navy);
}

.pw-step .pw-pw-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.65rem;
}

.pw-step .pw-pw-req {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.pw-step .pw-pw-req svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  stroke: #94a3b8;
  transition: stroke 0.15s ease;
}

.pw-step .pw-pw-req.is-ok {
  color: #16a34a;
}

.pw-step .pw-pw-req.is-ok svg {
  stroke: #16a34a;
}

.pw-step .pw-pw-req.is-pending {
  color: #94a3b8;
}

.pw-step .pw-pw-match-msg {
  min-height: 1.1rem;
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9b1c1c;
}

.pw-step .pw-pw-match-msg:empty {
  display: none;
}

.pw-step .pw-pw-actions {
  margin-top: 0.75rem;
}

.pw-step .pw-pw-actions input[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* —— Help section —— */
.pw-help {
  border-top: none;
  display: grid;
  grid-template-columns: var(--pw-grid-cols);
  gap: var(--pw-grid-gap);
  align-items: center;
}

.pw-help__title {
  margin: 0 0 0.85rem;
  font-family: var(--pw-body);
  font-size: clamp(1.65rem, 2.8vw, 2.45rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--pw-orange);
  text-align: center;
}

.pw-help__text {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--pw-muted);
  text-align: justify
}

.pw-help__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
}

.pw-help__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 17.5rem;
  min-width: 17.5rem;
  box-sizing: border-box;
  height: 2.85rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  font-family: var(--pw-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pw-help__btn:hover,
.pw-help__btn:focus-visible {
  transform: translateY(-1px);
  text-decoration: none !important;
  outline: none;
}

.pw-help__btn--orange {
  background: var(--pw-orange);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.18);
}

.pw-help__btn--orange:hover {
  background: var(--pw-orange-hover);
  color: #fff !important;
}

.pw-help__btn--navy {
  background: var(--pw-navy-deep);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(5, 29, 64, 0.14);
}

.pw-help__btn--navy:hover {
  background: #0c2a5c;
  color: #fff !important;
}

.pw-help__visual {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  border-radius: 1rem;
  overflow: hidden;
  line-height: 0;
  background: #f3f5f8;
}

.pw-help__visual img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

/* Motion entrance */
.pw-page--motion .pw-hero__copy,
.pw-page--motion .pw-hero__form-wrap,
.pw-page--motion .pw-help__copy,
.pw-page--motion .pw-help__visual {
  opacity: 0;
  transform: translateY(14px);
  animation: pw-rise 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.pw-page--motion .pw-hero__form-wrap { animation-delay: 0.08s; }
.pw-page--motion .pw-help__copy { animation-delay: 0.16s; }
.pw-page--motion .pw-help__visual { animation-delay: 0.22s; }

@keyframes pw-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logged-in / global alerts inside page */
.pw-page .alert {
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .pw-hero,
  .pw-help {
    grid-template-columns: 1fr;
  }

  .pw-hero__copy {
    max-width: none;
  }

  .pw-help__visual {
    order: -1;
  }

  .pw-help__actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .pw-help__btn {
    width: 100%;
    max-width: 17.5rem;
    min-width: 0;
  }
}

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

  .pw-input,
  .pw-btn {
    width: 100%;
  }

  .pw-help__actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .pw-help__btn {
    width: 100%;
    max-width: 17.5rem;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-page--motion .pw-hero__copy,
  .pw-page--motion .pw-hero__form-wrap,
  .pw-page--motion .pw-help__copy,
  .pw-page--motion .pw-help__visual,
  .pw-msg {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
