/* ========== CALCULADORA DE HIPOTECAS ========== */
.calculadora-hipotecas-wrapper {
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 0 !important;
  overflow-x: hidden;
  background: #f8f9fa;
}

/* Título principal */
.sim_h2_negro {
  font-size: 42px;
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding: 80px 20px 40px;
  margin: 0;
}

.sim_h2_negro::after {
  content: "";
  display: block;
  width: 100px;
  height: 4px;
  background: #f16901;
  margin: 20px auto 0;
}

/* Contenedor de calculadoras */
.row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.col-lg-6 {
  flex: 1;
  min-width: 300px;
}

/* Estilos de cada calculadora */
.calculadora-estilos {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden !important;
  height: 100%;
  transition: all 0.3s ease;
}

.calculadora-estilos:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* Subtítulos de calculadoras */
.sim_h3_negro {
  font-size: 28px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding: 35px 30px;
  margin: 0;
  text-align: center;
  line-height: 1.4;
}

.sim_h3_negro .highlight {
  color: #f16901;
  display: block;
  font-size: 32px;
  margin-top: 10px;
}

/* Contenido de calculadora */
.div_calculadoras {
  padding: 40px 35px 60px 35px !important;
  overflow: visible !important;
}

.textoContenido p {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin: 15px 0;
}

.textoContenido p strong {
  color: #2c3e50;
  font-weight: 600;
}

/* Formularios */
.div_calculadoras form {
  margin: 30px 0;
}

.div_calculadoras table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0 !important;
}

.div_calculadoras table td {
  padding: 12px 0;
  vertical-align: middle;
}

/* Inputs y Selects */
.div_calculadoras input[type="number"],
.div_calculadoras input[type="text"],
.div_calculadoras select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
  color: #2c3e50;
}

.div_calculadoras input[type="number"]:focus,
.div_calculadoras input[type="text"]:focus,
.div_calculadoras select:focus {
  border-color: #f16901;
  outline: none;
  box-shadow: 0 0 0 3px rgba(241, 105, 1, 0.1);
}

.div_calculadoras select {
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}

.div_calculadoras input::placeholder {
  color: #999;
}

/* Celda del botón con espacio adicional */
.div_calculadoras table tr:last-child td {
  padding-top: 25px !important;
  padding-bottom: 5px !important;
}

/* Botón Calcular */
.Be1,
input[type="submit"].Be1 {
  display: block;
  width: 100%;
  height: 50px;
  padding: 16px 40px;
  background: #f16901;
  color: white !important;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(241, 105, 1, 0.3);
  margin: 0 !important;
  line-height: 1.5;
}

.Be1:hover,
input[type="submit"].Be1:hover {
  background: #d45801;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(241, 105, 1, 0.4);
}

.Be1:active,
input[type="submit"].Be1:active {
  transform: translateY(0) !important;
}

/* Resultado - Precio destacado */
.precio {
  display: block;
  font-size: 56px;
  font-weight: 900;
  color: #f16901;
  text-align: center;
  margin: 30px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 3px solid #f16901;
}

/* Alertas */
.alert {
  padding: 20px;
  border-radius: 5px;
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.6;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-left: 5px solid #28a745;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-left: 5px solid #dc3545;
}

.alert strong {
  font-weight: 700;
}

/* Nota informativa pequeña */
.div_calculadoras p:last-child {
  font-size: 13px;
  color: #999;
  font-style: italic;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* Calculadora a ancho completo (cuando hay tipo_calc) */
.calculadora-estilos[style*="width:100%"] {
  max-width: 900px;
  margin: 0 auto 40px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 968px) {
  /* Reducir padding lateral del contenedor principal */
  .row {
    padding: 0 15px 60px !important;
    flex-direction: column;
    gap: 25px;
  }

  /* Asegurar que las columnas ocupen el 100% */
  .row .col-lg-6 {
    width: 100% !important;
    flex: none !important;
    min-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Asegurar que las calculadoras ocupen todo el ancho */
  .calculadora-estilos {
    width: 100% !important;
    margin: 0 !important;
  }

  .sim_h2_negro {
    font-size: 32px;
    padding: 60px 15px 30px;
  }

  .sim_h3_negro {
    font-size: 24px;
    padding: 25px 20px;
  }

  .sim_h3_negro .highlight {
    font-size: 26px;
  }

  .div_calculadoras {
    padding: 30px 20px 50px 20px !important;
  }

  .textoContenido p {
    font-size: 15px;
  }

  .precio {
    font-size: 42px;
    padding: 25px 15px;
  }

  .div_calculadoras input[type="number"],
  .div_calculadoras input[type="text"],
  .div_calculadoras select {
    padding: 12px 14px;
    font-size: 14px;
  }

  .Be1,
  input[type="submit"].Be1 {
    padding: 14px 30px;
    font-size: 14px;
  }

  .alert {
    padding: 15px;
    font-size: 14px;
  }

  /* Calculadora a ancho completo en móvil */
  .calculadora-estilos[style*="width:100%"] {
    max-width: 100% !important;
    margin: 0 0 30px 0 !important;
  }

  .container {
    margin-right: auto;
    margin-left: auto;
    padding-left: 0px;
    padding-right: 0px;
  }
  #main-content .block-content > .container {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  /* Reducir aún más los márgenes en móviles pequeños */
  .row {
    padding: 0 10px 50px !important;
    gap: 20px;
  }

  .sim_h2_negro {
    font-size: 26px;
    padding: 50px 10px 25px;
  }

  .sim_h3_negro {
    font-size: 20px;
    padding: 20px 15px;
  }

  .sim_h3_negro .highlight {
    font-size: 22px;
  }

  .div_calculadoras {
    padding: 25px 15px 45px 15px !important;
  }
  .precio {
    font-size: 36px;
    padding: 20px 10px;
  }
}
