:root {
    --primary: #5f9562;
    --secondary: #30533c;
    --light: #f7f5f1;
    --dark: #2b2c2b;
    --success: #28a745;
    --danger: #dc3545;
    --info: #17a2b8;
}

.block-map .bg-primary,
.block-map .nav-pills .nav-link.active, 
.block-map .nav-pills .show>.nav-link {
    background-color: var(--primary);
}

.block-map a {
    color: var(--primary);
}

.block-map .rajamailla-map {
    height: 72vh;
    min-height: 520px;
    width: 100%;
    position: relative;
    border-radius: 0.75rem;
    border: 1px solid #d9d9d9;
    overflow: hidden;
    background: #eef3f8;
}

.block-map .map-loading-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(16, 31, 52, 0.16);
    backdrop-filter: blur(2px);
    z-index: 850;
    pointer-events: none;
}

.block-map .map-loading-overlay.is-visible {
    display: flex;
}

.block-map .map-loading-card {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.58rem 0.82rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d4e3f8;
    box-shadow: 0 12px 24px rgba(17, 46, 86, 0.2);
    color: #1d4577;
    font-weight: 700;
    font-size: 0.9rem;
}

.block-map .map-loading-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #b7cff0;
    border-top-color: #2a7de9;
    animation: mapSpin 0.75s linear infinite;
}

@keyframes mapSpin {
    to {
        transform: rotate(360deg);
    }
}

.block-map .map-interaction-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 860;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.48rem 0.72rem;
    border-radius: 999px;
    background: rgba(11, 30, 56, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 10px 22px rgba(9, 23, 42, 0.38);
    /*font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 700;*/
    letter-spacing: 0.01em;
    pointer-events: none;
    animation: mapHintFloat 1.8s ease-in-out infinite;
}

.block-map .map-interaction-hint-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 133, 247, 0.95);
    box-shadow: 0 0 0 4px rgba(42, 133, 247, 0.22);
}

.block-map .map-interaction-hint-text {
    white-space: nowrap;
}

.block-map .map-interaction-hint-dismissed {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 240ms ease, transform 240ms ease;
}

@keyframes mapHintFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-3px);
    }
}

.block-map .leaflet-container {
    background: #eef3f8;
}

.block-map .city-label {
    background: #ffffff;
    border: 1px solid rgba(24, 34, 46, 0.2);
    box-shadow: 0 8px 18px rgba(20, 32, 52, 0.18);
    color: #1f2a38;
    /*font-weight: 700;
    font-size: 13px;
    font-family: "Manrope", "Segoe UI", sans-serif;*/
    letter-spacing: 0.2px;
    padding: 4px 9px;
    border-radius: 999px;
    line-height: 1.2;
    cursor: pointer;
}

.block-map .city-label.leaflet-tooltip-right:before,
.block-map .city-label.leaflet-tooltip-left:before,
.block-map .city-label.leaflet-tooltip-top:before,
.block-map .city-label.leaflet-tooltip-bottom:before {
    border: 0;
}

.block-map .municipality-label {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(122, 38, 33, 0.36);
    box-shadow: 0 6px 14px rgba(52, 19, 16, 0.2);
    color: #6b201c;
    /*font-weight: 800;
    font-size: 12px;
    font-family: "Manrope", "Segoe UI", sans-serif;*/
    letter-spacing: 0.15px;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.2;
}

.block-map .municipality-label.leaflet-tooltip-right:before,
.block-map .municipality-label.leaflet-tooltip-left:before,
.block-map .municipality-label.leaflet-tooltip-top:before,
.block-map .municipality-label.leaflet-tooltip-bottom:before {
    border: 0;
}

.block-map .city-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(10, 24, 44, 0.22);
    padding: 0;
}

.block-map .city-popup .leaflet-popup-content {
    margin: 0;
}

.block-map .city-popup-card {
    padding: 0.85rem 0.9rem;
    min-width: 220px;
    /*font-family: "Manrope", "Segoe UI", sans-serif;*/
}

.block-map .city-popup-card h4 {
    margin: 0 0 0.35rem;
    font-size: 0.96rem;
    color: #172538;
}

.block-map .city-popup-time {
    margin: 0 0 0.45rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.88rem;
}

.block-map .city-popup-card ul {
    margin: 0;
    padding-left: 1rem;
    color: #344861;
    font-size: 0.85rem;
}

