.martos-route {
    --martos-route-header-offset: clamp(88px, 9vw, 118px);
    --martos-route-bg: #fefae5;
    --martos-route-surface: #fffef8;
    --martos-route-surface-soft: #f2eeda;
    --martos-route-surface-muted: #ece9d4;
    --martos-route-border: #c1c9be;
    --martos-route-text: #1d1c10;
    --martos-route-text-soft: #414941;
    --martos-route-primary: #063817;
    --martos-route-primary-soft: #214f2c;
    --martos-route-secondary: #436900;
    --martos-route-accent: #bff377;
    --martos-route-accent-strong: #f6bf22;
    --martos-route-shadow: 0 24px 44px rgba(29, 28, 16, 0.08);
    background: var(--martos-route-bg);
    color: var(--martos-route-text);
    padding-bottom: 5rem;
}

.martos-route__hero {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: max(760px, 100vh);
    padding-top: var(--martos-route-header-offset);
    overflow: hidden;
    z-index: 1;
}

.martos-route__hero-image,
.martos-route__hero-image--placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.martos-route__hero-image {
    object-fit: cover;
    transform: scale(1.04);
}

.martos-route__hero-image--placeholder {
    background:
        radial-gradient(circle at top right, rgba(191, 243, 119, 0.24), transparent 30%),
        linear-gradient(180deg, #d6ccb0 0%, #b7ae91 100%);
}

.martos-route__hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(255, 251, 230, 0.08) 0px, rgba(255, 251, 230, 0.08) 96px, rgba(255, 251, 230, 0) 150px),
        linear-gradient(90deg, rgba(33, 79, 44, 0.95) 0%, rgba(33, 79, 44, 0.93) 12%, rgba(33, 79, 44, 0.72) 38%, rgba(255, 255, 255, 0.001) 100%);
}

.martos-route__hero-content {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    left: 50%;
    width: min(1240px, calc(100% - 2rem));
    padding: calc(var(--martos-route-header-offset) + 2rem) clamp(1rem, 4vw, 4rem) 4rem;
    transform: translateX(-50%);
}

body.single-rutas #header-space {
    display: none !important;
}

body.single-rutas #ajax-content-wrap > .container-wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.martos-route__badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 2rem;
    padding: 0.45rem 1rem;
    border: 0;
    border-radius: 999px;
    background: #bff377;
    color: #314f00;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(29, 28, 16, 0.08);
}

.martos-route__title {
    max-width: 15ch;
    margin: 1.15rem 0 0.75rem;
    color: #fffbe6;
    font-size: clamp(3rem, 5.2vw, 4.9rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.martos-route__subtitle {
    max-width: 34rem;
    margin: 0;
    color: #fffbe6;
    font-size: clamp(1.02rem, 2vw, 1.15rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
}

.martos-route__stats-wrap {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 2rem));
    margin: -3rem auto 0;
}

.martos-route__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    padding: 2rem 2.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--martos-route-shadow);
}

.martos-route__stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 180px;
}

.martos-route__stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    border-radius: 999px;
    background: var(--martos-route-surface-soft);
    color: var(--martos-route-primary);
    position: relative;
}

.martos-route__stat-icon::before {
    content: "";
    width: 1.4rem;
    height: 1.4rem;
    display: block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.martos-route__stat-icon--distance::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23063817' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17h16'/%3E%3Cpath d='M7 17V9l4-2 2 4 4-1v7'/%3E%3Ccircle cx='7' cy='17' r='1.6' fill='%23063817' stroke='none'/%3E%3Ccircle cx='17' cy='17' r='1.6' fill='%23063817' stroke='none'/%3E%3C/svg%3E");
}

.martos-route__stat-icon--altitude::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23063817' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 12 7l6 11'/%3E%3Cpath d='M12 7v11'/%3E%3C/svg%3E");
}

.martos-route__stat-icon--route::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23063817' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='7' r='2'/%3E%3Cpath d='M9 17c4 0 4-8 8-8'/%3E%3C/svg%3E");
}

