/* Full-page map explorer */
.map-explorer-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: #0f172a;
}

/* Guest login wall (same idea as candidates list) */
.map-explorer-guest-gate {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.map-explorer-guest-gate__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(52, 168, 83, 0.22), transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(14, 165, 233, 0.18), transparent 50%),
        linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0b1220 100%);
}

.map-explorer-guest-gate__panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
}

.map-explorer-guest-gate__panel .listing-guest-lock__panel {
    margin: 0 auto;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.map-explorer-body--guest-locked .map-explorer__map,
.map-explorer-body--guest-locked .map-explorer__page-heading,
.map-explorer-body--guest-locked .map-explorer__top-left,
.map-explorer-body--guest-locked .map-explorer__top-right,
.map-explorer-body--guest-locked .map-explorer__bottom,
.map-explorer-body--guest-locked .map-explorer__bottom-shadow,
.map-explorer-body--guest-locked .map-explorer-loading,
.map-explorer-body--guest-locked .map-explorer__footer {
    visibility: hidden;
    pointer-events: none;
}

.map-explorer {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    --map-footer-height: 40px;
    --map-footer-shadow-height: 0px;
    --map-carousel-stack-height: 108px;
    --map-carousel-card-height: 58px;
    --map-carousel-avatar-size: 40px;
    --map-bottom-chrome: calc(var(--map-carousel-stack-height) + var(--map-footer-height));
}

.map-explorer__map {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Map loading overlay — map area only (not carousel) */
.map-explorer-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(var(--map-bottom-chrome) + env(safe-area-inset-bottom, 0px));
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: default;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.map-explorer-loading.is-visible {
    opacity: 1;
    visibility: visible;
}

.map-explorer-loading[aria-hidden="false"] {
    display: flex;
}

.map-explorer-loading__text {
    margin: 0;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

/* Page title (SEO H1) */
.map-explorer__page-heading {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: min(480px, calc(100vw - 220px));
    pointer-events: none;
}

.map-explorer__page-header {
    width: 100%;
    padding: 10px 18px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.16);
    box-sizing: border-box;
}

.map-explorer__page-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Top controls */
.map-explorer__top-left,
.map-explorer__top-right {
    position: absolute;
    top: 16px;
    z-index: 5;
}

.map-explorer__top-left {
    left: 16px;
}

.map-explorer__top-right {
    right: 16px;
}

.map-explorer__top-right-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 168px;
}

.map-explorer__back-btn,
.map-explorer__locate-btn,
.map-explorer__filters-btn,
.map-explorer__seo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s, color 0.15s;
    position: relative;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.map-explorer__back-btn:hover,
.map-explorer__locate-btn:hover,
.map-explorer__filters-btn:hover,
.map-explorer__seo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.22);
}

.map-explorer__filters-btn.is-active,
.map-explorer__filters-btn.has-active-filters,
.map-explorer__seo-btn.is-active {
    background: #111827;
    color: #fff;
}

.map-explorer__filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.map-explorer__filters-btn:not(.has-active-filters) .map-explorer__filters-badge {
    background: rgba(37, 99, 235, 0.14);
    color: #2563eb;
}

.map-explorer__filters-btn.has-active-filters .map-explorer__filters-badge {
    background: #fff;
    color: #111827;
}

.map-explorer__back-btn i,
.map-explorer__locate-btn i,
.map-explorer__filters-btn i,
.map-explorer__seo-btn i {
    font-size: 16px;
}

.map-explorer__results-count {
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
}

/* Bottom panel — sits above the footer */
.map-explorer__bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--map-footer-height) + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    padding: 8px 10px;
    background: transparent;
    pointer-events: none;
    isolation: isolate;
    cursor: default;
}

.map-explorer__bottom > * {
    pointer-events: auto;
}

/* Bottom-up shadow behind the carousel (disabled — kept for layout hook) */
.map-explorer__bottom-shadow {
    display: none;
}

/* Copyright centered under the carousel */
.map-explorer__footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 22;
    min-height: var(--map-footer-height);
    height: calc(var(--map-footer-height) + env(safe-area-inset-bottom, 0px));
    padding: 0 14px calc(14px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: transparent;
    border: 0;
    box-sizing: border-box;
    pointer-events: none;
}

.map-explorer__footer-copy {
    margin: 0;
    color: #111827;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    text-shadow: none;
    white-space: normal;
    max-width: min(92vw, 420px);
    line-height: 1.35;
}

