/* ==========================================================
   GlobPay - Paso 2: Así funciona GlobPay
   Sistema de Diseño Oficial: Tipografía, Proporciones y Controles
   ========================================================== */

@import "brand.css";

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--globpay-bg-neutral, #F7F9FA);
  color: var(--globpay-black, #111111);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 16px 20px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Enlace superior saltar video */
.top-nav-bar {
  width: 100%;
  max-width: 960px;
  min-width: 0;
  margin: 0 auto 6px auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 20px;
}

.skip-video-link {
  font-size: 12.5px;
  color: #8C95A0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.skip-video-link:hover {
  color: var(--globpay-black, #111111);
  text-decoration: underline;
}

.skip-video-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--globpay-focus-ring, rgba(11, 182, 181, 0.4));
  border-radius: 4px;
}

/* Contenedor Principal */
.how-it-works-container {
  width: 100%;
  max-width: 900px;
  min-width: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Encabezado */
.brand-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.brand-logo-img {
  width: 130px;
  height: auto;
  aspect-ratio: 1024 / 853;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.step-indicator {
  font-size: 12px;
  font-weight: 500;
  color: var(--globpay-gray-secondary, #6B7280);
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}

/* Barra de Progreso Segmentada (7 pasos) */
.step-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.step-segment {
  width: 26px;
  height: 4px;
  border-radius: 9999px;
  background-color: #E5E7EB;
  transition: background-color 0.2s ease;
}

.step-segment.is-completed {
  background-color: #111111;
}

.step-segment.is-active {
  background-color: #00B6B5;
}

/* Título Serif y Subtítulo */
.page-title {
  font-family: "Playfair Display", Didot, "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--globpay-black, #111111);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.title-serif {
  font-family: inherit;
  color: #111111;
}

.title-brand {
  font-family: inherit;
  color: #00B6B5;
}

.page-subtitle {
  font-size: 14.5px;
  color: var(--globpay-gray-secondary, #6B7280);
  font-weight: 400;
  margin-bottom: 20px;
  max-width: 540px;
  line-height: 1.4;
}

/* ==========================================================
   ESPACIO PARA EL VIDEO (PROPORCIÓN 16:9, ANCHO EXACTO 480px)
   ========================================================== */
.video-section {
  width: 100%;
  max-width: 480px;
  min-width: 0;
  margin-bottom: 8px;
}

.video-container-16-9 {
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background-color: #EAF8F8;
  border: 1px solid #D2F0F0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(11, 182, 181, 0.05);
}

/* Contenido del Placeholder */
.video-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  user-select: none;
}

.video-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #00B6B5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 182, 181, 0.35);
  cursor: default;
}

.play-icon-svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.video-placeholder-title {
  font-family: "Playfair Display", Didot, "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}

.video-placeholder-subtitle {
  font-size: 13px;
  color: #6B7280;
  font-weight: 400;
}

/* Reproductor de Video Activo (cuando exista video en video-config.js) */
.active-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.video-note {
  font-size: 12px;
  color: #8C95A0;
  margin-top: 8px;
  margin-bottom: 14px;
  font-weight: 400;
}

/* ==========================================================
   ACCIONES PRINCIPALES
   ========================================================== */
.action-buttons-wrap {
  width: 100%;
  max-width: 480px;
  min-width: 0;
  margin-bottom: 4px;
}

.btn-primary-continue {
  width: 100%;
  background: #00B6B5;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 182, 181, 0.32);
  transition: all 0.15s ease;
}

.btn-primary-continue:hover {
  background: #00a4a3;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 182, 181, 0.4);
}

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

.btn-primary-continue:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--globpay-focus-ring, rgba(11, 182, 181, 0.4));
}

/* Botón secundario Me quedaron dudas */
.btn-toggle-doubts {
  background: transparent;
  border: none;
  color: #00B6B5;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  transition: opacity 0.15s ease;
  user-select: none;
}

.btn-toggle-doubts:hover {
  opacity: 0.85;
}

.btn-toggle-doubts:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--globpay-focus-ring, rgba(11, 182, 181, 0.4));
  border-radius: 4px;
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.btn-toggle-doubts.is-open .toggle-icon {
  transform: rotate(180deg);
}

/* ==========================================================
   FORMULARIO DE CONSULTA / DUDAS ("Cuéntanos tu duda")
   ========================================================== */
