:root {
    --navy: #0A192F;
    --blue: #007BFF;
    --light-bg: #fcfdfe;
    --text-dark: #0A192F;
    --text-light: #64748b;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

.compact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.blue {
    color: var(--blue);
}

/* Header Styling */
.map-header {
    background: var(--navy);
    padding: 20px 0;
    border-bottom: 5px solid var(--blue);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
    /* Make logo white for dark bg */
}

.header-info {
    text-align: right;
    color: #fff;
}

.header-info h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 5px 0 0;
    line-height: 1.1;
}

.sub-pill {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--blue);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.live-dot {
    height: 8px;
    width: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* Main Map Section */
.stapples-interactive-map {
    padding: 40px 0;
}

.map-grid-area {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    /* Left list slightly smaller */
    gap: 40px;
    min-height: 70vh;
    /* Ensure content takes up good height */
    align-items: stretch;
}

/* LEFT SIDE: LOCATION LIST PANEL */
.location-list-panel {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.panel-intro {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 500;
}

.location-scroller {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar for Scroller */
.location-scroller::-webkit-scrollbar {
    width: 6px;
}

.location-scroller::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.location-scroller::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.location-scroller::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}


.loc-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-bg);
    border: 1px solid #eef2f6;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.loc-card:hover {
    background: #fff;
    border-color: var(--blue);
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.1);
}

.l-icon {
    min-width: 40px;
    /* fixed width */
    height: 40px;
    background: var(--navy);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.loc-card:hover .l-icon {
    background: var(--blue);
}

.l-details {
    flex-grow: 1;
}

.l-details h4 {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.l-details p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

.arrow-go {
    margin-left: auto;
    font-size: 0.85rem;
    color: #cbd5e1;
    transition: color 0.3s ease, transform 0.3s ease;
}

.loc-card:hover .arrow-go {
    color: var(--blue);
    transform: translateX(5px);
}

/* RIGHT SIDE: INTERACTIVE MAP VISUAL */
.map-visual-container {
    background: var(--navy);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    box-shadow: 0 15px 40px rgba(10, 25, 47, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align overlay info at bottom */
}

.map-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 30px 30px;
}

.map-marker {
    position: absolute;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, z-index 0.3s ease;
    z-index: 5;
}

.marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-marker i {
    font-size: 1.8rem;
    color: var(--blue);
    filter: drop-shadow(0 0 10px rgba(0, 123, 255, 0.6));
    animation: markerFloat 2s infinite ease-in-out;
    transition: color 0.3s ease;
}

.m-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 123, 255, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid rgba(0, 123, 255, 0.3);
    backdrop-filter: blur(4px);
    white-space: nowrap;
    /* Prevent label wrap */
}

.map-marker:hover {
    transform: scale(1.3);
    z-index: 10;
}

.map-marker:hover i {
    color: #fff;
    filter: drop-shadow(0 0 15px #fff);
}


/* Map Overlay Info */
.map-overlay-info {
    position: relative;
    /* Changed from absolute to relative to be inside flex flow */
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    border-radius: 0 0 18px 18px;
    /* Match container bottom radius */
}

.live-tag {
    color: #4ade80;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.live-dot-small {
    height: 6px;
    width: 6px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: blink 1s infinite;
}


/* KEYFRAMES */
@keyframes markerFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}


/* RESPONSIVE DESIGN */
/* Tablets and larger phones */
@media (max-width: 992px) {
    .map-grid-area {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 30px;
    }

    .location-list-panel {
        order: 1;
        /* List on top */
        max-height: 400px;
    }

    .map-visual-container {
        order: 2;
        /* Map at bottom */
        min-height: 350px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-info {
        text-align: center;
        margin-top: 15px;
    }
}

/* Smaller phones */
@media (max-width: 576px) {
    .map-header {
        padding: 15px 0;
    }

    .header-info h1 {
        font-size: 1.5rem;
    }

    .sub-pill {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .location-list-panel {
        padding: 15px;
    }

    .loc-card {
        padding: 12px;
    }

    .l-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .l-details h4 {
        font-size: 0.85rem;
    }

    .l-details p {
        font-size: 0.65rem;
    }

    .arrow-go {
        font-size: 0.7rem;
    }

    .map-visual-container {
        min-height: 300px;
    }

    .m-lbl {
        display: none;
    }

    /* Hide labels on very small screens to avoid clutter */
    .map-marker i {
        font-size: 1.3rem;
    }

    .map-overlay-info {
        font-size: 0.65rem;
        padding: 10px 15px;
    }
}