*{
            box-sizing: border-box;
        }
        body {
            font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
        }
        .hospital-page{
            display: flex;
            min-height: 100vh;
            overflow: visible;
        }

        /* 메인 콘텐츠 */
        .main-content {
            flex: 1;
            /* background: #F8FAFC; */
            padding: 50px;
            overflow: visible;
        }
		.main-content-inner{
			max-width: 1050px;
		}

        .page-title {
            font-size: 28px;
            font-weight: 700;
            color: #1E293B;
            margin-bottom: 30px;
			display:flex;
			align-items:center;
			gap:10px;
        }

        /* 검색바 */
        .search-container {
            display: flex;
            gap: 20px;
            margin-bottom: 50px;
			align-items:center;
        }

        .search-bar {
            flex: 1;
            display: flex;
            align-items: center;
            background: #FFFFFF;
            border: 1px solid #E5E7EB;
            border-radius: 50px;
            padding: 10px 18px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }

        .search-bar:focus-within {
            background: #FFFFFF;
            border-color: #CBD5E1;
            box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2), 0 8px 18px rgba(17, 24, 39, 0.12);
        }

        .search-icon {
            width: 36px;
            height: 36px;
            margin-right: 12px;
            color: #475569;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            flex-shrink: 0;
        }

        .search-input {
            flex: 1;
            border: none;
            outline: none;
            font-size: 16px;
            color: #1E293B;
            background: transparent;
            padding: 0;
            margin: 0;
            min-width: 0;
            font-family: inherit;
            line-height: 1.4;
            font-weight: 500;
        }

        .search-input::placeholder {
            color: #94A3B8;
            font-weight: 400;
        }

        .location-select {
            /* background: white; */
            /* border-radius: 12px; */
            padding: 16px 20px;
            /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); */
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            /* min-width: 200px; */
            position: relative;
        }

        .location-icon {
            width: 24px;
            height: 24px;
            color: #6B46C1;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .location-text {
            flex: 1;
            font-size: 16px;
            color: #1E293B;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .location-label {
            color: #94A3B8;
            font-size: 16px;
        }

        .location-value {
            color: #1E293B;
            font-weight: 600;
        }

        .location-arrow {
            width: 20px;
            height: 20px;
            color: #94A3B8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
        }

        .location-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border-radius: 12px;
            margin-top: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            display: none;
            z-index: 100;
            max-height: 300px;
            overflow-y: auto;
        }

        .location-dropdown.active {
            display: block;
        }

        .location-option {
            padding: 12px 20px;
            cursor: pointer;
            transition: background 0.2s;
            font-size: 14px;
            color: #1E293B;
        }

        .location-option:hover {
            background: #F1F5F9;
        }

        .location-option.active {
            background: #F1F5F9;
            color: #6B46C1;
            font-weight: 600;
        }

        /* 필터 버튼 */
        .filter-container {
            display: flex;
            gap: 8px;
            margin-bottom: 30px;
            padding-top: 30px;
            border-top: 1px solid #E2E8F0;
            flex-wrap: wrap;
        }

        .filter-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 20px;
            background: #E2E8F0;
            color: #475569;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
        }

        .filter-btn:hover {
            background: #CBD5E1;
        }

        .filter-btn.active {
            background: #464F6F;
            color: white;
        }

        /* 병원 카드 그리드 */
        .hospital-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 40px;
        }

        .hospital-card {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            transition: transform 0.2s, box-shadow 0.2s;
            cursor: pointer;
            display: flex;
        }

        .hospital-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        }

        .hospital-image {
            width: 180px;
            height: 100%;
            background: #E2E8F0;
            object-fit: cover;
            flex-shrink: 0;
        }

        .hospital-card-content {
            padding: 24px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 16px;
            font-size: 14px;
            font-weight: 500;
        }

        .status-badge.open {
            color: #059669;
        }

        .status-badge.closed {
            color: #DC2626;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
        }

        .hospital-name {
            font-size: 18px;
            font-weight: 700;
            color: #1E293B;
            margin-bottom: 12px;
        }

        .hospital-info {
            font-size: 14px;
            color: #64748B;
            line-height: 1.6;
        }

        .hospital-type {
            color: #6B46C1;
            font-weight: 600;
            display: block;
        }

        .hospital-distance {
            color: #059669;
            font-weight: 600;
        }

        /* 로딩 인디케이터 */
        .loading-indicator {
            text-align: center;
            padding: 30px;
            color: #94A3B8;
            font-size: 14px;
            display: none;
        }

        .loading-indicator.active {
            display: block;
        }

        .load-more-container {
            text-align: center;
            margin: 10px 0 30px;
            display: none;
        }

        .load-more-container.active {
            display: block;
        }

        .load-more-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 22px;
            border-radius: 999px;
            border: 1px solid #CBD5E1;
            background: #FFFFFF;
            color: #1E293B;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease;
        }

        .load-more-button:hover {
            background: #F8FAFC;
            border-color: #94A3B8;
        }

        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #E2E8F0;
            border-top-color: #6B46C1;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-right: 10px;
            vertical-align: middle;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* 모바일 최적화 */
        @media (max-width: 1200px) {
            body {
                display: block;
            }

            .main-content {
                padding: 15px;
                overflow: visible;
                width: 100%;
            }

            .main-content-inner {
                max-width: 100%;
            }

            .header-row {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 12px;
                margin-bottom: 12px;
				position: sticky;
				top: 0;
				z-index: 40;
				background: #FFFFFF;
				padding: 12px 0;
            }

            .page-title {
                font-size: 20px;
                margin: 0;
            }

            .search-container {
                flex-direction: column;
                gap: 12px;
                margin-bottom: 30px;
				align-items:initial;
            }

            .location-select {
                min-width: 0;
                width: 100%;
                padding: 12px 16px;
                border-radius: 16px;
                background: #FFFFFF;
                border: 1px solid #E5E7EB;
            }

            .hospital-grid {
                grid-template-columns: 1fr;
            }
			
        }
        @media (max-width: 768px) {
            .search-container {
                margin-bottom: 24px;
            }

            .hospital-card-content{
                padding: 20px;
            }
            .hospital-image {
                width: 120px;
            }
            .filter-container {
                gap: 6px;
                margin-bottom: 24px;
                padding-top: 0;
                border: none;
            }
        }

        @media (max-width: 480px) {
            .search-bar {
                padding: 8px 14px;
            }

            .search-input {
                font-size: 14px;
            }

            .filter-btn {
                padding: 8px 14px;
                font-size: 13px;
            }
        }
		/* [신규] 지도로 보기 버튼 스타일 (a 태그 대응) */
