:root {
  --brand-main: #199951;
  --brand-dark: #12753e;
  --brand-light: #e8f5ed;
  --bg-outer: #f0f4f2;
  --text-dark: #1a1a1a;
  --text-gray: #576574;
  --white: #ffffff;
  --error-red: #fb1f22;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  background:
    linear-gradient(rgba(240, 244, 242, 0.88), rgba(240, 244, 242, 0.88)),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=2000&q=100");
  background-color: var(--bg-outer);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 40px 0;
  box-sizing: border-box;
  background: transparent !important;
  overflow-x: hidden;
}

.boxed-container {
  width: 95%;
  max-width: 1000px;
  min-height: 680px;
  height: auto;
  background-color: var(--white);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
}

.visual-panel {
  flex: 1;
  padding: 60px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
  transition: background-image 1s ease-in-out;
  background-image: url("https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1000&q=80");
}

.visual-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg,
      rgba(25, 153, 81, 0.7) 0%,
      rgba(12, 117, 62, 0.55) 100%);
  z-index: 1;
}

#left-title,
#left-desc {
  position: relative;
  z-index: 2;
  margin: 0;
  opacity: 0;
}

.visual-panel h1 {
  font-size: 2.1rem;
  line-height: 1.1;
  margin-bottom: 24px;
  font-weight: 800;
}

.visual-panel p {
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 300;
}

.form-panel {
  flex: 1.2;
  padding: 40px 50px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  position: relative;
  /* Para el loader absoluto */
}

.header-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.logo-item {
  height: 45px;
  max-width: 130px;
  object-fit: contain;
}

.footer-logos-container {
  width: 100%;
  margin-top: 40px;
  text-align: center;
}

.bank-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px 10px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 30px auto;
  padding: 0 10px;
  box-sizing: border-box;
  opacity: 1;
}

.bank-grid img {
  width: calc(33.33% - 15px);
  max-width: 100px;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.bank-logo {
  height: 60px;
  width: auto;
  transition: transform 0.3s;
}

.bank-logo:hover {
  transform: scale(1.1);
}

.copyright-text {
  color: var(--text-gray);
  font-size: 14px;
  margin-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
}

.copyright-text span {
  line-height: 1.5;
}

.copyright-text span a {
  font-weight: 600;
  text-decoration: none;
  color: #12753e;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: #f1f2f6;
  border-radius: 10px;
  margin-bottom: 0px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-main);
  border-radius: 10px;
  transition: width 0.6s ease;
}

.step-content-scroll {
  flex-grow: 1;
  padding-right: 10px;
  margin-bottom: 10px;
  min-height: 400px;
}

.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: slideIn 0.5s ease;
}

h2 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-weight: 700;
}

.subtitle {
  color: var(--text-gray);
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: block;
}

.input-group {
  margin-bottom: 15px;
  text-align: left;
  position: relative;
}

.custom-input {
  width: 100%;
  height: 47px;
  padding: 11px 15px;
  border: 2px solid #f1f2f6;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  display: block;
  line-height: 1.2;
}

.custom-input:focus {
  outline: none;
  border-color: var(--brand-main);
}

.custom-input.is-invalid {
  border-color: var(--error-red) !important;
  background-color: #fff9f9;
}

/* Normalización para que todos los inputs mantengan la misma altura */
input[type="date"],
input[type="text"],
input[type="tel"],
select.custom-input {
  min-height: 47px;
  height: 47px;
  box-sizing: border-box;
}

select.custom-input:invalid {
  color: #757575;
  /* Ajusta este gris para que combine exacto con tus otros placeholders */
}

select.custom-input option {
  color: var(--text-dark);
}

.field-error {
  color: var(--error-red);
  font-size: 11px;
  margin-top: 4px;
  display: none;
  font-weight: 500;
}

.general-error {
  color: var(--error-red);
  font-size: 0.85rem;
  font-weight: 400;
  text-align: center;
  margin-top: 10px;
  display: none;
}

.option-card {
  border: 2px solid #f1f2f6;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s ease;
  background: var(--white);
}

.option-card:has(input:checked) {
  border-color: var(--brand-main) !important;
  background: var(--brand-light) !important;
}

.option-card:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f8faf9;
  border-color: #e2e8e6;
  pointer-events: none;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--brand-main);
  width: 18px;
  height: 18px;
}

.info-box {
  background-color: var(--brand-light);
  border-left: 4px solid var(--brand-main);
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--brand-dark);
  display: none;
}

.info-box ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.info-box li {
  margin-bottom: 4px;
}

.legal-box {
  background: #f8faf9;
  border: 1px solid #e2e8e6;
  border-radius: 12px;
  padding: 15px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #4a5568;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.checkbox-container {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-dark);
}

.results-status-box {
  background-color: var(--brand-light);
  border-left: 4px solid var(--brand-main);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.status-title {
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 10px 0;
}

.status-text {
  color: var(--text-gray);
  font-size: 0.85rem;
  margin: 0 0 15px 0;
  line-height: 1.5;
}

.table-caption {
  font-size: 0.85rem;
  color: var(--text-gray);
  font-weight: 400;
  margin-bottom: 12px;
  display: block;
  text-align: left;
  line-height: 1.4;
}

.simulation-table-container {
  width: 100%;
  margin-top: 10px;
}

.simulation-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.85rem;
}

.simulation-table thead {
  background-color: var(--brand-dark);
  color: var(--white);
}

.simulation-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.simulation-table tbody tr:nth-child(odd) {
  background-color: #c9f5db;
}

.simulation-table td {
  padding: 12px;
  color: var(--text-dark);
  border-bottom: 1px solid #f0f0f0;
}

.legal-disclaimer {
  font-size: 0.75rem;
  color: #a0a0a0;
  line-height: 1.5;
  margin-top: 25px;
  text-align: justify;
  font-weight: 300;
}

.nav-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid #f8f9fa;
}

.btn {
  padding: 12px 30px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
}

.btn-next {
  background: var(--brand-main);
  color: var(--white);
}

.btn-back {
  background: transparent;
  color: var(--text-gray);
}

/* Loader Styles */
#loader-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--brand-light);
  border-top: 5px solid var(--brand-main);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (min-width: 1025px) {
  .boxed-container {
    max-width: 1100px;
  }

  .form-panel {
    padding: 50px 60px;
  }

  .visual-panel {
    flex: 1.1;
  }
}

@media (max-width: 850px) {
  .main-wrapper {
    padding: 0;
    display: block;
  }

  .boxed-container {
    width: 100%;
    height: auto;
    min-height: 100vh;
    display: block;
    border-radius: 0;
    box-shadow: none;
  }

  .visual-panel {
    height: 30vh;
    padding: 30px 20px;
  }

  .form-panel {
    padding: 20px;
    border-radius: 30px 30px 0 0;
    margin-top: -30px;
    z-index: 10;
    position: relative;
    min-height: 60vh;
  }

  .step-content-scroll {
    min-height: auto;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-text {
  animation: fadeInUp 0.9s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(15px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.custom-swal-popup {
  width: 350px !important;
  padding: 1.5rem !important;
  border-radius: 15px !important;
}

.custom-swal-title {
  font-size: 1.25rem !important;
  color: #333 !important;
  font-weight: 600 !important;
}

.custom-swal-text {
  font-size: 1.05rem !important;
  color: #666 !important;
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.swal2-icon.swal2-success {
  transform: scale(0.8);
  margin-bottom: 0 !important;
  margin-top: 0px;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
}
