banner{display:none!important} .row.justify-content-center.m-0.p-0{display:none!important} *{box-sizing:border-box} body{background:transparent;font-family:var(--font-sans,sans-serif);color:#212529} /* sidebar */ .sidebar{background:#ffffff;border:1px solid #007195;border-radius:8px;padding:1.25rem;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#dee2e6 transparent; max-height: 75vh;} .sidebar::-webkit-scrollbar{width:4px} .sidebar::-webkit-scrollbar-track{background:transparent} .sidebar::-webkit-scrollbar-thumb{background:#dee2e6;border-radius:4px} .filter-group-title{font-size:13px;font-weight:500;color:#6c757d;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.75rem} .filter-label{display:flex;align-items:center;gap:8px;font-size:14px;color:#212529;cursor:pointer;padding:4px 0;user-select:none} .filter-label input[type=checkbox]{width:15px;height:15px;cursor:pointer;accent-color:#378ADD} .divider{border:none;border-top:0.5px solid #dee2e6;margin:1rem 0} .sort-btn{width:100%;text-align:left;background:transparent;border:0.5px solid #dee2e6;padding:8px 12px;font-size:13px;color:#6c757d;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:background .15s} .sort-btn:hover{background:#f8f9fa} .sort-btn.active{border-color:#0dcaf0;color:#0dcaf0;background:#cff4fc} /* cards */ .office-card{background:#ffffff;border:1px solid #005478;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;height:100%; } .office-img{width:100%;height:140px;object-fit:cover;background:#f8f9fa} .office-body{padding:1rem;flex:1;display:flex;flex-direction:column} .office-name{font-size:14px;font-weight:700;color:#212529;margin-bottom:.5rem;line-height:1.4} .office-detail{font-size:13px;color:#6c757d;margin-bottom:.3rem;display:flex;align-items:flex-start;gap:6px} .office-detail i{font-size:13px;margin-top:2px;flex-shrink:0} .service-badge{display:inline-block;font-size:11px;padding:2px 8px;border-radius:20px;background:#f8f9fa;color:#6c757d;border:0.5px solid #dee2e6;margin:2px 2px 2px 0} .badge-row{margin-top:.5rem;margin-bottom:.75rem;} .card-actions{display:flex;gap:6px;margin-top:auto} .dirs-btn{display:block;text-align:center;background:transparent;border:0.5px solid #378ADD;border-radius:var(--border-radius-md);color:#378ADD;font-size:13px;padding:7px 0;text-decoration:none;transition:background .15s;flex:1} .dirs-btn:hover{background:#E6F1FB;color:#185FA5;text-decoration:none} .appt-btn{display:block;text-align:center;background:#378ADD;border:0.5px solid #378ADD;border-radius:var(--border-radius-md);color:#fff;font-size:13px;padding:7px 0;text-decoration:none;transition:background .15s;} .appt-btn:hover{background:#185FA5;border-color:#185FA5;color:#fff;text-decoration:none} .call-btn{display:flex;align-items:center;justify-content:center;background:transparent;border:0.5px solid #dee2e6;border-radius:var(--border-radius-md);color:#6c757d;font-size:13px;padding:7px 10px;text-decoration:none;transition:background .15s;white-space:nowrap} .call-btn:hover{background:#f8f9fa;color:#212529;text-decoration:none} .result-count{font-size:13px;color:#6c757d;margin-bottom:.75rem;flex-shrink:0} .no-results{text-align:center;padding:3rem 1rem;color:#6c757d;font-size:14px} .dist-badge{font-size:11px;background:#cff4fc;color:#0dcaf0;padding:2px 8px;border-radius:20px;margin-left:6px;font-weight:400} /* search */ .search-wrap{position:relative;margin-bottom:1rem;flex-shrink:0} .search-wrap .search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:14px;color:#6c757d;pointer-events:none} #searchInput{width:100%;padding:8px 32px 8px 32px;font-size:14px;border:0.5px solid #dee2e6;border-radius:var(--border-radius-md);background:#ffffff;color:#212529;outline:none;transition:border-color .15s} #searchInput:focus{border-color:#378ADD} #searchInput::placeholder{color:#6c757d} #clearSearch{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;font-size:14px;color:#6c757d;padding:2px 4px;display:none;line-height:1} #clearSearch:hover{color:#212529} mark{background:#B5D4F4;color:#0C447C;border-radius:2px;padding:0 1px} /* mobile filter toggle */ #mobileFilterToggle{display:none;width:100%;text-align:left;background:#ffffff;border:0.5px solid #dee2e6;border-radius:8px;padding:10px 14px;font-size:14px;color:#212529;cursor:pointer;align-items:center;justify-content:space-between;margin-bottom:.75rem} #mobileFilterToggle .left-group{display:flex;align-items:center;gap:8px} #mobileFilterToggle .chevron{transition:transform .2s;font-size:13px;color:#6c757d} #mobileFilterToggle.open .chevron{transform:rotate(180deg)} #activeCount{display:inline-flex;align-items:center;justify-content:center;background:#378ADD;color:#fff;border-radius:20px;font-size:11px;font-weight:500;min-width:18px;height:18px;padding:0 5px;margin-left:2px} #filterPanel{transition:none} /* ── dual-scroll layout ── */ #layoutRow{ display:flex; align-items:stretch; height:calc(100vh - 2rem); /* full viewport minus outer padding */ min-height:500px; } #desktopSidebarCol{ width:25%; flex-shrink:0; padding:0 8px 0 0; display:flex; flex-direction:column; } #desktopSidebarCol .sidebar{ flex:1; /* fill column height */ min-height:0; /* allow shrink below content */ } #resultsCol{ flex:1; min-width:0; padding:0 0 0 8px; display:flex; flex-direction:column; } #cardGrid{ min-height:0; overflow-y:auto; margin:0 -6px; scrollbar-width:thin; scrollbar-color:#dee2e6 transparent; max-height: 65vh; } #cardGrid::-webkit-scrollbar{width:4px} #cardGrid::-webkit-scrollbar-track{background:transparent} #cardGrid::-webkit-scrollbar-thumb{background:#dee2e6;border-radius:4px} @media(max-width:767px){ #layoutRow{height:auto;display:block} #mobileFilterToggle{display:flex} #desktopSidebarCol{display:none!important} #mobileFilterPanel{display:block} #filterPanel{overflow:hidden;max-height:0;transition:max-height .3s ease} #filterPanel.open{max-height:1200px} .sidebar{overflow-y:visible;max-height:none; } #cardGrid{overflow-y:visible;flex:none;max-height:none; } #resultsCol{display:block} } @media(min-width:768px){ #mobileFilterPanel{display:none} #desktopSidebarCol{display:flex!important} } Find a medical office near you. Filter or search by location name or service type. Filters & sort Sort by distance Practice Services Clear all filters Sort by distance Practice Services Clear all filters ✕ const locations = [ {name:"Dayalan and Associates Family Medicine",locNum:"33",divId:"dlna",divLabel:"Dayalan and Associates",address:"3601 McKnight East Drive Pittsburgh, PA 15237",coordLat:40.536183,coordLong:-80.009404,phone:"(412) 369-9943",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=3601%20McKnight%20East%20Drive%20Pittsburgh,%20PA%2015237",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb/o-33/officeThumb_14.png"}, {name:"Grob, Scheri, Woodburn and Griffin - Perrysville",locNum:"48",divId:"gswg",divLabel:"Grob, Scheri, Woodburn & Griffin",address:"1140 Perry Highway Pittsburgh, PA 15237",coordLat:40.539063,coordLong:-80.030511,phone:"(412) 364-4402",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=1140%20Perry%20Highway%20Pittsburgh,%20PA%2015237",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-48/officeThumb1_18.png"}, {name:"Grob, Scheri, Woodburn and Griffin - Wexford",locNum:"51",divId:"gswg",divLabel:"Grob, Scheri, Woodburn & Griffin",address:"4001 Stonewood Drive Wexford, PA 15090",coordLat:40.629342,coordLong:-80.052825,phone:"(724) 935-5330",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://share.google/aTzis351SLeu9CAdz",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-51/officeThumb1_13.png"}, {name:"Heyl Family Practice - Gibsonia",locNum:"3216",divId:"heyl",divLabel:"Heyl Family Practice",address:"5830 Meridian Road, Gibsonia, PA 15044",coordLat:40.640134,coordLong:-79.957245,phone:"(412) 931-3066",services:["Women's Health","Bloodwork","Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=Genesis+Medical+Associates:+Heyl+Family+Practice+-+Gibsonia,+5830+Meridian+Rd,+Gibsonia,+PA+15044",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-3216/officeThumb1_3.png"}, {name:"Heyl Family Practice - McCandless",locNum:"2215",divId:"heyl",divLabel:"Heyl Family Practice",address:"9104 Babcock Boulevard, Suite 3111 Pittsburgh, PA 15237",coordLat:40.573522,coordLong:-80.016147,phone:"(412) 931-3066",services:["Women's Health","Bloodwork","Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://share.google/p2PLlJOa4BO5OwYgc",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-2215/officeThumb1_8.png"}, {name:"Heyl Family Practice - West View",locNum:"46",divId:"heyl",divLabel:"Heyl Family Practice",address:"1020 Center Avenue Pittsburgh, PA 15229",coordLat:40.52182,coordLong:-80.038411,phone:"(412) 931-3066",services:["Women's Health","Bloodwork","Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://share.google/ofJjhHIvZPyl9Yjyg",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-46/officeThumb1_22.png"}, {name:"Koman, Kimmell and Gabriel Family Medicine - Pittsburgh",locNum:"34",divId:"kkgm",divLabel:"Koman, Kimmell and Gabriel",address:"8150 Perry Highway Suite 101 Pittsburgh, PA 15237",coordLat:40.561215,coordLong:-80.039611,phone:"(412) 364-2664",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=8150%20Perry%20Highway%20Suite%20101%20Pittsburgh,%20PA%2015237",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-34/officeThumb1_3.png"}, {name:"Koman, Kimmell and Gabriel Family Medicine - Seven Fields",locNum:"3248",divId:"kkgm",divLabel:"Koman, Kimmell and Gabriel",address:"2100 Garden Drive, Suite 200, Seven Fields, PA 16046",coordLat:40.692451,coordLong:-80.054116,phone:"(412) 364-2664",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=2100%20Garden%20Drive,%20Suite%20200,%20Seven%20Fields,%20PA%2016046",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-3248/officeThumb1_0.png"}, {name:"Northern Area Family Medicine",locNum:"54",divId:"nafm",divLabel:"Northern Area Family Medicine",address:"5700 Corporate Drive Suite 700 Pittsburgh, PA 15237",coordLat:40.565819,coordLong:-80.01252,phone:"(412) 630-267",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=5700%20Corporate%20Drive%20Suite%20700%20Pittsburgh,%20PA%2015237",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-54/officeThumb1_16.png"}, {name:"Schogel, Fardo, Atrasz and Associates",locNum:"42",divId:"sfaa",divLabel:"Schogel, Fardo, Atrasz & Associates",address:"213 Executive Drive, Suite 200 Cranberry Township, PA 16066",coordLat:40.686522,coordLong:-80.103942,phone:"(724) 741-0044",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=213%20Executive%20Drive,%20Suite%20200%20Cranberry%20Township,%20PA%2016066",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-42/officeThumb1_7.png"}, {name:"Primary Care Associates",locNum:"",divId:"prca",divLabel:"Primary Care Associates",address:"103 Clearview Circle, Unit A, Butler, PA 16001",coordLat:40.899215,coordLong:-79.914561,phone:"(724) 282-1530",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=103%20Clearview%20Circle,%20Butler,%20PA%2016001",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb/o-2402/officeThumb_2.png"}, {name:"Family Practice Associates",locNum:"",divId:"fapa",divLabel:"Family Practice Associates",address:"188 Enclave Drive, New Castle, PA 16105",coordLat:41.03342,coordLong:-80.345214,phone:"(724) 657-3221",services:["Same-Day Care","Preventive Care","Family Medicine","Primary Care"],dirsURL:"https://maps.google.com/maps/dir//Family+Practice+Assocs+Western+Pa+188+Enclave+Dr+New+Castle,+PA+16105/@41.0623178,-80.3567004,13z",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb2/o-2488/officeThumb2_2.png"}, {name:"Genesis Women's Health and Gynecology",locNum:"1224",divId:"gwhg",divLabel:"Genesis Women's Health & Gynecology",address:"4001 Stonewood Drive Wexford, PA 15090",coordLat:40.629342,coordLong:-80.052825,phone:"(724) 488-4963",services:["Women's Health"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=AHN%20Health%20+%20Wellness%20Pavilion%2012311%20Perry%20Highway%20Wexford,%20PA%2015090",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb1/o-1224/officeThumb1_2.png"}, {name:"Genesis Blood Draws & Lab",locNum:"",divId:"gbdl",divLabel:"Genesis Blood Draws & Lab",address:"8150 Perry Highway Suite 102 Pittsburgh, PA 15237",coordLat:40.561215,coordLong:-80.039611,phone:"(412) 847-0010",services:["Bloodwork"],dirsURL:"https://www.google.com/maps/dir/?api=1&destination;=8150%20Perry%20Highway,%20Pittsburgh,%20PA%2015237-5232",imageURL:"https://storage.googleapis.com/treatspace-prod-media/thumb/o-60/officeThumb_8.png"}, ]; let userLat=null,userLng=null,sortByDist=false; let activeDivs=new Set(),activeSvcs=new Set(),searchQuery=''; function haversine(lat1,lon1,lat2,lon2){ const R=3958.8,dLat=(lat2-lat1)*Math.PI/180,dLon=(lon2-lon1)*Math.PI/180; const a=Math.sin(dLat/2)**2+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)**2; return R*2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)); } function escapeRegex(s){return s.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')} function highlight(text,query){ if(!query)return text; return text.replace(new RegExp('('+escapeRegex(query)+')','gi'),'$1'); } function buildFilters(){ const divMap={},svcSet=new Set(); locations.forEach(l=>{divMap[l.divId]=l.divLabel;l.services.forEach(s=>svcSet.add(s))}); const divEntries=Object.entries(divMap).sort((a,b)=>a[1].localeCompare(b[1])); const svcEntries=[...svcSet].sort(); ['Desktop','Mobile'].forEach(suffix=>{ const df=document.getElementById('divFilters'+suffix); divEntries.forEach(([id,label])=>{df.innerHTML+=` ${label}`;}); const sf=document.getElementById('svcFilters'+suffix); svcEntries.forEach(s=>{sf.innerHTML+=` ${s}`;}); }); } function syncCheckboxes(type,value,checked){ document.querySelectorAll(`input[data-type="${type}"][value="${CSS.escape(value)}"]`).forEach(cb=>{cb.checked=checked}); } function toggleDiv(cb){cb.checked?activeDivs.add(cb.value):activeDivs.delete(cb.value);syncCheckboxes('div',cb.value,cb.checked);updateActiveCount();render();} function toggleSvc(cb){cb.checked?activeSvcs.add(cb.value):activeSvcs.delete(cb.value);syncCheckboxes('svc',cb.value,cb.checked);updateActiveCount();render();} function updateActiveCount(){ const n=activeDivs.size+activeSvcs.size+(sortByDist?1:0); const el=document.getElementById('activeCount'); el.textContent=n;el.style.display=n>0?'inline-flex':'none'; } function toggleMobileFilters(){ const btn=document.getElementById('mobileFilterToggle'); const panel=document.getElementById('filterPanel'); const open=panel.classList.toggle('open'); btn.classList.toggle('open',open);btn.setAttribute('aria-expanded',open); } function onSearch(val){searchQuery=val.trim();document.getElementById('clearSearch').style.display=searchQuery?'block':'none';render();} function clearSearch(){searchQuery='';document.getElementById('searchInput').value='';document.getElementById('clearSearch').style.display='none';render();} function toggleSort(){ if(sortByDist){ sortByDist=false; document.querySelectorAll('.sort-btn[id^="sortBtn"]').forEach(b=>{b.classList.remove('active');b.querySelector('.sortBtnLabel').textContent='Sort by distance'}); updateActiveCount();render();return; } if(userLat!==null){ sortByDist=true; document.querySelectorAll('.sort-btn[id^="sortBtn"]').forEach(b=>{b.classList.add('active');b.querySelector('.sortBtnLabel').textContent='Sorted by distance'}); updateActiveCount();render();return; } ['Desktop','Mobile'].forEach(s=>{const g=document.getElementById('geoStatus'+s);g.style.display='block';g.textContent='Detecting your location…';}); navigator.geolocation.getCurrentPosition(pos=>{ userLat=pos.coords.latitude;userLng=pos.coords.longitude;sortByDist=true; document.querySelectorAll('.sort-btn[id^="sortBtn"]').forEach(b=>{b.classList.add('active');b.querySelector('.sortBtnLabel').textContent='Sorted by distance'}); ['Desktop','Mobile'].forEach(s=>{const g=document.getElementById('geoStatus'+s);g.textContent='Location found.';setTimeout(()=>{g.style.display='none'},2000);}); updateActiveCount();render(); },()=>{ ['Desktop','Mobile'].forEach(s=>{document.getElementById('geoStatus'+s).textContent='Location unavailable. Please allow location access.';});}); } function clearAll(){ activeDivs.clear();activeSvcs.clear();sortByDist=false;searchQuery=''; document.querySelectorAll('#divFiltersDesktop input,#svcFiltersDesktop input,#divFiltersMobile input,#svcFiltersMobile input').forEach(cb=>cb.checked=false); document.querySelectorAll('.sort-btn[id^="sortBtn"]').forEach(b=>{b.classList.remove('active');b.querySelector('.sortBtnLabel').textContent='Sort by distance'}); document.getElementById('searchInput').value=''; document.getElementById('clearSearch').style.display='none'; updateActiveCount();render(); } function telify(phone){return phone.replace(/[^0-9+]/g,'');} function render(){ const q=searchQuery.toLowerCase(); let list=locations.filter(l=>{ const divOk=activeDivs.size===0||activeDivs.has(l.divId); const svcOk=activeSvcs.size===0||[...activeSvcs].every(s=>l.services.includes(s)); const searchOk=!q||l.name.toLowerCase().includes(q)||l.services.some(s=>s.toLowerCase().includes(q)); return divOk&&svcOk;&&searchOk; }); if(sortByDist&&userLat;!==null){ list=list.map(l=>({...l,dist:haversine(userLat,userLng,l.coordLat,l.coordLong)})); list.sort((a,b)=>a.dist-b.dist); } document.getElementById('resultCount').textContent=list.length===locations.length?`Showing all ${list.length} locations`:`${list.length} location${list.length!==1?'s':''} found`; const grid=document.getElementById('cardGrid'); if(list.length===0){grid.innerHTML=`No locations match your search.`;return;} grid.innerHTML=list.map(l=>{ const distBadge=l.dist!==undefined?`${l.dist.toFixed(1)} mi`:''; const hlName=highlight(l.name,searchQuery); const badges=l.services.map(s=>`${highlight(s,searchQuery)}`).join(''); const apptBtn=l.locNum?` Request appointment`:''; const callBtn=``; const dirsBtn=` Directions`; return ` ${hlName}${distBadge} ${l.phone} ${l.address} ${badges} ${apptBtn} ${callBtn}${dirsBtn} `; }).join(''); } buildFilters(); render();