 .cursor-click-animation-wrapper {
     display: flex;
     justify-content: center;
     align-items: center;
     width: 100%;
     height: 100%;
     text-align: center;
     position: relative;
 }

 .cursor-click-animation {
     position: relative;
     left: -5px;
 }

 .cursor-click-animation {
     position: relative;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     min-height: 250px;
     color: #014751;
     font-size: 1.2rem;
     font-weight: 500;
     user-select: none;
 }


 .map-dropdown-wrapper {
     position: relative;
     display: inline-block;
 }

 .map-dropdown-wrapper select.form-select {
     -webkit-appearance: none;
     -moz-appearance: none;
     appearance: none;
     padding-right: 2rem;
     background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-caret-down-fill' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658c-.566-.635.05-1.658.808-1.658h10.482c.757 0 1.374 1.023.808 1.658l-4.796 5.482a1 1 0 0 1-1.616 0z'/></svg>");
     background-repeat: no-repeat;
     background-position: right 0.75rem center;
     background-size: 1rem 1rem;
 }

 .cursor-shape {
     position: relative;
     width: 60px;
     height: 80px;
     transform: rotate(-15deg);
     transform-origin: top left;
     animation: cursor-click 2.5s ease-in-out infinite;
 }

 .cursor-tip {
     position: absolute;
     top: 0;
     left: 0;
     width: 0;
     height: 0;
     border-left: 20px solid transparent;
     border-right: 10px solid transparent;
     border-bottom: 30px solid #009E7E;
 }

 .cursor-tail {
     position: absolute;
     top: 15px;
     left: 10px;
     width: 6px;
     height: 30px;
     background-color: #009E7E;
     border-radius: 3px;
     transform: rotate(15deg);
 }

 .cursor-pulse {
     position: absolute;
     left: 28px;
     width: 10px;
     height: 10px;
     background: rgba(81, 105, 101, 0.35);
     border-radius: 50%;
     transform: scale(0);
     animation: cursor-pulse 2.5s ease-in-out infinite;
 }

 .click-text {
     animation: text-blink 3s ease-in-out infinite;
 }

 @keyframes cursor-click {

     0%,
     100% {
         transform: rotate(-15deg) translate(0, 0);
     }

     40% {
         transform: rotate(-10deg) translate(4px, 6px);
     }

     50% {
         transform: rotate(-15deg) translate(0, 0);
     }
 }

 @keyframes cursor-pulse {

     0%,
     100% {
         transform: scale(0);
         opacity: 0;
     }

     45% {
         transform: scale(2.5);
         opacity: 0.4;
     }
 }

 @keyframes text-blink {

     0%,
     100% {
         opacity: 1;
     }

     50% {
         opacity: 0.7;
     }
 }

 .map-description {
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
     text-overflow: ellipsis;
 }

 .map-content-wrapper {
     max-height: 500px;
     overflow-y: auto;
     padding-right: 5px;
     background: #f9f9f9;
     border-radius: 8px;
     padding: 0.75rem;
 }

 .map-content-item {
     transition: all 0.25s;
     background: linear-gradient(135deg, #ffffff, #f0f9f9);
     border: 1px solid #d1e6e2;
     border-radius: 10px;
     padding: 0.75rem 1rem;
     margin-bottom: 0.75rem;
     display: flex;
     align-items: center;
 }

 .map-content-item:hover {
     transform: translateY(-3px);
     box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
     border-color: #00B798;
     cursor: pointer;
 }

 .map-content-text {
     flex-grow: 1;
     min-width: 0;
 }


 .map-content-thumb {
     width: 70px;
     height: 70px;
     object-fit: cover;
     border-radius: 6px;
     flex-shrink: 0;
     margin-right: 1rem;
 }

 .map-content-title {
     margin-top: 0 !important;
     font-size: 1.5rem;
     font-weight: 700;
     color: #014751;
     margin-bottom: 0.25rem;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }

.map-content-desc {
    font-size: 1rem;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: break-word;
    direction: rtl;
    text-align: right;
}



 .text-truncate {
     overflow: hidden;
     white-space: nowrap;
     text-overflow: ellipsis;
 }

 .map-content-wrapper::-webkit-scrollbar {
     width: 6px;
 }

 .map-content-wrapper::-webkit-scrollbar-thumb {
     background-color: rgba(0, 183, 152, 0.6);
     border-radius: 3px;
 }

 .map-content-pagination .pagination {
     margin: 0;
 }

 .map-content-pagination .page-link {
     color: #014751;
 }

 .map-content-pagination .page-link:hover {
     color: #00B798;
     background-color: #e0faf5;
     border-color: #00B798;
 }

 .map-content-pagination .page-item.active .page-link {
     background-color: #00B798;
     border-color: #00B798;
     color: #fff;
 }

 .map-content-wrapper-empty {
     color: #888;
     font-style: italic;
 }

 .mapexplorer-tooltip {
     position: fixed;
     background: rgba(0, 0, 0, 0.85);
     color: white;
     padding: 6px 12px;
     border-radius: 6px;
     font-size: 14px;
     pointer-events: none;
     display: none;
     z-index: 9999;
     white-space: nowrap;
 }

 .form-select {
     font-size: 1.2rem;
     padding: 0.5rem 1.5rem 0.5rem 0.75rem;
     border-radius: 0.5rem;
     border: 2px solid #ced4da;
     background-color: #fff;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
     appearance: none;
     background-repeat: no-repeat;
     background-position: right 0.75rem center;
     background-size: 16px 12px;
     transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
 }

 .form-select:focus {
     border-color: #80bdff;
     outline: 0;
     box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
 }

 .MapexplorerMap [data-section-code].active-section {
    fill: #014751 !important;
    transition: fill 0.25s ease;
}

/* ---------- map container / svg (moved from view.php) ---------- */
.map-container { overflow: hidden; }
.MapexplorerMap svg { transition: transform 1.5s ease-in-out !important; transform-origin: center center !important; }

/* ---------- pins map card ---------- */
.mx-map-card{
    border:1px solid #dfe3e8;border-radius:18px;background:#fff;padding:10px;
    box-shadow:0 8px 28px rgba(20,30,50,.08);
}
.mx-map-layout{position:relative;height:420px;direction:ltr;}
.google-map-canvas{width:100%;height:100%;border-radius:12px;z-index:0;border:1px solid #e6e9ee;}

/* ---------- floating buttons over the map ---------- */
.mx-pin-sidebar{
    position:absolute;top:12px;right:12px;z-index:1000;
    max-height:calc(100% - 48px);width:auto;
    overflow-y:auto;overflow-x:hidden;
    display:flex;flex-direction:column;align-items:center;gap:8px;
    padding:8px;border-radius:16px;
    background:rgba(255,255,255,.82);
    -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
    border:1px solid rgba(255,255,255,.9);
    box-shadow:0 8px 24px rgba(15,23,42,.22);
    scrollbar-width:none;
}
.mx-pin-sidebar::-webkit-scrollbar{display:none;}
.mx-pin-sidebar:empty{display:none;}

.mx-pin-btn{
    flex:none;width:46px;height:46px;padding:0;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    border-radius:12px;border:2px solid var(--c);background:#fff;color:var(--c);
    box-shadow:0 2px 6px rgba(0,0,0,.08);
    transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.mx-pin-btn:hover{transform:translateY(-2px);box-shadow:0 6px 14px rgba(0,0,0,.18);}
.mx-pin-btn.active{background:var(--c);color:#fff;box-shadow:0 6px 14px rgba(0,0,0,.25);}
.mx-pin-btn:focus{outline:none;}
.mx-pin-btn:focus-visible{box-shadow:0 0 0 3px rgba(0,0,0,.25);}

/* ---------- popup ---------- */
.mx-popup .leaflet-popup-content-wrapper{
    padding:0;border-radius:16px;overflow:hidden;background:#fff;
    box-shadow:0 14px 36px rgba(15,23,42,.28);
}
.mx-popup .leaflet-popup-content{margin:0;}
.mx-popup .leaflet-popup-tip{box-shadow:none;}
.leaflet-popup.mx-popup a.leaflet-popup-close-button{
    right:auto;left:8px;top:8px;width:24px;height:24px;padding:0;
    font:18px/24px Tahoma,Arial,sans-serif;text-align:center;
    color:#64748b;background:rgba(255,255,255,.9);border-radius:50%;
}
.leaflet-popup.mx-popup a.leaflet-popup-close-button:hover,
.leaflet-popup.mx-popup a.leaflet-popup-close-button:focus{color:#0f172a;background:#fff;}

.mx-pp{
    display:flex;align-items:flex-start;gap:12px;direction:rtl;
    box-sizing:border-box;min-width:220px;
    padding:16px 14px 16px 40px;
    border:0;
    border-right:6px solid #d9534f;
    background:linear-gradient(270deg,rgba(0,0,0,.035),rgba(0,0,0,0) 55%);
}
.mx-pp-badge{
    flex:none;width:42px;height:42px;border-radius:50%;color:#fff;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 10px rgba(0,0,0,.22), 0 0 0 4px rgba(255,255,255,.9);
}
.mx-pp-text{flex:1;min-width:0;text-align:right;}
.mx-pp-title{
    max-height:170px;overflow-y:auto;padding-left:4px;
    font-size:14px;line-height:1.9;font-weight:600;color:#1e293b;
    white-space:pre-line;overflow-wrap:anywhere;word-break:break-word;
    scrollbar-width:thin;
}
.mx-pp-title::-webkit-scrollbar{width:5px;}
.mx-pp-title::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px;}

@media (max-width:480px){
    .mx-map-layout{height:360px;}
    .mx-pin-sidebar{top:8px;right:8px;padding:6px;gap:6px;}
    .mx-pin-btn{width:40px;height:40px;}
    .mx-pp{min-width:180px;}
}
/* ===== motion for the back button ===== */
.mx-map-card .mx-map-back {
    position: relative;
    animation: mx-back-in .5s cubic-bezier(.2, .8, .2, 1) .25s backwards;
    --nudge: -4px;                     /* arrow now points left, so it moves left */
}
html[dir="ltr"] .mx-map-card .mx-map-back { --nudge: 4px; }  /* flipped in LTR, so it points right */
/* arrow nudges back and forth */


/* pulse ring around the button */
.mx-map-card .mx-map-back::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px solid var(--c);
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    animation: mx-back-pulse 2.4s ease-out 1.2s infinite;
}



@keyframes mx-back-in {
    from { opacity: 0; transform: translateX(-24px) scale(.8); }
    to   { opacity: 1; transform: none; }
}
@keyframes mx-back-nudge {
    0%, 100% { translate: 0 0; }
    50%      { translate: var(--nudge) 0; }
}
@keyframes mx-back-pulse {
    0%   { transform: scale(1);   opacity: .55; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ===== fade when the pins map opens / closes ===== */
.mx-gmap-wrap {
    animation: mx-fade-in 0.7s ease backwards;   /* backwards, not both */
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.mx-gmap-wrap.mx-fade-out {
    animation: none;                             /* so the transition can take over */
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
}
.MapexplorerMap.mx-fade-in {
    animation: mx-fade-in 0.7s ease backwards;
}

@keyframes mx-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* respect users who turn animations off (one block for everything) */
@media (prefers-reduced-motion: reduce) {
    .mx-map-card .mx-map-back,
    .mx-map-card .mx-map-back svg,
    .mx-map-card .mx-map-back::after,
    .mx-gmap-wrap,
    .MapexplorerMap.mx-fade-in { animation: none; transition: none; }
}