/* locations.css */

.locations-hero {
    height: 50vh !important; /* Shorter hero for utility page */
}

.locations-wrapper {
    background-color: #f8f9fa;
    padding: 3rem 2rem;
}

.locations-container-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    height: 70vh; /* Adjusted to 70vh */
    min-height: 600px; /* Safety to ensure map isn't squished on tiny screens */
}

/* Sidebar Styling */
.locations-sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
    background: #fff;
}

.sidebar-header {
    padding: 2rem;
    background: #00346b;
    color: white;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-header p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.locations-list {
    flex: 1;
    overflow-y: auto; /* Scrollable list */
    padding: 1rem;
    scroll-behavior: smooth;
}

/* Scrollbar styling */
.locations-list::-webkit-scrollbar { width: 6px; }
.locations-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

.location-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: #fcfcfc;
}

.location-item:hover, 
.location-item.active {
    background: #f0f7ff;
    border-color: #00346b;
    transform: translateX(5px);
}

.location-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.item-info h3 {
    margin: 0;
    font-size: 1rem;
    color: #00346b;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 5px;
    text-transform: uppercase;
}

.badge.available { background: #e1f5fe; color: #0288d1; }
.badge.unavailable { background: #eee; color: #777; }

/* Map Area */
.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 0; /* Remove radius inside the split container */
}

/* Mobile Adjustments */
@media (max-width: 1104px) {
    .locations-container-main {
        grid-template-columns: 1fr;
        height: auto;
    }

    .locations-sidebar {
        height: 50vh;
        min-height: 400px;
        order: 2;
    }

    .map-wrapper {
        height: 50vh;
        min-height: 400px;
        order: 1;
    }
}