diff --git a/starlette/routing.py b/starlette/routing.py
index 7a0d7ef..a1e4619 100644
--- a/starlette/routing.py
+++ b/starlette/routing.py
@@ -336,15 +336,18 @@ class Mount(BaseRoute):
             else:
                 # 'name' matches "<mount_name>:<child_name>".
                 remaining_name = name[len(self.name) + 1 :]
+            path_kwarg = path_params.get("path")
             path_params["path"] = ""
-            path, remaining_params = replace_params(
+            path_prefix, remaining_params = replace_params(
                 self.path_format, self.param_convertors, path_params
             )
+            if path_kwarg is not None:
+                remaining_params["path"] = path_kwarg
             for route in self.routes or []:
                 try:
                     url = route.url_path_for(remaining_name, **remaining_params)
                     return URLPath(
-                        path=path.rstrip("/") + str(url), protocol=url.protocol
+                        path=path_prefix.rstrip("/") + str(url), protocol=url.protocol
                     )
                 except NoMatchFound:
                     pass

Mounts without a name strips the path arg from calls to child routes in url_path_for
I'm using an unnamed Mount which contains a mount to a StaticFiles instance and when using "url_for" it is unable to find the matching file. After a bit of digging it seems to be directly related to url_for_path in Mount clearing the path arg whenever the mount does not have a name set. 

https://github.com/encode/starlette/blob/master/starlette/routing.py#L337

Calling url_path_for in the child router works as expected. I'm unclear as to why you'd want to strip this arg just because the mount is not named.

```
app.mount('/stuff', app=Router(routes=[
    Mount('/static', app=StaticFiles(directory='static'), name='static'),
]))
```

```
In [6]: app.url_path_for('static', path='css/bootstap.min.css')
---------------------------------------------------------------------------
NoMatchFound
...
In [7]: app.routes[0].routes[0].url_path_for('static', path='css/bootstap.min.css')
Out[7]: '/static/css/bootstap.min.css'
```
diff --git a/tests/test_routing.py b/tests/test_routing.py
index 9723e46..30645ef 100644
--- a/tests/test_routing.py
+++ b/tests/test_routing.py
@@ -400,3 +400,14 @@ def test_url_for_with_root_path():
         "index": "https://www.example.org/sub_path/",
         "submount": "https://www.example.org/sub_path/submount/",
     }
+
+
+double_mount_routes = [
+    Mount("/mount", name="mount", routes=[Mount("/static", ..., name="static")],),
+]
+
+
+def test_url_for_with_double_mount():
+    app = Starlette(routes=double_mount_routes)
+    url = app.url_path_for("mount:static", path="123")
+    assert url == "/mount/static/123"

pip install -e .[full]
parse_log_pytest
requirements.txt
pytest pytest-cov autoflake black isort mypy databases[sqlite]
apt-get update apt-get install -y gcc
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiofiles==23.2.1
aiosqlite==0.19.0
autoflake==2.1.1
Babel==2.14.0
black==23.3.0
certifi @ file:///croot/certifi_1671487769961/work/certifi
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
coverage==7.2.7
databases==0.8.0
exceptiongroup==1.2.2
ghp-import==2.1.0
graphene==3.4.3
graphql-core==3.2.6
graphql-relay==3.2.0
greenlet==3.1.1
idna==3.10
importlib-metadata==6.7.0
iniconfig==2.0.0
isort==5.11.5
itsdangerous==2.1.2
Jinja2==3.1.6
Markdown==3.4.4
MarkupSafe==2.1.5
mergedeep==1.3.4
mkdocs==1.5.3
mkdocs-material==9.2.7
mkdocs-material-extensions==1.2
mypy==1.4.1
mypy-extensions==1.0.0
packaging==24.0
paginate==0.5.7
pathspec==0.11.2
platformdirs==4.0.0
pluggy==1.2.0
pyflakes==3.0.1
Pygments==2.17.2
pymdown-extensions==10.2.1
pytest==7.4.4
pytest-cov==4.1.0
python-dateutil==2.9.0.post0
python-multipart==0.0.8
pytz==2025.2
PyYAML==6.0.1
pyyaml_env_tag==0.1
regex==2022.10.31
requests==2.31.0
six==1.17.0
SQLAlchemy==1.4.54
-e git+https://github.com/encode/starlette.git@a92df1f61ede3b63ee9dcb315ce363c14242597b#egg=starlette
tomli==2.0.1
typed-ast==1.5.5
typing_extensions==4.7.1
ujson==5.7.0
urllib3==2.0.7
watchdog==3.0.0
zipp==3.15.0

name: starlette
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aiofiles==23.2.1
      - aiosqlite==0.19.0
      - autoflake==2.1.1
      - babel==2.14.0
      - black==23.3.0
      - charset-normalizer==3.4.1
      - click==8.1.8
      - colorama==0.4.6
      - coverage==7.2.7
      - databases==0.8.0
      - exceptiongroup==1.2.2
      - ghp-import==2.1.0
      - graphene==3.4.3
      - graphql-core==3.2.6
      - graphql-relay==3.2.0
      - greenlet==3.1.1
      - idna==3.10
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - isort==5.11.5
      - itsdangerous==2.1.2
      - jinja2==3.1.6
      - markdown==3.4.4
      - markupsafe==2.1.5
      - mergedeep==1.3.4
      - mkdocs==1.5.3
      - mkdocs-material==9.2.7
      - mkdocs-material-extensions==1.2
      - mypy==1.4.1
      - mypy-extensions==1.0.0
      - packaging==24.0
      - paginate==0.5.7
      - pathspec==0.11.2
      - platformdirs==4.0.0
      - pluggy==1.2.0
      - pyflakes==3.0.1
      - pygments==2.17.2
      - pymdown-extensions==10.2.1
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - python-dateutil==2.9.0.post0
      - python-multipart==0.0.8
      - pytz==2025.2
      - pyyaml==6.0.1
      - pyyaml-env-tag==0.1
      - regex==2022.10.31
      - requests==2.31.0
      - six==1.17.0
      - sqlalchemy==1.4.54
      - tomli==2.0.1
      - typed-ast==1.5.5
      - typing-extensions==4.7.1
      - ujson==5.7.0
      - urllib3==2.0.7
      - watchdog==3.0.0
      - zipp==3.15.0
prefix: /opt/conda/envs/starlette

tests/test_routing.py::test_url_for_with_double_mount
tests/test_routing.py::test_router tests/test_routing.py::test_route_converters tests/test_routing.py::test_url_path_for tests/test_routing.py::test_url_for tests/test_routing.py::test_router_add_route tests/test_routing.py::test_router_duplicate_path tests/test_routing.py::test_router_add_websocket_route tests/test_routing.py::test_protocol_switch tests/test_routing.py::test_mount_urls tests/test_routing.py::test_reverse_mount_urls tests/test_routing.py::test_mount_at_root tests/test_routing.py::test_host_routing tests/test_routing.py::test_host_reverse_urls tests/test_routing.py::test_subdomain_routing tests/test_routing.py::test_subdomain_reverse_urls tests/test_routing.py::test_url_for_with_root_path
starlette/routing.py
starlette/routing.py