.ssf-gpx-routes-wrap {
    margin: 24px 0;
}

.ssf-gpx-route-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.ssf-gpx-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-weight: 700;
}

.ssf-gpx-filter-field span {
    font-size: 13px;
    color: #334155;
}

.ssf-gpx-filter-field select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.ssf-gpx-filter-reset {
    grid-column: 1 / -1;
    justify-self: end;
    padding: 0;
    border: 0;
    background: transparent;
    color: #475569;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: underline;
}

.ssf-gpx-filter-reset[hidden] {
    display: none;
}

.ssf-gpx-filter-reset:hover,
.ssf-gpx-filter-reset:focus {
    color: #0f172a;
    background: transparent;
}

.ssf-gpx-routes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.ssf-gpx-route-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.ssf-gpx-route-card[hidden] {
    display: none;
}


.ssf-gpx-route-image a {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.ssf-gpx-route-image img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.ssf-gpx-route-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.ssf-gpx-route-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}
.ssf-gpx-route-content h3 a {
    color: inherit;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.ssf-gpx-route-content h3 a:hover,
.ssf-gpx-route-content h3 a:focus {
    text-decoration: underline;
}


.ssf-gpx-route-description {
    height: 4.8em;
    min-height: 4.8em;
    max-height: 4.8em;
    margin: 0 0 14px;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 0 0 4.8em;
}

.ssf-gpx-route-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.ssf-gpx-route-meta div {
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.ssf-gpx-route-meta dt {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

.ssf-gpx-route-meta dd {
    margin: 2px 0 0;
    font-weight: 600;
}

.ssf-gpx-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: #005eb8;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
}

.ssf-gpx-download-button:hover,
.ssf-gpx-download-button:focus {
    background: #004a91;
    color: #fff !important;
}

.ssf-route-download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.ssf-gpx-no-results {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

@media (max-width: 980px) {
    .ssf-gpx-route-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .ssf-gpx-route-filters,
    .ssf-gpx-routes-grid {
        grid-template-columns: 1fr;
    }

    .ssf-gpx-route-meta {
        grid-template-columns: 1fr;
    }
}

.ssf-route-variant-downloads {
    margin-top: auto;
}

.ssf-route-variant-downloads-title {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.ssf-route-variant-downloads-list {
    display: grid;
    gap: 8px;
}

.ssf-route-variant-download-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.ssf-route-variant-label {
    font-weight: 700;
    color: #0f172a;
}

.ssf-route-variant-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.ssf-gpx-download-button-small {
    padding: 7px 11px;
    font-size: 13px;
}

@media (max-width: 420px) {
    .ssf-route-variant-download-row {
        grid-template-columns: 1fr;
    }

    .ssf-route-variant-actions {
        justify-content: flex-start;
    }
}

.ssf-gpx-route-read-more-wrap {
    margin: -4px 0 14px;
}

.ssf-gpx-route-read-more {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #005eb8;
}

.ssf-gpx-route-read-more:hover,
.ssf-gpx-route-read-more:focus {
    text-decoration: underline;
}

.ssf-route-single {
    margin: 24px 0;
}

.ssf-route-single-hero {
    margin-bottom: 24px;
}

.ssf-route-single-hero img,
.ssf-route-single-extra-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.ssf-route-single-intro {
    margin-bottom: 24px;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.7;
}

.ssf-route-single-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 28px;
}

.ssf-route-single-meta div {
    padding: 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ssf-route-single-meta dt {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
}

.ssf-route-single-meta dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.ssf-route-single-downloads {
    margin: 0 0 30px;
}

.ssf-route-single-downloads h2 {
    margin-bottom: 14px;
}

.ssf-route-single-long-text {
    margin-top: 28px;
    line-height: 1.7;
}

.ssf-route-single-extra-image {
    display: block;
    margin: 28px 0 0;
}

.ssf-route-single-extra-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

@media (max-width: 640px) {
    .ssf-route-single-meta {
        grid-template-columns: 1fr;
    }
}

/* Detailpagina v1.7.3: uitgelichte afbeelding rechts; labels direct onder die afbeelding. Extra afbeelding blijft in de content. */
.ssf-route-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 32px;
    align-items: start;
}

.ssf-route-single-main {
    min-width: 0;
}

.ssf-route-single-sidebar {
    min-width: 0;
}

.ssf-route-single-side-image {
    margin: 0 0 18px;
}

.ssf-route-single-side-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.ssf-route-single-sidebar .ssf-route-single-meta {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}

@media (max-width: 780px) {
    .ssf-route-single-layout {
        grid-template-columns: 1fr;
    }
}

/* Detailpagina v1.7.4: forceer rechterkolom-volgorde en voorkom oude cache/layout-stijlen. */
.ssf-route-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ssf-route-single-sidebar .ssf-route-single-side-image {
    order: 1;
    margin: 0 0 18px;
}

.ssf-route-single-sidebar .ssf-route-single-meta {
    order: 2;
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
}

.ssf-route-single-main > .ssf-route-single-side-image,
.ssf-route-single-main > .ssf-route-single-hero {
    display: none !important;
}

/* Detailpagina v1.7.7: eigen full-width template met teruglink. */
.ssf-route-single-template {
    width: 100%;
}

.ssf-route-single-template-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.ssf-route-single-entry {
    width: 100%;
    max-width: none;
}

.ssf-route-single-header {
    margin-bottom: 24px;
}


.ssf-route-back-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 600;
}

.ssf-route-back-link:hover,
.ssf-route-back-link:focus {
    text-decoration: underline;
}

.ssf-route-single-title {
    margin: 0;
}

.ssf-route-single-entry-content {
    width: 100%;
}

.ssf-gpx-route-description > :first-child {
    margin-top: 0;
}

.ssf-gpx-route-description > :last-child {
    margin-bottom: 0;
}

/* Route category archive pages */
.ssf-route-category-template-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.ssf-route-category-header {
    margin-bottom: 28px;
}

.ssf-route-category-title {
    margin-bottom: 12px;
}

.ssf-route-category-description {
    max-width: 860px;
}

.ssf-route-category-description > :first-child {
    margin-top: 0;
}

.ssf-route-category-description > :last-child {
    margin-bottom: 0;
}

/* Route kaart op detailpagina v1.11.2 */
.ssf-route-map-block {
    margin-top: 22px;
}

.ssf-route-map-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.ssf-route-map-thumb {
    display: block;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.ssf-route-map-thumb img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    cursor: zoom-in;
}

.ssf-route-map-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    padding: 24px;
}

.ssf-route-map-lightbox.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssf-route-map-lightbox-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    border: 0;
    cursor: pointer;
    padding: 0;
}

.ssf-route-map-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(1100px, 96vw);
    max-height: 92vh;
}

.ssf-route-map-lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    background: #fff;
}

.ssf-route-map-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

/* Detailpagina v1.11.4: routekaart onder labels en snelle JS-lightbox */
.ssf-route-single-sidebar .ssf-route-map-block {
    order: 3;
    margin-top: 22px;
}

.ssf-route-single-sidebar .ssf-route-map-lightbox {
    order: 99;
}

html.ssf-route-map-modal-open { overflow: hidden; }
