/* Fondo continuo de registro (top + middle + bottom) */
.registro-page {
  background:
    url("../img/top-hd.jpg") top center no-repeat,
    url("../img/fill-hd.jpg") top center repeat-y,
    url("../img/bottom-hd.jpg") bottom center no-repeat;
  background-size:
    100% auto,
    100% 396px,
    100% auto;
  background-color: #f7efe5;
}

/* Registro: estilo homologado para Investigación y Beca */
.registro-page .custom-navbar:not(.scrolled) .nav-link {
  color: #022366 !important;
}

.registro-page .custom-navbar:not(.scrolled) .dropdown-toggle::after {
  border-top-color: #022366;
}

.registro-page .registro-hero {
  height: clamp(280px, 33vw, 380px);
  min-height: 280px;
  background-image: url("../img/tools.svg");
  background-size: clamp(320px, 35vw, 560px);
  background-position: right -22px bottom -28px;
  background-repeat: no-repeat;
  background-color: transparent;
  overflow: hidden;
}

.registro-page .registro-hero__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.registro-page .registro-hero__content {
  z-index: 1;
  width: 100%;
}

.registro-page .registro-hero__branding {
  max-width: 980px;
  margin-inline: auto;
}

.registro-page .registro-hero h1 {
  color: var(--blue-roche-400);
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.62);
  letter-spacing: 0.01em;
}

.registro-page .registro-hero__tutorial-btn {
  border-radius: 999px;
  padding-inline: 1.35rem;
  background-color: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 10px 24px rgba(255, 125, 41, 0.35);
}

.registro-page .registro-hero__tutorial-btn:hover,
.registro-page .registro-hero__tutorial-btn:focus {
  background-color: #e96917;
  border-color: #e96917;
}

.registro-theme .registro-shell {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none;
}

.registro-theme #formulario {
  align-items: stretch;
}

.registro-theme #formulario > .registro-main-column {
  flex: 1;
  min-width: 0;
}

.registro-theme .registro-steps-panel {
  border-radius: 1rem !important;
  overflow: hidden !important;
  background-clip: padding-box;
  border: none !important;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(170deg, var(--blue-roche-300) 0%, var(--blue-roche-500) 66%, #0d3754 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 26px rgba(1, 54, 136, 0.34);
}

.registro-theme .registro-step-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(1, 54, 136, 0.12);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  overflow: hidden;
}

.registro-theme .registro-stepper small {
  color: #5f6772 !important;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.registro-theme .registro-steps-panel .display-4,
.registro-theme .registro-steps-panel .lead {
  color: #eff5ff;
}

/* Círculo de paso */
.step-circle {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  margin-bottom: 5px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.registro-theme .step-circle.bg-primary {
  background-color: var(--orange) !important;
  border: 2px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 6px 16px rgba(255, 125, 41, 0.35);
  transform: translateY(-1px);
}

.registro-theme .step-circle.bg-secondary {
  background-color: rgba(1, 54, 136, 0.45) !important;
  border: 2px solid rgba(255, 255, 255, 0.22);
}

.registro-theme .registro-form-card {
  background: #fff !important;
  border: 1px solid rgba(1, 54, 136, 0.12) !important;
  box-shadow: 0 16px 30px rgba(17, 44, 54, 0.08);
}

.registro-theme .registro-form-card h5 {
  color: var(--blue-roche-400);
  font-weight: 700;
}

.registro-theme .progress {
  height: 12px;
  background: #dfeafb;
}

.registro-theme .progress .progress-bar {
  background: linear-gradient(90deg, var(--blue-roche-300), var(--blue-bright-300)) !important;
}

.registro-theme label,
.registro-theme .form-check-label {
  color: #4b5563;
  font-weight: 500;
}

.registro-theme .form-control,
.registro-theme .form-select {
  border-color: rgba(1, 54, 136, 0.2);
}

.registro-theme .form-control:focus,
.registro-theme .form-select:focus {
  border-color: var(--blue-roche-300);
  box-shadow: 0 0 0 0.2rem rgba(11, 65, 205, 0.16);
}

.registro-theme .form-control.border-0.border-bottom,
.registro-theme .form-select.border-0.border-bottom {
  border-bottom-color: rgba(1, 54, 136, 0.22) !important;
}

.registro-theme .btn-primary,
.registro-theme .btn-secondary,
.registro-theme .btn-success {
  border-radius: 999px;
  font-weight: 600;
}

.registro-theme .btn-primary {
  background-color: var(--blue-roche-300);
  border-color: var(--blue-roche-300);
}

.registro-theme .btn-primary:hover,
.registro-theme .btn-primary:focus {
  background-color: var(--blue-roche-400);
  border-color: var(--blue-roche-400);
}

.registro-theme .btn-secondary {
  background-color: #6d7280;
  border-color: #6d7280;
}

.registro-theme .btn-secondary:hover,
.registro-theme .btn-secondary:focus {
  background-color: #5f6471;
  border-color: #5f6471;
}

.registro-theme .btn-success {
  background-color: var(--orange);
  border-color: var(--orange);
}

.registro-theme .btn-success:hover,
.registro-theme .btn-success:focus {
  background-color: #e96917;
  border-color: #e96917;
}

.registro-theme .alert-info {
  border: 1px solid #c9dcff;
  background-color: #eaf2ff;
  color: #0f355f;
}

.registro-theme .alert-light {
  border: 1px solid #eedec6;
  background-color: #fffaf2;
}

.registro-theme .alert-warning {
  border: 1px solid #ffd495;
  background-color: #fff4e0;
  color: #8f5a00;
}

.registro-theme #coautores_section .border.p-3.mb-3 {
  border-color: rgba(1, 54, 136, 0.16) !important;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff, #fdfdfd);
}

.registro-theme .modal-content {
  border-radius: 1rem;
  border: 1px solid rgba(1, 54, 136, 0.16);
}

.registro-theme .modal-header {
  background: #edf3ff;
  color: var(--blue-roche-400);
}

/* Transición de desvanecimiento */
.fade-transition {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out, visibility 0.4s;
  height: 0;
  overflow: hidden;
}

.fade-transition.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  height: auto;
}

@media (max-width: 991.98px) {
  .registro-page .registro-hero {
    height: clamp(250px, 40vw, 330px);
    min-height: 250px;
    background-size: clamp(260px, 40vw, 430px);
    background-position: right -30px bottom -40px;
  }

  .registro-page .registro-hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }

  .registro-theme .registro-shell {
    padding: 0.35rem;
  }

  .registro-theme #formulario {
    padding: 1rem !important;
  }

  .registro-theme .registro-form-card {
    padding: 1.25rem !important;
  }
}

@media (max-width: 767.98px) {
  .registro-page .registro-hero {
    min-height: 300px;
    height: auto;
    padding-top: 5.5rem;
    padding-bottom: 2.25rem;
    background-size: clamp(220px, 58vw, 340px);
    background-position: right -46px bottom -62px;
  }

  .registro-page .registro-hero__content {
    position: static !important;
    transform: none !important;
  }

  .registro-page .registro-hero__branding {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem !important;
    margin-bottom: 0 !important;
  }

  .registro-page .registro-hero__branding img {
    width: auto !important;
    max-height: 42px;
  }
}