.block-map .rajamailla-pin {
    position: relative;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    border: 10px solid rgba(65, 130, 85, 0.75);
    background: rgba(65, 130, 85, 0.92);
    box-shadow: 0 0 0 6px rgba(192, 221, 201, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.6px;
    text-align: center;
}

.block-map .rajamailla-area-bubble {
    z-index: 950 !important;
}

.block-map .rajamailla-area-pin {
    min-width: 188px;
    height: 74px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.16rem;
    border-radius: 20px;
    background: linear-gradient(
        118deg,
        rgba(255, 210, 204, 0.98) 0%,
        rgba(232, 111, 101, 0.96) 32%,
        rgba(179, 64, 57, 0.97) 66%,
        rgba(138, 45, 39, 0.98) 100%
    );
    background-size: 210% 100%;
    color: #ffffff;
    font-family: "Manrope", "Segoe UI", sans-serif;
    text-align: center;
    box-shadow:
        0 18px 34px rgba(130, 34, 29, 0.38),
        0 8px 16px rgba(255, 118, 106, 0.26),
        0 0 0 4px rgba(255, 255, 255, 0.92);
    border: 1.5px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    position: relative;
    overflow: hidden;
    animation: rajamaillaPulse 3.2s ease-in-out infinite;
}

.block-map .rajamailla-area-pin i {
    font-size: 0.95rem;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(73, 14, 11, 0.42);
}

.block-map .rajamailla-area-pin em {
    font-style: normal;
    /*font-family: "Cinzel", "Times New Roman", serif;
    font-weight: 800;
    font-size: 12px;*/
    letter-spacing: 0.08em;
    text-shadow: 0 2px 8px rgba(73, 14, 11, 0.42);
}

.block-map .rajamailla-area-pin > * {
    position: relative;
    z-index: 2;
}

.block-map .rajamailla-area-pin::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background: #b14740;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    filter: drop-shadow(0 4px 4px rgba(130, 34, 29, 0.34));
}

.block-map .rajamailla-area-pin::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 8%,
        rgba(255, 255, 255, 0.24) 42%,
        rgba(255, 255, 255, 0.02) 62%,
        rgba(255, 255, 255, 0) 90%
    );
    transform: translateX(-130%);
    animation: rajamaillaShimmer 3.1s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.block-map .rajamailla-area-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.36rem 0.72rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    background: linear-gradient(145deg, #cb5b52 0%, #9d3832 100%);
    color: #ffffff;
    font-family: "Cinzel", "Times New Roman", serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(73, 14, 11, 0.42);
    box-shadow: 0 10px 18px rgba(117, 29, 25, 0.34);
}

@keyframes rajamaillaPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow:
            0 18px 34px rgba(130, 34, 29, 0.38),
            0 8px 16px rgba(255, 118, 106, 0.26),
            0 0 0 4px rgba(255, 255, 255, 0.92);
    }
    50% {
        transform: translateY(-2px) scale(1.018);
        box-shadow:
            0 22px 42px rgba(130, 34, 29, 0.46),
            0 10px 20px rgba(255, 118, 106, 0.32),
            0 0 0 4px rgba(255, 255, 255, 0.92);
    }
}

@keyframes rajamaillaShimmer {
    0%, 28% {
        transform: translateX(-130%);
    }
    46% {
        transform: translateX(130%);
    }
    100% {
        transform: translateX(130%);
    }
}

.block-map .map-tabs .nav-link {
    font-weight: 600;
    border-radius: 999px;
}

.block-map .travel-card {
    border: 1px solid #d9e0ea;
    background: #ffffff;
    border-radius: 1.15rem;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(22, 36, 56, 0.08);
}

.block-map .travel-card-updating {
    animation: cardPulse 420ms ease;
}

@keyframes cardPulse {
    0% {
        transform: translateY(0);
        box-shadow: 0 8px 20px rgba(22, 36, 56, 0.08);
        border-color: #d9e0ea;
    }
    45% {
        transform: translateY(-2px);
        box-shadow: 0 16px 30px rgba(32, 84, 170, 0.2);
        border-color: #a8c5f3;
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 8px 20px rgba(22, 36, 56, 0.08);
        border-color: #d9e0ea;
    }
}

.block-map .travel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.block-map .travel-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.7rem;
    align-items: start;
    padding: 0.45rem 0;
    border-bottom: 1px dashed #d9d9d9;
}

.block-map .travel-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.block-map .travel-item > div {
    display: grid;
    gap: 0.12rem;
}

.block-map .travel-item > div span {
    color: #465164;
}

.block-map .travel-item.highlight {
    background: #f3f8ff;
    border: 1px solid #cfe3ff;
    border-radius: 0.7rem;
    padding: 0.55rem;
}

.block-map .travel-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 1.02rem;
    box-shadow: 0 8px 16px rgba(31, 111, 235, 0.22);
}

.block-map .access-grid {
    display: grid;
    gap: 0.65rem;
}

.block-map .route-title {
    margin-bottom: 0.75rem;
}

.block-map .route-heading {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    color: #172a45;
    letter-spacing: 0.1px;
}

.block-map .route-city {
    font-weight: 800;
}

.block-map .route-city-destination {
    color: #114f95;
}

