/* Remove Google Fonts import and use system fonts */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #d6eaf8 50%, #aed6f1 100%);
    min-height: 100vh;
    color: #000000;
    line-height: 1.7;
}

/* Header Styles */
header {
    background: linear-gradient(90deg, #90caf9 0%, #bbdefb 50%, #e3f2fd 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #90caf9;
    width: 100%;
    display: block;
    position: relative;
    z-index: 1000;
}

header h1 {
    color: #000000;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-family: 'Tahoma', sans-serif;
}

.container {
    display: flex;
    flex-direction: row;
    gap: 24px;
    max-width: 1400px;
    margin: 30px auto 0 auto;
    padding: 0 20px;
    flex-wrap: nowrap;
}

.filters {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.filters h2 {
    color: #000000;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-family: 'Tahoma', sans-serif;
}

.filter-group {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.occupation-filter {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(174, 214, 241, 0.3);
    border-radius: 8px;
    border-left: 4px solid #5dade2;
    animation: slideDown 0.3s ease;
}

.specialty-filter {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(174, 214, 241, 0.3);
    border-radius: 8px;
    border-left: 4px solid #5dade2;
    animation: slideDown 0.3s ease;
}

.subspecialty-filter {
    margin-top: 15px;
    padding: 15px;
    background: rgba(174, 214, 241, 0.3);
    border-radius: 8px;
    border-left: 4px solid #5dade2;
    display: block;
    animation: slideDown 0.3s ease;
}

.language-filter {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(174, 214, 241, 0.3);
    border-radius: 8px;
    border-left: 4px solid #5dade2;
    animation: slideDown 0.3s ease;
}

.zip-distance-group {
    margin-top: 15px;
    padding: 15px;
    background: rgba(174, 214, 241, 0.3);
    border-radius: 8px;
    border-left: 4px solid #5dade2;
    animation: slideDown 0.3s ease;
}

.zip-code-filter {
    margin-bottom: 15px;
}

.zip-distance-group .distance-slider-container {
    margin: 10px 0 0 0;
    padding: 10px 0;
    background: transparent; /* Remove background since parent has it */
    border: none; /* Remove border since parent has it */
    border-radius: 0;
    display: block;
    transition: all 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.distance-slider-container {
    margin: 20px 0;
    padding: 15px;
    background: rgba(93, 173, 226, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(93, 173, 226, 0.3);
    display: block; /* Always visible now */
    transition: all 0.3s ease;
}

.distance-slider-container.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.slider-wrapper {
    margin: 10px 0;
}

.distance-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #d6eaf8;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.distance-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #5dade2;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(93, 173, 226, 0.4);
}

.distance-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #5dade2;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(93, 173, 226, 0.4);
}

.slider-value {
    text-align: center;
    font-weight: 600;
    color: #2980b9;
    margin-top: 8px;
    font-size: 1.1rem;
}

.filters label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Tahoma', sans-serif;
}

.filters select,
.filters input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #aed6f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Tahoma', sans-serif;
    color: #000000;
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: #5dade2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.2);
    transform: translateY(-1px);
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Tahoma', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #5dade2 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(93, 173, 226, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(93, 173, 226, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #2980b9;
    border: 2px solid #aed6f1;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Results Counter */
#results-count {
    margin-top: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    font-family: 'Tahoma', sans-serif;
}

/* Map Container */
.map-container {
    flex: 1 1 0%;
    min-width: 600px;
    position: relative;
}

#map {
    width: 100%;
    height: 600px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    background: #f0f0f0; /* Add background to see if element is there */
    min-height: 600px; /* Ensure minimum height */
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Prevent zoom on iOS */
        -webkit-text-size-adjust: 100%;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .container {
        flex-direction: column;
        gap: 0;
        padding: 0 10px;
    }
    
    .filters {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
        padding: 20px;
        border-radius: 12px;
    }
    
    .filters select,
    .filters input {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 14px 16px !important;
        border-radius: 8px !important;
        min-height: 44px; /* iOS touch target */
        touch-action: manipulation;
        -webkit-appearance: none;
        width: 100%;
        box-sizing: border-box;
    }
    
    .btn {
        padding: 14px 20px !important;
        font-size: 16px !important;
        min-height: 44px !important;
        touch-action: manipulation;
        border-radius: 8px !important;
        width: 100%;
        margin: 5px 0;
    }
    
    .map-container {
        min-width: 0;
        width: 100%;
        height: 450px;
        margin-top: 10px;
    }
    
    #map {
        height: 450px;
        border-radius: 12px;
        touch-action: pan-x pan-y;
    }
    
    header {
        flex-direction: column;
        padding: 15px;
        text-align: center;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    header > div:first-child {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
        align-items: center;
    }
    
    header img {
        height: 45px !important;
        max-width: 200px;
        object-fit: contain;
    }
    
    header h1 {
        font-size: 1.4rem !important;
        text-align: center;
        margin: 0;
    }
    
    header p {
        font-size: 0.9rem !important;
        margin: 5px 0 0 0;
    }
    
    .distance-slider-container {
        padding: 15px;
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .distance-slider {
        height: 12px !important;
        touch-action: pan-x;
    }
    
    .distance-slider::-webkit-slider-thumb {
        width: 28px !important;
        height: 28px !important;
        border-radius: 50%;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .slider-value {
        font-size: 1.1rem;
        margin-top: 12px;
        font-weight: 600;
    }
    
    #results-count {
        font-size: 1rem;
        padding: 12px 16px;
        text-align: center;
        border-radius: 8px;
        margin-top: 10px;
    }
    
    .filter-group {
        margin-bottom: 25px;
    }
    
    .filter-group label {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 8px;
        display: block;
    }
}
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    .filters {
        padding: 12px;
    }
    
    header {
        padding: 8px 12px;
    }
    
    header img {
        height: 35px !important;
    }
    
    header h1 {
        font-size: 1.1rem !important;
    }
    
    header p {
        font-size: 0.8rem;
    }
    
    header > div:last-child span {
        font-size: 0.7rem;
    }
    
    #map {
        height: 350px;
    }
    
    .map-container {
        height: 350px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(93, 173, 226, 0.4);
    }
    
    .filters:hover {
        transform: none;
    }
    
    .filters select:focus,
    .filters input:focus {
        transform: none;
        border-color: #5dade2;
        box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.3);
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .filters select,
    .filters input {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 10px;
    }
    
    .distance-slider {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* Prevent zoom on double tap */
* {
    touch-action: manipulation;
}

/* Mobile-specific enhancements */
.mobile-friendly-popup {
    font-size: 14px;
    line-height: 1.4;
}

.mobile-friendly-popup h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.mobile-friendly-popup div {
    margin: 6px 0;
}

.mobile-friendly-popup a {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 8px;
}

/* Custom Marker Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}
 .filters button {
    padding: 10px 15px;
    margin-top: 10px;
    cursor: pointer;
    margin-right: 5px;
}


.map-container {
    flex: 3; /* Take up more space */
    min-width: 400px; /* Minimum width */
}

#map {
    height: 500px; /* Adjust as needed */
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
}

 #results-count {
    margin-top: 15px;
    font-weight: bold;
}

/* Basic responsive adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .filters, .map-container {
        flex: none; /* Reset flex grow */
        width: 100%;
    }
}