.routes-page {
    min-height: 100vh;
    background: var(--bg);
}

.routes-hero {
    padding: 180px 0 105px;
    color: #fff;
    background:
        radial-gradient(
            circle at 82% 20%,
            rgba(118, 179, 52, 0.18),
            transparent 32%
        ),
        linear-gradient(135deg, #4b6754, #17271f 74%);
}

.routes-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.58fr);
    gap: 90px;
    align-items: end;
}

.routes-hero h1 {
    max-width: 820px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(58px, 8vw, 104px);
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -0.045em;
}

.routes-hero__intro {
    padding-bottom: 8px;
}

.routes-hero__intro p {
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 18px;
}

.routes-hero__intro a {
    padding-bottom: 8px;
    display: inline-flex;
    gap: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.36);
    font-size: 14px;
}

.routes-hero__intro a span {
    color: var(--accent);
}

.routes-list {
    padding: 120px 0;
}

.routes-location {
    padding: 100px 0;
    background: #e7dfd1;
}

.routes-location__grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
    gap: 70px;
    align-items: center;
}

.routes-location h2 {
    margin: 0 0 25px;
    font-family: var(--font-heading);
    font-size: clamp(44px, 5vw, 66px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.035em;
}

.routes-location address {
    margin: 0 0 22px;
    color: var(--brown);
    font-family: var(--font-heading);
    font-size: clamp(25px, 2.4vw, 36px);
    font-style: normal;
    line-height: 1.18;
}

.routes-location__content > p {
    max-width: 570px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.routes-location__actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.routes-location__actions .button-light {
    border: 1px solid rgba(34, 46, 42, 0.18);
}

.routes-location__map {
    height: 520px;
    overflow: hidden;
    border: 1px solid rgba(34, 46, 42, 0.12);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 28px 70px rgba(34, 46, 42, 0.12);
}

.routes-location__map iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.routes-park-map {
    padding: 110px 0;
    background: #f5f1e9;
}

.routes-park-map__heading {
    margin-bottom: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.56fr);
    gap: 70px;
    align-items: end;
}

.routes-park-map__heading h2 {
    max-width: 760px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(48px, 6vw, 78px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.routes-park-map__heading > p {
    margin: 0 0 7px;
    color: var(--muted);
}

.routes-map-controls {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.routes-map-color-note {
    max-width: 840px;
    margin: -18px 0 28px;
    color: var(--muted);
}

.routes-map-color-note strong {
    color: var(--text);
}

.routes-map-filter {
    min-height: 46px;
    padding: 10px 17px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(34, 46, 42, 0.16);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.7);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease,
        transform 180ms ease;
}

.routes-map-filter:hover,
.routes-map-filter:focus-visible {
    border-color: var(--green);
    transform: translateY(-2px);
}

.routes-map-filter.is-active {
    color: #fff;
    border-color: var(--dark);
    background: var(--dark);
}

.routes-map-filter__dot,
.route-map-marker {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #716659;
}

.routes-map-legend {
    margin: 0 0 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.routes-map-legend__item {
    padding: 14px 16px;
    border-top: 3px solid #716659;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
}

.routes-map-legend__item strong,
.routes-map-legend__item span {
    display: block;
}

.routes-map-legend__item strong {
    margin-bottom: 4px;
    font-size: 14px;
}

.routes-map-legend__item span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.routes-map-legend__item--red {
    border-color: #bd3d31;
}

.routes-map-legend__item--orange {
    border-color: #d87b27;
}

.routes-map-legend__item--green {
    border-color: #3d7d45;
}

.routes-map-legend__item--far {
    border-color: #356b78;
}

.routes-map-filter__dot--red,
.route-map-marker--red {
    background: #bd3d31;
}

.routes-map-filter__dot--orange,
.route-map-marker--orange {
    background: #d87b27;
}

.routes-map-filter__dot--green,
.route-map-marker--green {
    background: #3d7d45;
}

.routes-map-filter__dot--far,
.route-map-marker--far {
    background: #356b78;
}

.routes-park-map__canvas {
    height: min(680px, 72vh);
    min-height: 480px;
    overflow: hidden;
    border: 1px solid rgba(34, 46, 42, 0.12);
    border-radius: 30px;
    background: #dfe6de;
    box-shadow: 0 28px 70px rgba(34, 46, 42, 0.12);
}

.routes-park-map__canvas .leaflet-popup-content-wrapper,
.routes-park-map__canvas .leaflet-popup-tip {
    color: var(--text);
    background: #fffdf8;
}

.routes-park-map__canvas .leaflet-popup-content-wrapper {
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(21, 40, 30, 0.2);
}

.routes-park-map__canvas .leaflet-popup-content {
    margin: 16px 18px;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.45;
}

.routes-park-map__canvas .leaflet-popup-content strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
}

.route-map-popup__route {
    margin: 2px 0 5px;
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.route-map-marker-wrap {
    width: 34px !important;
    height: 42px !important;
    margin: -40px 0 0 -17px !important;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    filter: drop-shadow(0 6px 8px rgba(21, 40, 30, 0.3));
}

.route-map-marker {
    width: 28px;
    height: 28px;
    display: block;
    position: relative;
    border: 4px solid #fff;
    border-radius: 50% 50% 50% 8px;
    transform: rotate(-45deg);
}

.route-map-marker::after {
    width: 7px;
    height: 7px;
    position: absolute;
    top: 6px;
    left: 6px;
    content: "";
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
}

.route-map-label-wrap {
    width: auto !important;
    height: auto !important;
    border: 0;
    background: transparent;
}

.route-map-label {
    width: max-content;
    padding: 7px 10px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    color: #fff;
    background: #716659;
    box-shadow: 0 6px 18px rgba(21, 40, 30, 0.24);
    font-size: 11px;
    font-weight: 700;
}

.route-map-label--red {
    background: #bd3d31;
}

.route-map-label--orange {
    background: #d87b27;
}

.route-map-label--green {
    background: #3d7d45;
}

.route-map-label--far {
    background: #356b78;
}

.routes-park-map__source {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    font-size: 14px;
}

.routes-park-map__source a {
    color: var(--green);
    border-bottom: 1px solid rgba(38, 97, 60, 0.32);
}

.routes-list .container {
    display: grid;
    gap: 110px;
}

.route-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.75fr);
    gap: 70px;
    align-items: center;
}

.route-card:nth-child(even) > div:first-child {
    order: 2;
}

.route-card__image {
    width: 100%;
    padding: 0;
    display: block;
    border: 0;
    cursor: pointer;
    height: 480px;
    overflow: hidden;
    position: relative;
    border-radius: 28px;
    background: var(--dark);
}

.route-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.route-card:hover .route-card__image img {
    transform: scale(1.025);
}

.route-card__image > .route-card__photo-label {
    padding: 10px 16px;
    position: absolute;
    bottom: 22px;
    left: 22px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    color: #fff;
    background: rgba(13, 28, 19, 0.46);
    font-size: 12px;
    backdrop-filter: blur(9px);
}

.route-card__meta {
    margin-bottom: 20px;
    padding-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 25px;
    border-bottom: 1px solid var(--line);
    color: var(--green);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.route-card__meta strong {
    color: var(--text);
}

.route-card h2 {
    margin: 0 0 20px;
    font-family: var(--font-heading);
    font-size: clamp(46px, 5vw, 68px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.route-card__content > p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.routes-safety {
    padding: 100px 0;
    color: #fff;
    background: var(--dark);
}

.routes-safety__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr) auto;
    gap: 70px;
    align-items: center;
}

.routes-safety h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(40px, 5vw, 60px);
    font-weight: 400;
    line-height: 1;
}

.routes-safety ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 13px;
    list-style: none;
    color: rgba(255, 255, 255, 0.7);
}

.routes-safety li {
    padding-left: 19px;
    position: relative;
}

.routes-safety li::before {
    width: 6px;
    height: 6px;
    position: absolute;
    top: 0.6em;
    left: 0;
    content: "";
    border-radius: 50%;
    background: var(--leaf);
}

@media (max-width: 980px) {
    .routes-hero__grid,
    .routes-location__grid,
    .routes-park-map__heading,
    .route-card,
    .routes-safety__grid {
        grid-template-columns: 1fr;
    }

    .route-card:nth-child(even) > div:first-child {
        order: 0;
    }

    .routes-map-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .routes-safety .button {
        justify-self: start;
    }
}

.routes-place-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.routes-place-button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface, #fffdf8); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.routes-place-button:hover, .routes-place-button:focus-visible { border-color: var(--green); }
.route-card__content > .routes-place-button { margin-top: 24px; }
.route-photo-credit { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.route-photo-credit a { text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.routes-directions { padding: 70px 0 0; }
.routes-directions h2 { margin: 0 0 28px; font-family: var(--font-heading); font-size: clamp(34px, 4vw, 54px); font-weight: 400; }
.routes-directions__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.routes-directions__grid article { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: #fffdf8; }
.routes-directions__grid h3 { margin: 0 0 12px; font-size: 22px; }
.routes-directions__grid p { color: var(--muted); }
.routes-directions > .container > p { margin-top: 24px; color: var(--muted); }
.routes-directions a { text-decoration: underline; }
.route-gallery { width: min(920px, calc(100vw - 32px)); max-height: 90dvh; padding: 30px; box-sizing: border-box; border: 0; border-radius: 22px; color: var(--text); background: #fffdf8; overflow-y: auto; }
.route-gallery::backdrop { background: rgba(10, 24, 16, .78); }
.route-gallery h2 { padding-right: 44px; margin: 0 0 10px; font-family: var(--font-heading); font-size: clamp(30px, 4vw, 48px); font-weight: 400; line-height: 1.1; }
.route-gallery__close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fffdf8; color: var(--text); font-size: 28px; cursor: pointer; }
.route-gallery__figure { margin: 20px 0; }
.route-gallery__visual { position: relative; height: min(48dvh, 480px); overflow: hidden; border-radius: 12px; background: #25352c; }
.route-gallery__visual img { display: block; width: 100%; height: 100%; }
.route-gallery__backdrop { position: absolute; inset: 0; object-fit: cover; filter: blur(24px) brightness(.7); transform: scale(1.1); }
.route-gallery__photo { position: relative; object-fit: contain; }
.route-gallery__navigation { align-items: center; justify-content: center; gap: 22px; }
.route-gallery__navigation:not([hidden]) { display: flex; }
.route-gallery__source { display: inline-block; margin-top: 20px; text-decoration: underline; }
@media (max-width: 600px) {
    .routes-directions__grid { grid-template-columns: 1fr; }
    .route-gallery { padding: 20px; max-height: 88dvh; }
    .route-gallery__visual { height: 36dvh; }
}

@media (max-width: 600px) {
    .routes-hero {
        padding: 135px 0 75px;
    }

    .routes-hero__grid {
        gap: 40px;
    }

    .routes-hero h1 {
        font-size: clamp(50px, 16vw, 70px);
    }

    .routes-list {
        padding: 75px 0;
    }

    .routes-location {
        padding: 75px 0;
    }

    .routes-park-map {
        padding: 75px 0;
    }

    .routes-park-map__heading {
        margin-bottom: 30px;
        gap: 24px;
    }

    .routes-map-controls {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 2px 2px 9px;
        scrollbar-width: thin;
    }

    .routes-map-color-note {
        margin-top: 0;
    }

    .routes-map-legend {
        grid-template-columns: 1fr;
    }

    .routes-map-filter {
        flex: 0 0 auto;
    }

    .routes-park-map__canvas {
        height: 520px;
        min-height: 0;
        border-radius: 20px;
    }

    .routes-park-map__source {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .routes-location__grid {
        gap: 38px;
    }

    .routes-location__map {
        height: 390px;
        border-radius: 20px;
    }

    .routes-location__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .routes-location__actions .button {
        width: 100%;
    }

    .routes-list .container {
        gap: 80px;
    }

    .route-card {
        gap: 34px;
    }

    .route-card__image {
        height: 310px;
        border-radius: 20px;
    }

    .route-card__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .routes-safety {
        padding: 75px 0;
    }

    .routes-safety__grid {
        gap: 38px;
    }
}