/* Keep map zoom controls above carousel + footer */
.map-explorer .leaflet-top.leaflet-right {
    top: 88px;
    right: 12px;
}

.map-explorer .leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    border-radius: 10px;
}

.map-explorer .gm-bundled-control,
.map-explorer .gmnoprint {
    margin-bottom: 0 !important;
}

.map-explorer__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.16);
}

/* Filters modal */
.map-explorer-filters-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.map-explorer-filters-modal[hidden] {
    display: none;
}

.map-explorer-filters-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.map-explorer-filters-modal__panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: min(90vh, 720px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    animation: mapFiltersModalIn 0.2s ease;
}

@keyframes mapFiltersModalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.map-explorer-filters-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-explorer-filters-modal__header {
    flex: 0 0 auto;
    padding: 20px 44px 14px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.map-explorer-filters-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.map-explorer-filters-modal__lead {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #4b5563;
}

.map-explorer-filters-modal__form {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px;
}

.map-explorer-filters-modal__section {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.map-explorer-filters-modal__section:last-child {
    margin-bottom: 0;
}

.map-explorer-filters-modal__legend,
.map-explorer-filters-modal__label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #374151;
}

.map-explorer-filters-modal__types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-explorer-filters-modal__types .map-explorer__filter {
    margin: 0;
}

.map-explorer-filters-modal__field {
    display: block;
}

.map-explorer-filters-modal__input,
.map-explorer-filters-modal__select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
}

.map-explorer-filters-modal__input:focus,
.map-explorer-filters-modal__select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}

.map-explorer-filters-modal__footer {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fafafa;
}

.map-explorer-filters-modal__btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.map-explorer-filters-modal__btn--secondary {
    background: #fff;
    color: #374151;
    border: 1px solid rgba(15, 23, 42, 0.14);
}

.map-explorer-filters-modal__btn--secondary:hover {
    background: #f3f4f6;
}

.map-explorer-filters-modal__btn--primary {
    background: #2563eb;
    color: #fff;
}

.map-explorer-filters-modal__btn--primary:hover {
    background: #1d4ed8;
}

.map-explorer__filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f9fafb;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    user-select: none;
}

.map-explorer__filter-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.map-explorer__filter-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #9ca3af;
    border-radius: 4px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.map-explorer__filter-checkbox::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    margin-top: -2px;
    transition: transform 0.12s ease;
}

.map-explorer__filter.is-checked,
.map-explorer__filter:has(.map-explorer__filter-input:checked) {
    background: #ffffff;
    color: #111827;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.map-explorer__filter-input:checked + .map-explorer__filter-checkbox,
.map-explorer__filter.is-checked .map-explorer__filter-checkbox {
    background: #2563eb;
    border-color: #2563eb;
}

.map-explorer__filter-input:checked + .map-explorer__filter-checkbox::after,
.map-explorer__filter.is-checked .map-explorer__filter-checkbox::after {
    transform: rotate(45deg) scale(1);
}

.map-explorer__filter-label {
    line-height: 1.2;
}

.map-explorer__filter:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Carousel */
.map-explorer__carousel-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 8px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.16);
    cursor: default;
}

.map-explorer__carousel-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s;
}

.map-explorer__carousel-arrow:hover:not(:disabled) {
    transform: scale(1.05);
}

.map-explorer__carousel-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.map-explorer__carousel {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 4px;
    min-height: 0;
    cursor: default;
    touch-action: pan-x;
}

.map-explorer__carousel::-webkit-scrollbar {
    display: none;
}

.map-explorer__carousel-item {
    flex: 0 0 auto;
    position: relative;
    width: min(300px, calc(100vw - 120px));
    height: var(--map-carousel-card-height);
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease;
}

.map-explorer__carousel-item:last-child {
    margin-right: 0;
}

.map-explorer__carousel-item:hover {
    z-index: 2;
}

.map-explorer__carousel-item.is-selected {
    z-index: 3;
}

.map-explorer__carousel-item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 14px;
}

.map-explorer__carousel-item,
.map-explorer__carousel-item * {
    cursor: pointer;
}

.map-explorer__avatar,
.map-explorer__avatar img,
.map-explorer__avatar .listing-category-thumb,
.map-explorer__avatar .category-icon-wrapper {
    cursor: pointer;
    pointer-events: none;
}