.doubts-card {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 22px 24px 18px 24px;
  text-align: left;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
  margin-bottom: 18px;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.doubts-card.is-hidden {
  display: none !important;
}

.doubts-card-title {
  font-family: "Playfair Display", Didot, "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 700;
  color: #111111;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.doubts-card-subtitle {
  font-size: 13.5px;
  color: #6B7280;
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #111111;
  background-color: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9CA3AF;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #00B6B5;
  box-shadow: 0 0 0 3px rgba(11, 182, 181, 0.18);
}

.form-input.has-error,
.form-textarea.has-error {
  border-color: #EF4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.field-error {
  display: block;
  font-size: 12px;
  color: #DC2626;
  margin-top: 4px;
  min-height: 16px;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-action-wrap {
  margin-top: 16px;
  margin-bottom: 10px;
}

.btn-submit-inquiry {
  width: 100%;
  background: #FFFFFF;
  color: #111111;
  border: 1.5px solid #00B6B5;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.85;
  transition: all 0.15s ease;
}

.btn-submit-inquiry:hover {
  background: #F9FEFE;
}

.inquiry-disabled-notice {
  font-size: 12px;
  color: #8C95A0;
  text-align: center;
  margin-top: 6px;
}

/* ==========================================================
   TARJETA DE CONFIRMACIÓN / PROGRESO GUARDADO
   ========================================================== */
.save-confirmation-card {
  background: #FFFFFF;
  border: 1.5px solid #00B6B5;
  border-radius: 12px;
  padding: 20px 24px;
  max-width: 600px;
  width: 100%;
  margin: 16px auto;
  text-align: center;
  box-shadow: 0 8px 24px rgba(11, 182, 181, 0.15);
  animation: fadeIn 0.25s ease;
}

.save-confirmation-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00B6B5;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
}

.save-confirmation-title {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 6px;
}

.save-confirmation-text {
  font-size: 14px;
  color: #4B5563;
  margin-bottom: 14px;
  line-height: 1.5;
}

.dev-panel-link {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #00B6B5;
  text-decoration: none;
}

.dev-panel-link:hover {
  text-decoration: underline;
}

/* ==========================================================
   PIE DE PÁGINA (NAVEGACIÓN ← VOLVER)
   ========================================================== */
.page-footer {
  width: 100%;
  max-width: 900px;
  min-width: 0;
  margin: 16px auto 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.back-link {
  font-size: 13.5px;
  color: #6B7280;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--globpay-black, #111111);
}

.back-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--globpay-focus-ring, rgba(11, 182, 181, 0.4));
  border-radius: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   ADAPTABILIDAD MÓVIL (360px, 390px, 430px)
   ========================================================== */
@media (max-width: 640px) {
  body {
    padding: 12px 14px 18px 14px;
    align-items: stretch;
  }

  .top-nav-bar {
    width: 100%;
    max-width: 100%;
    justify-content: flex-end;
    margin-bottom: 2px;
    padding: 0 2px;
  }

  .skip-video-link {
    font-size: 11.5px;
  }

  .how-it-works-container {
    width: 100%;
    max-width: 100%;
  }

  .page-title {
    font-size: 24px;
    line-height: 1.25;
  }

  .page-subtitle {
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.4;
  }

  .step-segment {
    width: 18px;
    height: 3.5px;
  }

  .video-section {
    width: 100%;
    max-width: 100%;
    margin-bottom: 6px;
  }

  .video-placeholder-title {
    font-size: 14.5px;
  }

  .video-placeholder-subtitle {
    font-size: 12px;
  }

  .video-play-btn {
    width: 42px;
    height: 42px;
    margin-bottom: 8px;
  }

  .play-icon-svg {
    width: 16px;
    height: 16px;
  }

  .video-note {
    font-size: 11.5px;
    margin-top: 6px;
    margin-bottom: 10px;
  }

  .action-buttons-wrap,
  .doubts-card {
    width: 100%;
    max-width: 100%;
  }

  .doubts-card {
    padding: 16px 14px;
  }

  .form-input,
  .form-textarea {
    font-size: 16px; /* Evita zoom automático en navegadores móviles */
  }

  .btn-primary-continue {
    padding: 13px 18px;
    font-size: 14.5px;
  }

  .btn-toggle-doubts {
    font-size: 13px;
    margin-bottom: 10px;
  }
}

@media (max-width: 380px) {
  .page-title {
    font-size: 21px;
  }
  .step-segment {
    width: 14px;
  }
}

/* ==========================================================
   MODOS DE PREVISUALIZACIÓN MÓVIL ESTRICTA (TESTING Y CAPTURAS)
   ========================================================== */
body.preview-360,
body.preview-360 .how-it-works-container,
body.preview-360 .top-nav-bar,
body.preview-360 .page-footer {
  width: 360px !important;
  max-width: 360px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

body.preview-390,
body.preview-390 .how-it-works-container,
body.preview-390 .top-nav-bar,
body.preview-390 .page-footer {
  width: 390px !important;
  max-width: 390px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

body.preview-430,
body.preview-430 .how-it-works-container,
body.preview-430 .top-nav-bar,
body.preview-430 .page-footer {
  width: 430px !important;
  max-width: 430px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}