.map-view-btn {
    display: inline-flex; /* 요소를 정렬하기 위해 inline-flex 사용 */
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px; /* 기존 검색창/지역선택 박스와 높이 통일 */
    padding: 0 18px;
    background-color: #343a40; /* 다크한 톤 */
    color: #fff !important; /* a 태그 기본 파란색 무시 */
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none !important; /* a 태그 밑줄 제거 */
    box-sizing: border-box; /* 패딩이 높이에 영향을 주지 않도록 설정 */
}

.map-view-btn:hover {
    background-color: #1d2124;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: #fff !important;
    text-decoration: none !important;
}

.map-view-btn i {
    font-size: 1rem;
    color: #ffc107; /* 지도 아이콘 포인트 컬러 */
}
    /* 1. 레이아웃 및 지도 스타일 */
    .hospital-page.map-layout {
        display: flex;
        height: calc(100vh - 60px);
        overflow: hidden;
    }
    .map-container { flex: 1; position: relative; width: 100%; height: 100%; }
    #map { width: 100%; height: 100% !important; }

    .back-to-list {
        position: absolute; top: 20px; left: 20px; z-index: 10;
        padding: 18px 20px; background: #1d2124;color:#fff; border-radius: 30px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2); border: none; font-weight: bold; cursor: pointer;
    }


 /* 1. 마커 라벨 디자인 (디자인 개선 + 클릭 영역 확장) */
    .marker-label {
        position: relative;
        background: #ffffff;
        color: #333;
        font-size: 13px;
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 25px;
        border: 2px solid #007bff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        white-space: nowrap;
        cursor: pointer;
        text-align: center;
        min-width: 90px; /* 짧은 이름도 클릭하기 쉽게 최소 너비 확보 */
        
        /* [중요] 보이지 않는 확장 터치 영역: 실제 글씨보다 더 넓게 클릭 인식 */
        outline: 12px solid transparent; 
        transition: all 0.2s;
        z-index: 10;
    }


    /* 말풍선 꼬리표 디자인 */
    .marker-label::after {
        content: ''; position: absolute; bottom: -9px; left: 50%;
        transform: translateX(-50%);
        border-top: 9px solid #007bff; border-left: 7px solid transparent; border-right: 7px solid transparent;
    }
    .marker-label::before {
        content: ''; position: absolute; bottom: -6px; left: 50%;
        transform: translateX(-50%);
        border-top: 8px solid #fff; border-left: 6px solid transparent; border-right: 6px solid transparent;
        z-index: 1;
    }

    /* 모달 스타일 (pharm.php와 동일) */
    .custom-modal {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); z-index: 2000;
        align-items: center; justify-content: center;
    }
    .custom-modal.active { display: flex; animation: fadeIn 0.2s ease-out; }
    .modal-content {
        background: #fff; width: 90%; max-width: 480px; max-height: 80vh;
        border-radius: 16px; display: flex; flex-direction: column;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15); overflow: hidden;
    }
    .modal-header { padding: 18px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
    .modal-header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; color: #111; }
    .close-modal { background: none; border: none; font-size: 1.2rem; color: #999; cursor: pointer; padding: 5px; }
    .modal-body { padding: 20px; overflow-y: auto; background: #fff; }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }


