/* Map Page Header */
.map-hero {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: white;
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.map-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 20px;
}

.map-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.map-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 25px;
    opacity: 0.9;
}

.map-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
}

/* Main Map Content */
.map-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
    position: relative;
}

.map-sidebar {
    width: 100%;
    background-color: var(--light);
    border-bottom: 1px solid var(--light-gray);
    overflow-y: auto;
    padding: 20px 15px;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    max-height: 40vh;
    transition: max-height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.map-view {
    flex: 1;
    position: relative;
    height: 60vh;
    min-height: 300px;
}

#googleMap {
    width: 100%;
    height: 100%;
    background-color: #00BCD4; /* Turquoise blue color */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.company-filter {
    margin-bottom: 12px;
}

.company-filter label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.company-filter select, .company-filter input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--light-gray);
    border-radius: var(--rounded-sm);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: var(--light);
    color: var(--dark);
}

.company-filter select:focus, .company-filter input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.company-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom scrollbar */
.company-list::-webkit-scrollbar {
    width: 6px;
}

.company-list::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 10px;
}

.company-list::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
}

.company-item {
    padding: 12px;
    margin-bottom: 8px;
    background-color: var(--light);
    border-radius: var(--rounded-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.company-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--secondary);
}

.company-item.active {
    background-color: var(--primary);
    color: var(--light);
    border-left-color: var(--secondary);
}

.company-item h4 {
    margin-bottom: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    transition: color 0.3s ease;
}

.company-item.active h4 {
    color: var(--light);
}

.company-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.company-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.company-category {
    background-color: var(--light-gray);
    color: var(--dark);
    padding: 3px 8px;
    border-radius: var(--rounded-sm);
    font-size: 0.7rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.company-item.active .company-category {
    background-color: rgba(255,255,255,0.2);
    color: var(--light);
}

/* Toggle Button */
.toggle-sidebar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 11;
    background-color: var(--light);
    border: 1px solid var(--light-gray);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.toggle-sidebar:hover {
    background-color: var(--light-gray);
    transform: scale(1.1);
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background-color: var(--light);
    border: 1px solid var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    color: var(--dark);
}

.control-btn:hover {
    background-color: var(--light-gray);
    transform: scale(1.1);
}

/* Info Window Styles */
.info-window {
    min-width: 250px;
    max-width: 300px;
    font-family: 'Inter', sans-serif;
}

.info-window-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: var(--light);
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    margin: -15px -15px 15px -15px;
}

.info-window h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-window-content {
    padding: 0 15px 10px 15px;
}

.info-window-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-window-item i {
    color: var(--primary);
    margin-right: 8px;
    min-width: 16px;
}

.info-window-actions {
    padding: 15px;
    margin: 15px -15px -15px -15px;
    background-color: var(--light);
    border-radius: 0 0 8px 8px;
    text-align: center;
}

.info-window-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: var(--light);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.info-window-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Leaflet Attribution Control Styling */
.leaflet-control-attribution {
    position: absolute;
    bottom: 0;
    right: 0;
    background: transparent !important;
    padding: 2px 5px !important;
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: none !important;
    border: none !important;
    max-width: 200px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7);
}

.leaflet-control-attribution a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
}

.leaflet-control-attribution a:hover {
    color: rgba(255, 255, 255, 1) !important;
    text-decoration: underline !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .map-hero {
        height: 250px;
    }
    
    .map-hero h1 {
        font-size: 2rem;
    }
    
    .map-sidebar {
        max-height: 30vh;
        padding: 15px 10px;
    }
    
    .map-view {
        height: 70vh;
    }
    
    .company-list {
        max-height: 150px;
    }
    
    .leaflet-control-attribution {
        font-size: 8px !important;
        max-width: 150px;
    }
}