.block-map .route-separator {
    color: #2a7de9;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.block-map .route-suffix {
    margin-left: 0.2rem;
    color: #516b90;
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.block-map .route-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #e8f1ff;
    color: #1e4ea1;
    border-radius: 999px;
    padding: 0.22rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.block-map .access-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0.75rem;
    align-items: center;
    border: 1px solid #dbe4f2;
    border-radius: 0.75rem;
    background: #f8fbff;
    padding: 0.62rem 0.72rem;
}

.block-map .access-card-link {
    text-decoration: none;
    color: inherit;
}

.block-map .access-card-link:hover,
.block-map .access-card-link:focus-visible {
    text-decoration: none;
    color: inherit;
    border-color: #b7cced;
    transform: translateY(-1px);
}

.block-map .access-card-emphasis {
    border-color: #bfd4f3;
    background: #edf4ff;
}

.block-map .route-option-card {
    cursor: pointer;
    transition: all 0.18s ease;
}

.block-map .route-option-card:hover {
    transform: translateY(-1px);
    border-color: #b7cced;
}

.block-map .route-option-card-disabled {
    cursor: default;
    opacity: 0.72;
}

.block-map .route-option-card-disabled:hover {
    transform: none;
    border-color: #dbe4f2;
}

.block-map .route-option-active {
    border-color: #2a85f7 !important;
    background: #eaf3ff !important;
    box-shadow: 0 6px 14px rgba(42, 133, 247, 0.18);
}

.block-map .access-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 8px 16px rgba(31, 111, 235, 0.24);
}

.block-map .access-card strong {
    display: block;
    color: #1a2a40;
}

.block-map .access-card span {
    display: block;
    color: #2e4f82;
    font-weight: 700;
    font-size: 0.92rem;
}

.block-map .access-card small {
    color: #5e6f89;
    font-size: 0.8rem;
}

.block-map .route-choice-note {
    margin: 0.1rem 0 0.55rem;
    color: #4b6284;
    font-size: 0.82rem;
    font-weight: 600;
}

.block-map .access-inline-link {
    color: #0d5ed7;
    text-decoration: none;
    font-weight: 600;
}

.block-map .access-inline-link:hover,
.block-map .access-inline-link:focus-visible {
    text-decoration: underline;
}

.block-map .access-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: #e8f1ff;
    color: #0d5ed7;
    text-decoration: none;
    font-weight: 700;
    width: fit-content;
}

.block-map .access-inline-btn:hover,
.block-map .access-inline-btn:focus-visible {
    color: #0a4fb5;
    background: #dbeaff;
    text-decoration: none;
}

.block-map .map-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.block-map .map-links a {
    color: #0d5ed7;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.block-map .map-links a:hover,
.block-map .map-links a:focus-visible {
    text-decoration: underline;
}

.block-map .origin-tools {
    border: 1px solid #dce6f5;
    border-radius: 0.85rem;
    background: #f8fbff;
    padding: 0.75rem;
}

.block-map .map-toolbar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #ffffff;
    border: 1px solid #dce6f5;
    border-radius: 0.85rem;
    padding: 0.45rem;
    box-shadow: 0 8px 18px rgba(24, 44, 78, 0.08);
}

.block-map .map-toolbar-input .input-group-text {
    background: #f2f7ff;
    border-color: #d3e2f8;
    color: #2f5f9c;
}

.block-map .map-toolbar-input .form-control {
    border-color: #d3e2f8;
}

.block-map .map-toolbar-btn {
    min-width: 42px;
    min-height: 34px;
    border-radius: 10px;
}

.block-map .origin-result {
    min-height: 24px;
    color: #1f3f6b;
    font-size: 0.88rem;
}

.block-map .origin-result-sidebar {
    min-height: 0;
}

.block-map .origin-result-card {
    border: 1px solid #dce6f5;
    background: #f8fbff;
    border-radius: 0.85rem;
    padding: 0.72rem 0.78rem;
    display: grid;
    gap: 0.24rem;
}

.block-map .origin-result-card small {
    color: #4f6687;
}

.block-map .origin-map-btn {
    justify-self: start;
    margin-top: 0.2rem;
}

.block-map .origin-result strong {
    color: #13325d;
}

.block-map .route-details {
    background: #f4f8ff;
    border: 1px solid #d8e5ff;
    border-radius: 0.7rem;
    padding: 0.7rem 0.8rem;
}

.block-map .route-details strong {
    color: #12305f;
    display: block;
    margin-bottom: 0.25rem;
}

.block-map .route-details p {
    color: #304a72;
    font-size: 0.92rem;
}

.block-map .route-details ul {
    margin: 0;
    padding-left: 1rem;
    color: #304a72;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .block-map .rajamailla-map {
        height: 62vh;
        min-height: 420px;
    }

    .block-map .map-toolbar {
        gap: 0.4rem;
        padding: 0.4rem;
    }
}