.map-explorer__carousel-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0 10px;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid rgba(15, 23, 42, 0.1);
    box-shadow: none;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.map-explorer__carousel-item:hover .map-explorer__carousel-card {
    border-color: #2563eb;
}

.map-explorer__carousel-item.is-selected .map-explorer__carousel-card {
    background: #ffffff;
    border-color: #2563eb;
}

.map-explorer__avatar {
    width: var(--map-carousel-avatar-size);
    height: var(--map-carousel-avatar-size);
    flex-shrink: 0;
    border-radius: 9px;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-explorer__avatar .logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-explorer__avatar .listing-category-thumb,
.map-explorer__avatar .category-icon-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.map-explorer__avatar .category-icon-fa {
    font-size: 20px;
    color: #fff !important;
    line-height: 1;
}

.map-explorer__carousel-card__body {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    overflow: hidden;
}

.map-explorer__carousel-label {
    display: block;
    overflow: hidden;
    margin: 0;
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.map-explorer__carousel-item.is-selected .map-explorer__carousel-label {
    color: #111827;
}

.map-explorer__carousel-subtitle,
.map-explorer__carousel-meta,
.map-explorer__carousel-detail {
    margin: 0;
    width: 100%;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-explorer__carousel-type {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.15;
    white-space: nowrap;
}

.map-explorer__carousel-type--job { background: #eef2ff; color: #4338ca; }
.map-explorer__carousel-type--formacion { background: #eff6ff; color: #1d4ed8; }
.map-explorer__carousel-type--employer { background: #fff7ed; color: #c2410c; }
.map-explorer__carousel-type--candidate { background: #ecfdf5; color: #047857; }

.map-explorer__empty {
    flex: 1;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    padding: 24px 12px;
}

/* Map markers (avatar pins) */
.map-explorer-marker-wrap {
    position: absolute;
    transform: translate(-50%, -100%);
    z-index: 2;
    pointer-events: auto;
    transition: z-index 0s;
}

.map-explorer-marker-wrap.is-selected {
    z-index: 10000 !important;
}

.map-explorer-leaflet-marker-host.is-selected {
    z-index: 10000 !important;
}

.map-explorer-leaflet-marker-host {
    background: transparent !important;
    border: none !important;
}

.map-explorer-marker {
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.map-explorer-marker:hover {
    transform: scale(1.06);
    z-index: 3;
}

.map-explorer-marker-wrap.is-selected .map-explorer-marker,
.map-explorer-marker.is-selected {
    transform: scale(1.1);
    z-index: 10001;
}

.map-explorer-marker.is-selected .map-explorer-marker__avatar {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px rgba(255, 255, 255, 0.5), 0 8px 24px rgba(0, 0, 0, 0.32);
}

.map-explorer-marker.is-selected .map-explorer-marker__avatar .logo-image {
    outline: 3px solid #ffffff;
    outline-offset: 0;
}

.map-explorer-marker__avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

/* Approx (municipality / postcode) markers stay full opacity — same weight as exact pins. */

.map-explorer-map-popup__approx {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0.55rem 0 0;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.35;
}

.map-explorer-map-popup__approx[hidden] {
    display: none !important;
}

.map-explorer-map-popup__approx > i {
    margin-top: 0.12rem;
    flex: 0 0 auto;
    color: #64748b;
}

.map-explorer-marker:hover .map-explorer-marker__avatar {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 6px 18px rgba(0, 0, 0, 0.3);
}

.map-explorer-marker__avatar .logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.map-explorer-marker__avatar .listing-category-thumb,
.map-explorer-marker__avatar .category-icon-wrapper {
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    border-radius: 12px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.map-explorer-marker__avatar .category-icon-fa {
    font-size: 22px;
    color: #fff !important;
    line-height: 1;
}

.map-explorer-marker__count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.map-explorer-marker__count--tile {
    position: static;
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 0;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transition: box-shadow 0.15s ease;
}

.map-explorer-marker__count--tile.is-multi-digit {
    width: auto;
    min-width: 48px;
    padding: 0 10px;
    font-size: 16px;
}

.map-explorer-marker--cluster:hover .map-explorer-marker__count--tile {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 6px 18px rgba(0, 0, 0, 0.3);
}

.map-explorer-marker--cluster.is-selected .map-explorer-marker__count--tile {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px rgba(255, 255, 255, 0.5), 0 8px 24px rgba(0, 0, 0, 0.32);
}

/* Right info panel (carousel / list selection) */
.map-explorer-info-panel {
    position: absolute;
    top: 72px;
    right: 16px;
    bottom: calc(var(--map-bottom-chrome) + env(safe-area-inset-bottom, 0px));
    width: min(320px, calc(100vw - 32px));
    z-index: 6;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: mapPanelIn 0.2s ease;
}

.map-explorer-info-panel[hidden] {
    display: none;
}

@keyframes mapPanelIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

.map-explorer-info-panel__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.map-explorer-info-panel__thumb {
    flex-shrink: 0;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    overflow: hidden;
}

.map-explorer-info-panel__thumb .logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-explorer-info-panel__thumb .listing-category-thumb,
.map-explorer-info-panel__thumb .category-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.map-explorer-info-panel__thumb .category-icon-fa {
    font-size: 34px;
    color: #fff !important;
    line-height: 1;
}

.map-explorer-info-panel__body {
    padding: 16px;
    overflow-y: auto;
}

.map-explorer-info-panel__type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.map-explorer-info-panel__type--job { background: #eef2ff; color: #4338ca; }
.map-explorer-info-panel__type--formacion { background: #eff6ff; color: #1d4ed8; }
.map-explorer-info-panel__type--employer { background: #fff7ed; color: #c2410c; }
.map-explorer-info-panel__type--candidate { background: #ecfdf5; color: #047857; }

.map-explorer-info-panel__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    padding-right: 28px;
}

.map-explorer-info-panel__subtitle {
    margin: 0 0 8px;
    font-size: 13px;
    color: #6b7280;
}

.map-explorer-info-panel__location {
    margin: 0 0 10px;
    font-size: 12px;
    color: #374151;
}

.map-explorer-info-panel__location i {
    margin-right: 4px;
    color: #9ca3af;
}

.map-explorer-info-panel__snippet {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.5;
    color: #4b5563;
}

.map-explorer-info-panel__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-explorer-info-panel__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
}

.map-explorer-info-panel__btn--primary {
    background: #111827;
    color: #fff;
}

.map-explorer-info-panel__btn--secondary {
    background: #2563eb;
    color: #fff;
}

/* Floating popup next to marker */
.map-explorer-map-popup {
    position: absolute;
    z-index: 11000;
    width: min(340px, calc(100vw - 24px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
    overflow: visible;
    pointer-events: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.map-explorer-map-popup.is-measuring {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

.map-explorer-map-popup.is-positioned {
    animation: mapPopupIn 0.15s ease;
}

.map-explorer-map-popup[hidden] {
    display: none;
}

@keyframes mapPopupIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.map-explorer-map-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #374151;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.map-explorer-map-popup__inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 14px 12px;
}

.map-explorer-map-popup__media {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-explorer-map-popup__media .logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-explorer-map-popup__media .listing-category-thumb,
.map-explorer-map-popup__media .category-icon-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.map-explorer-map-popup__media .category-icon-fa {
    font-size: 28px;
    color: #fff !important;
    line-height: 1;
}

.map-explorer-map-popup__main {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 22px;
}

.map-explorer-map-popup__type {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.map-explorer-map-popup__type--job { background: #eef2ff; color: #4338ca; }
.map-explorer-map-popup__type--formacion { background: #eff6ff; color: #1d4ed8; }
.map-explorer-map-popup__type--employer { background: #fff7ed; color: #c2410c; }
.map-explorer-map-popup__type--candidate { background: #ecfdf5; color: #047857; }

.map-explorer-map-popup__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.map-explorer-map-popup__details {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.map-explorer-map-popup__detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #4b5563;
}

.map-explorer-map-popup__detail[hidden] {
    display: none;
}

.map-explorer-map-popup__detail i {
    flex-shrink: 0;
    width: 14px;
    margin-top: 2px;
    color: #6b7280;
    text-align: center;
}

.map-explorer-map-popup__detail span {
    min-width: 0;
    word-break: break-word;
}

.map-explorer-map-popup__snippet {
    margin: 0 0 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 11px;
    line-height: 1.5;
    color: #6b7280;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.map-explorer-map-popup__snippet[hidden] {
    display: none;
}

.map-explorer-map-popup__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.map-explorer-map-popup__btn {
    flex: 1;
    min-width: 118px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: #111827;
    color: #fff;
    transition: background 0.15s ease, transform 0.15s ease;
}

.map-explorer-map-popup__btn:hover {
    background: #1f2937;
}

.map-explorer-map-popup__btn--secondary {
    background: #2563eb;
}

.map-explorer-map-popup__btn--secondary:hover {
    background: #1d4ed8;
}

.map-explorer-map-popup__btn i {
    font-size: 13px;
    line-height: 1;
}

.map-explorer-map-popup__arrow {
    position: absolute;
    width: 0;
    height: 0;
    display: none;
    pointer-events: none;
}

.map-explorer-map-popup.is-right .map-explorer-map-popup__arrow,
.map-explorer-map-popup.is-left .map-explorer-map-popup__arrow {
    display: block;
    top: var(--popup-arrow-top, 50%);
    transform: translateY(-50%);
}

.map-explorer-map-popup.is-right .map-explorer-map-popup__arrow {
    left: -10px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 11px solid #fff;
    filter: drop-shadow(-2px 1px 2px rgba(15, 23, 42, 0.12));
}

.map-explorer-map-popup.is-left .map-explorer-map-popup__arrow {
    right: -10px;
    left: auto;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 11px solid #fff;
    filter: drop-shadow(2px 1px 2px rgba(15, 23, 42, 0.12));
}

/* SEO info modal (centered) */
.map-explorer-seo-panel {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.map-explorer-seo-panel[hidden] {
    display: none;
}

.map-explorer-seo-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.map-explorer-seo-panel__panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: min(90vh, 720px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    animation: mapFiltersModalIn 0.2s ease;
}

.map-explorer-seo-panel__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.15s ease, color 0.15s ease;
}

.map-explorer-seo-panel__close:hover {
    background: #f3f4f6;
    color: #111827;
}

.map-explorer-seo-panel__header {
    flex: 0 0 auto;
    padding: 20px 44px 14px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.map-explorer-seo-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.map-explorer-seo-panel__eyebrow i {
    font-size: 11px;
}

.map-explorer-seo-panel__title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.map-explorer-seo-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px 20px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.4) transparent;
}

.map-explorer-seo-panel__body::-webkit-scrollbar {
    width: 6px;
}

.map-explorer-seo-panel__body::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.35);
    border-radius: 999px;
}

.map-explorer-seo-panel__body p {
    margin: 0 0 10px;
}

.map-explorer-seo-panel__body p:last-child {
    margin-bottom: 0;
}

.map-explorer-seo-panel__body strong {
    color: #111827;
    font-weight: 700;
}

.map-explorer-seo-panel__body em {
    font-style: italic;
}

.map-explorer-seo-panel__body a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.map-explorer-seo-panel__body a:hover,
.map-explorer-seo-panel__body a:focus {
    color: #1d4ed8;
}

.map-explorer-seo-panel__body u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Responsive */
@media (max-width: 640px) {
    .map-explorer {
        --map-footer-height: 44px;
        --map-footer-shadow-height: 0px;
        --map-carousel-stack-height: 102px;
        --map-carousel-card-height: 54px;
        --map-carousel-avatar-size: 38px;
    }

    .map-explorer__page-heading {
        max-width: calc(100vw - 108px);
    }

    .map-explorer__page-header {
        padding: 8px 12px;
    }

    .map-explorer__page-title {
        font-size: 12px;
        line-height: 1.3;
    }

    .map-explorer__results-count {
        font-size: 11px;
    }

    .map-explorer__back-label,
    .map-explorer__locate-btn span,
    .map-explorer__filters-btn span:not(.map-explorer__filters-badge),
    .map-explorer__seo-btn-label {
        display: none;
    }

    .map-explorer__back-btn,
    .map-explorer__locate-btn,
    .map-explorer__filters-btn,
    .map-explorer__seo-btn {
        padding: 10px 12px;
        min-width: 44px;
    }

    .map-explorer__top-right-stack {
        min-width: 44px;
    }

    .map-explorer__filter {
        padding: 6px 10px;
        font-size: 12px;
    }

    .map-explorer__carousel-item {
        width: min(280px, calc(100vw - 96px));
    }

    .map-explorer-info-panel {
        top: auto;
        right: 8px;
        left: 8px;
        bottom: calc(var(--map-bottom-chrome) + 8px + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-height: 42vh;
    }

    .map-explorer-loading {
        bottom: calc(var(--map-bottom-chrome) + env(safe-area-inset-bottom, 0px));
    }
}