.martos-route__stat-label {
    margin: 0 0 0.2rem;
    color: rgba(65, 73, 65, 0.7);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.martos-route__stat-value {
    margin: 0;
    color: var(--martos-route-primary);
    font-size: 1.15rem;
    font-weight: 800;
}

.martos-route__content-wrap {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
    padding-top: 4rem;
}

.martos-route__content-grid {
    display: grid;
    gap: 2.5rem;
}

.martos-route__prose {
    color: var(--martos-route-text-soft);
    font-size: 1.04rem;
    line-height: 1.9;
}

.martos-route__prose > :first-child {
    margin-top: 0;
}

.martos-route__prose h2 {
    margin: 0 0 1.3rem;
    color: var(--martos-route-primary);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.martos-route__prose p {
    margin-bottom: 1.5rem;
}

.martos-route__prose p:first-of-type {
    padding-left: 1.4rem;
    border-left: 4px solid var(--martos-route-accent);
    color: var(--martos-route-text);
    font-size: 1.18rem;
    font-style: italic;
    font-weight: 300;
}

.martos-route__guide {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 1.6rem;
    background: linear-gradient(160deg, #0c3a1c 0%, #1b522d 100%);
}

.martos-route__guide::after {
    content: "";
    position: absolute;
    top: -4rem;
    right: -4rem;
    width: 16rem;
    height: 16rem;
    border-radius: 999px;
    background: rgba(191, 243, 119, 0.1);
    filter: blur(34px);
}

.martos-route__guide-copy,
.martos-route__guide-button {
    position: relative;
    z-index: 1;
}

.martos-route__guide-title {
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.15;
}

.martos-route__guide-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.75;
}

.martos-route__guide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    align-self: flex-start;
    min-height: 3.5rem;
    padding: 0.95rem 1.5rem;
    border-radius: 999px;
    background: var(--martos-route-accent-strong);
    color: #322300;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.martos-route__guide-button:hover,
.martos-route__guide-button:focus {
    transform: translateY(-1px);
    opacity: 0.94;
}

.martos-route__guide-button-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23322300' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.martos-route__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.martos-route__panel {
    padding: 1.6rem;
    border-radius: 1rem;
    background: var(--martos-route-surface-soft);
    border: 1px solid rgba(193, 201, 190, 0.2);
    box-shadow: 0 8px 22px rgba(29, 28, 16, 0.04);
}

.martos-route__panel--soft {
    background: var(--martos-route-surface-muted);
}

.martos-route__panel-title,
.martos-route__panel-kicker {
    margin: 0 0 1rem;
    color: var(--martos-route-primary);
    font-weight: 800;
}

.martos-route__panel-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
}

.martos-route__panel-title-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-block;
    flex: 0 0 1.15rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.martos-route__panel-title-icon--location {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23436900' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6-5.4-6-11a6 6 0 1 1 12 0c0 5.6-6 11-6 11Z'/%3E%3Ccircle cx='12' cy='10' r='2.2'/%3E%3C/svg%3E");
}

.martos-route__panel-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.martos-route__map {
    position: relative;
    overflow: hidden;
    height: 16rem;
    border-radius: 0.75rem;
    background: var(--martos-route-surface-muted);
}

.martos-route__leaflet-map,
.martos-route__map-empty {
    width: 100%;
    height: 100%;
    display: block;
}

.martos-route__map-empty {
    background:
        radial-gradient(circle at top right, rgba(191, 243, 119, 0.16), transparent 34%),
        linear-gradient(135deg, #ebe4cf 0%, #d1c9b1 100%);
}

.martos-route__leaflet-map .leaflet-control-container,
.martos-route__leaflet-map .leaflet-bottom,
.martos-route__leaflet-map .leaflet-top,
.martos-route__leaflet-map .leaflet-control-attribution {
    display: none !important;
}

.martos-route__leaflet-map .leaflet-pane,
.martos-route__leaflet-map .leaflet-tile,
.martos-route__leaflet-map .leaflet-tile-pane {
    filter: saturate(1.02) brightness(1.02) contrast(0.98);
}

.martos-route__leaflet-map.leaflet-container {
    font: inherit;
    background: #dedac6;
}

.martos-route__leaflet-map .leaflet-overlay-pane svg {
    filter: drop-shadow(0 8px 16px rgba(29, 28, 16, 0.12));
}

.martos-route__map-meta {
    margin-top: 1rem;
    color: var(--martos-route-text-soft);
    font-size: 0.9rem;
    line-height: 1.45;
}

.martos-route__map-meta p {
    margin: 0;
}

.martos-route__map-summary {
    display: block;
    color: var(--martos-route-text-soft);
}

.martos-route__map-address {
    display: block;
    color: var(--martos-route-text);
    font-weight: 500;
}

.martos-route__map-coordinates-block {
    display: block;
    margin-top: 0.55rem;
}

.martos-route__map-coordinates-label {
    display: block;
    color: var(--martos-route-text-soft);
    font-weight: 400;
    margin-bottom: 0.12rem;
}

.martos-route__map-coordinates-value {
    display: block;
    color: var(--martos-route-primary);
    font-weight: 500;
}

.martos-route__downloads {
    display: grid;
    gap: 0.8rem;
}

.martos-route__download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(114, 121, 112, 0.28);
    border-radius: 0.9rem;
    color: var(--martos-route-text);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.martos-route__download:hover,
.martos-route__download:focus {
    background: var(--martos-route-surface-soft);
    transform: translateX(2px);
}

.martos-route__download-icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-block;
    flex: 0 0 1.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23063817' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v10'/%3E%3Cpath d='m7.5 10.5 4.5 4.5 4.5-4.5'/%3E%3Cpath d='M5 19h14'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.2s ease;
}

.martos-route__download:hover .martos-route__download-icon,
.martos-route__download:focus .martos-route__download-icon {
    transform: translateX(2px);
}

.martos-route__contact-list {
    display: grid;
    gap: 1rem;
}

.martos-route__contact {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--martos-route-text-soft);
    text-decoration: none;
    transition: color 0.2s ease;
}

.martos-route__contact:hover,
.martos-route__contact:focus {
    color: var(--martos-route-primary);
}

.martos-route__contact-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-block;
    flex: 0 0 1.15rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.martos-route__contact-icon--phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23414941' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72l.34 2.68a2 2 0 0 1-.57 1.73L7.1 9.91a16 16 0 0 0 7 7l1.78-1.78a2 2 0 0 1 1.73-.57l2.68.34A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E");
}

.martos-route__contact-icon--mail {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23414941' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.martos-route__contact-icon--web {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23414941' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3a15.3 15.3 0 0 1 0 18'/%3E%3Cpath d='M12 3a15.3 15.3 0 0 0 0 18'/%3E%3C/svg%3E");
}

.martos-route__gallery-section {
    margin-top: 5rem;
    padding: 5rem 0;
    background: var(--martos-route-surface-soft);
}

.martos-route__gallery-wrap {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
}

.martos-route__gallery-head {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.martos-route__gallery-kicker {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--martos-route-primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.martos-route__gallery-title {
    margin: 0;
    color: var(--martos-route-primary);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.martos-route__gallery-line {
    height: 1px;
    flex: 1;
    background: rgba(193, 201, 190, 0.45);
}

.martos-route__gallery-grid {
    display: grid;
    gap: 1rem;
}

.martos-route__gallery-item {
    overflow: hidden;
    border-radius: 1.2rem;
    min-height: 240px;
}

.martos-route__gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.65s ease;
}

.martos-route__gallery-item:hover img,
.martos-route__gallery-item:focus-within img {
    transform: scale(1.06);
}

@media (min-width: 900px) {
    .martos-route__content-grid {
        grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
        gap: 4rem;
    }

    .martos-route__sidebar {
        position: sticky;
        top: 2rem;
        align-self: start;
    }

    .martos-route__guide {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .martos-route__gallery-head {
        flex-direction: row;
        align-items: flex-end;
    }

    .martos-route__gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(170px, 1fr));
        min-height: 760px;
    }

    .martos-route__gallery-item--1 {
        grid-column: span 2;
        grid-row: span 2;
    }

    .martos-route__gallery-item--4 {
        grid-column: span 2;
    }
}

@media (max-width: 899px) {
    .martos-route__hero {
        min-height: 680px;
    }

    .martos-route__guide-button {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .martos-route__hero-content,
    .martos-route__stats-wrap,
    .martos-route__content-wrap,
    .martos-route__gallery-wrap {
        width: min(100% - 1.5rem, 1240px);
    }

    .martos-route__hero-content {
        justify-content: flex-end;
        width: min(100% - 1.5rem, 1240px);
        padding: calc(var(--martos-route-header-offset) + 1rem) 0 2rem;
    }

    .martos-route__stats {
        padding: 1.5rem;
    }

    .martos-route__panel,
    .martos-route__guide {
        padding: 1.35rem;
    }
}
